HTTP 500 Internal Server Error
We've been trying to work on this JSP login page, and our verifylogin page kept giving us a HTTP 500 Internal Server Error problem and we have been checking it over and over again but can't spot the error. Can anyone else give us a hand here? Thanks!
<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
<%@ page import="alphapoly.UserModule.Student.*, alphapoly.UserModule.StudentController.* , javax.ejb.*, javax.rmi.*, java.math.*, javax.naming.*, javax.rmi.PortableRemoteObject, java.rmi.RemoteException, java.util.*" %>
<%@ page errorPage="../error.jsp" %>
<%!
private StudentManager studentManager = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
Object objRef = ic.lookup ("java:comp/env/ejb/Student");
StudentManagerHome home = (StudentManagerHome) PortableRemoteObject.narrow (objRef, StudentManagerHome.class);
studentManager = home.create();
} catch (FinderException ex) {
System.out.println("Couldn't create StudentManagerBean. " + ex.getMessage());
} catch (ClassCastException ex) {
System.out.println("Couldn't create StudentManagerBean.123 " + ex.getMessage());
} catch (RemoteException ex) {
System.out.println("Couldn't create StudentManager bean."+ ex.getMessage());
} catch (CreateException ex) {
System.out.println("Couldn't create StudentManager bean."+ ex.getMessage());
} catch (NamingException ex) {
System.out.println("Unable to lookup home: "+ "StudentManager "+ ex.getMessage());
} catch (Exception ex) {
System.out.println("Other exceptions");
}// End of Try and Catch Statements for jspInit ()
}// End of jspInit ()
public void jspDestroy () {
studentManager = null;
}// End of jspDestroy ()
//Get the data from the fields.
String userID = request.getParameter("userID");
String password = request.getParameter("password");
try {
if (studentManager.login(userID, password))
{
session.setAttribute("LoggedIn", "1"); //"LoggedIn.equals("1") if user is logged in. else "0"
session.setAttribute("userID", userID);
%>
[jsp:forward page = "student_intranet_index.jsp" /]
<%
}
else
{
%>
[jsp:forward page = "loginerror.jsp" /]
<%
}//end else
} catch (Exception ex) {
out.println("Login is not successful");
}
%>
</html>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
<%@ page import="alphapoly.UserModule.Student.*, alphapoly.UserModule.StudentController.*
<%@ page errorPage="../error.jsp" %>
<%!
private StudentManager studentManager = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
Object objRef = ic.lookup ("java:comp/env/ejb/Student");
StudentManagerHome home = (StudentManagerHome) PortableRemoteObject.narrow (objRef, StudentManagerHome.class);
studentManager = home.create();
} catch (FinderException ex) {
System.out.println("Couldn't create StudentManagerBean. " + ex.getMessage());
} catch (ClassCastException ex) {
System.out.println("Couldn't create StudentManagerBean.123 " + ex.getMessage());
} catch (RemoteException ex) {
System.out.println("Couldn't create StudentManager bean."+ ex.getMessage());
} catch (CreateException ex) {
System.out.println("Couldn't create StudentManager bean."+ ex.getMessage());
} catch (NamingException ex) {
System.out.println("Unable to lookup home: "+ "StudentManager "+ ex.getMessage());
} catch (Exception ex) {
System.out.println("Other exceptions");
}// End of Try and Catch Statements for jspInit ()
}// End of jspInit ()
public void jspDestroy () {
studentManager = null;
}// End of jspDestroy ()
//Get the data from the fields.
String userID = request.getParameter("userID");
String password = request.getParameter("password");
try {
if (studentManager.login(userID, password))
{
session.setAttribute("LoggedIn", "1"); //"LoggedIn.equals("1") if user is logged in. else "0"
session.setAttribute("userID", userID);
%>
[jsp:forward page = "student_intranet_index.jsp" /]
<%
}
else
{
%>
[jsp:forward page = "loginerror.jsp" /]
<%
}//end else
} catch (Exception ex) {
out.println("Login is not successful");
}
%>
</html>
