Ignore:
Timestamp:
Nov 27, 2018, 10:48:41 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2130: Upgrade 3-rd party libraries

The change made in [7521] removed the db.driver setting. It was still used in two JSP pages. They have now been updated to use the DriverManager with the db.url setting instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/exception/exception.jsp

    r7158 r7534  
    4848  import="javax.servlet.ServletException"
    4949  import="java.sql.Driver"
     50  import="java.sql.DriverManager"
    5051  import="java.util.Properties"
    5152  isErrorPage="true"
     
    102103  }
    103104
    104   final String jdbcDriver = Config.getString("db.driver");
     105  final String dbUrl = Config.getString("db.url");
     106  String driverName = "unknown";
    105107  String driverVersion = "";
    106108  try
    107109  {
    108     final Driver driver = (Driver)Class.forName(jdbcDriver).newInstance();
     110    final Driver driver = DriverManager.getDriver(dbUrl);
     111    driverName = driver.getClass().getName();
    109112    driverVersion = "(version " + driver.getMajorVersion() + "." + driver.getMinorVersion() + ")";
    110113  }
    111114  catch (Throwable t)
    112   {} 
     115  {}
     116
    113117  final Properties properties = System.getProperties();
    114118  final Runtime runtime = Runtime.getRuntime();
     
    140144    <tr>
    141145      <th>JDBC Driver</th>
    142       <td><%=jdbcDriver%> <%=driverVersion%></td>
     146      <td><%=driverName%> <%=driverVersion%></td>
    143147    </tr>
    144148    <tr>
Note: See TracChangeset for help on using the changeset viewer.