Guest User

Untitled

a guest
Mar 24th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Connection con=null;
  2. Class.forName("org.postgresql.Driver");
  3. out.println("<before create connection");
  4. con = (Connection) DriverManager.getConnection("jdbc:postgresql://192.168.0.130:5432/mydb","root", "root");
  5. out.println("connection created");
  6.  
  7. <resource-ref>
  8. <description>
  9. Resource reference to a factory for java.sql.Connection
  10. instances that may be used for talking to a particular
  11. database that is configured in the <Context>
  12. configuration for the web application.
  13. </description>
  14. <res-ref-name>
  15. jdbc/EmployeeDB
  16. </res-ref-name>
  17. <res-type>
  18. javax.sql.DataSource
  19. </res-type>
  20. <res-auth>
  21. Container
  22. </res-auth>
  23. </resource-ref>
Add Comment
Please, Sign In to add comment