datasource in web.xml with JNDI
In the past I would establish a connection to a database like this:
Class.forName (Driver_string).newInstance ();
connection = DriverManager.getConnection (“jdbc:db2://localhost/qms”, user_name, “user_password”);
However, it is not a good idea to code such information in the application’s source code. They are all likely to change over time. Here on page 8 I learned you can use the web.xml to specify the datasource.
No comments yet.


