Hello Guru's.
I have not had a lot of experience with
JSP's and I have come across a problem. I have tested a new site on a local
tomcat installation and all worked fine but when I upload it to a live tomcat server, I get an Internal Server Error and for the life of me cannot work out why! I know the exception report is pointing out the reason for the exception but I need help in understanding why it has happended.
I include this jspf file in other jsp's to control a session:
<%@ page session="false" %>
<%
HttpSession session = request.getSession(false);
if(session == null ||
session.getAttribute(QueryToolConstants.USER_NAME) == null) {
request.setAttribute(QueryToolConstants.MESSAGE, "Unable to validate session. Please log-in.");
RequestDispatcher rd = request.getRequestDispatcher("/index.jsp");
rd.forward(request, response);
return;
}
%>
When I loggin on the live uploaded version, I get this error:
Type:
Exception report
Message:
Internal Server Error
Description:
The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /QueryToolSessionControl.jspf(0,0)
jsp.error.session.multiple at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:140)
at org.apache.jasper.compiler.Validator$PageDirectiveVisitor.visit(Validator.java:166)
at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:280)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
.......
Could somebody help me please by pointing me in the right direction?
Many thanks,
Keith.
[ August 14, 2006: Message edited by: Keith Harrison ]
[ August 14, 2006: Message edited by: Keith Harrison ]