Guest User

Untitled

a guest
Jan 1st, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2. pageEncoding="ISO-8859-1"%>
  3.  
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5.  
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  9. <title>Login page</title>
  10. </head>
  11. <body>
  12. <%@ page import ="java.sql.*" %>
  13. <%@ page import ="javax.sql.*" %>
  14.  
  15. <%
  16.  
  17.  
  18. Connection con=null;
  19.  
  20. try{
  21. Class.forName("com.mysql.jdbc.Driver");
  22. con = DriverManager.getConnection("jdbc:mysql://localhost/e-health?useSSL=false","root","root");
  23. System.out.println("Connection successful");
  24. out.println("Connection successful");
  25. }
  26. catch(Exception e){
  27. System.out.println("Connection failed");
  28. }
  29.  
  30. out.println("Loged in, connected to the DB");
  31. %>
  32. <a href = "welcome.html">Welcome</a><br>
  33. <a href= "index.html">Home</a>
  34. </body>
  35. </html>
Add Comment
Please, Sign In to add comment