tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <r...@longhairtech.com>
Subject Re: session object
Date Thu, 14 Jun 2001 20:09:18 GMT
Make sure you are still in the same session id. If the servlet and the 
jsp are in two different contexts then a new session is created and 
you loose your data. You may also need to set cross context to true 
but I'm not sure on that one.
good luck

> Sounds like a pilot error.  Works fine:
>
> <%
>  session.setAttribute("request",request);
>  session.getAttribute("request");
>  out.println("request: " + request);
> %>
>
> Outputs:
> request: org.apache.catalina.connector.HttpRequestFacade@649dcd
>
> ----- Original Message -----
> From: <Patrick.Pierra@linedata.com>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Thursday, June 14, 2001 9:05 AM
> Subject: session object
>
>
> > Hi !
> >
> > I don't understand why but when I put the request object in the 
session :
> >
> > session.setAttribute("request", request);
> >
> > and try to retrieve it later in another jsp page :
> >
> > request = (HttpServletRequest) session.getAttribute("request");
> >
> > I constat that my request object is egal to null
> >
> > WHY !!!!!
> >
> >
> > Patrick PIERRA
> >



Mime
View raw message