Hi I am getting a HTTP Status 500 - An exception occurred processing JSP page /registration.jsp at line 15 error. The page is a registration jsp page that submits the following parametres into the database. However there are no hints in Eclipse as to what caused the error. Can someone help me please?
<%@ page import ="java.sql.*" %>
<%
String user = request.getParameter("uname"); `
String pwd = request.getParameter("pass");
String fname = request.getParameter("first_name");
String lname = request.getParameter("last_name");
String email = request.getParameter("email");
Class.forName("org.postgresql.Driver");
Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:5432/demo",
"postgres", "8755Block1F");
Statement st = con.createStatement();
//ResultSet rs;
int i = st.executeUpdate("INSERT INTO members(first_name, last_name, email, uname, pass) VALUES ('" + fname + "','" + lname + "','" + email + "','" + user + "','" + pwd);
if (i > 0) {
//session.setAttribute("userid", user);
response.sendRedirect("welcome.jsp");
// out.print("Registration Successfull!"+"<a href='index.jsp'>Go to Login</a>");
} else {
response.sendRedirect("index.jsp");
}
%>