Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection con=null;
- Class.forName("org.postgresql.Driver");
- out.println("<before create connection");
- con = (Connection) DriverManager.getConnection("jdbc:postgresql://192.168.0.130:5432/mydb","root", "root");
- out.println("connection created");
- <resource-ref>
- <description>
- Resource reference to a factory for java.sql.Connection
- instances that may be used for talking to a particular
- database that is configured in the <Context>
- configuration for the web application.
- </description>
- <res-ref-name>
- jdbc/EmployeeDB
- </res-ref-name>
- <res-type>
- javax.sql.DataSource
- </res-type>
- <res-auth>
- Container
- </res-auth>
- </resource-ref>
Add Comment
Please, Sign In to add comment