2

org.apache.jasper.JasperException: An exception occurred processing [/login1.jsp] at line [6]

3:     String email = request.getParameter("email");    
4:     String pwd = request.getParameter("password");
5:     Class.forName("com.mysql.jdbc.Driver");
6:     Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","root","");
7:     Statement st = con.createStatement();
8:     ResultSet rs;
9:     rs = st.executeQuery("select * from admin where email='" + email + "' and pass='" + pwd + "'");
Roman C
  • 49,761
  • 33
  • 66
  • 176

1 Answers1

0

The error message says that you have an exception in the line

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","root","");

The problem is that an exception is thrown when executing this line.

You should check the server logs the cause of exception.

You can get details about error if you configure the error page like in this answer.

It's impossible to give you a solution using given information but it can be a wrong connection URL which is missing the actual name of the database.

Roman C
  • 49,761
  • 33
  • 66
  • 176