Hi.
 
I'm having some difficulty using session variables. Here's a short abridgement of my code in evaluate.jsp:
 
HttpSession thisSession = request.getSession(true);
...
while(enum.hasMoreElements()){
    intValue = fncFunction(...);
    switch(value){
        case -1:
            thisSession.putValue("errorMsg","Error in fncFunction()....");
            response.sendRedirect(response.encodeRedirectURL("../errorpages/error.jsp"));
            break;
        case -2:
        ...
    }
}
 
The problem: the error.jsp page sometimes shows some of the HTML code in the evaluate.jsp page.
The error.jsp page looks something like this:
 
HttpSession thisSession = request.getSession(true);
 
String strError=(String)thisSession.getValue("errorMsg");
if (strError!=null && strError!="")
     out.println(strError);
else
     out.println("Ingen n�rmere feilbeskjed er tilgjengelig.<br>");
 
What's the problem here?? It seems to me that the session variable includes much more than my simple errorMsg.
 
�ystein
 

Reply via email to