On Fri, 11 Jan 2002 [EMAIL PROTECTED] wrote:

> Date: Fri, 11 Jan 2002 18:17:01 -0600
> From: [EMAIL PROTECTED]
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: Sessions across contexts, is it possible?
>
> My valve subclasses ValveBase.
>
> I looked at the source code in AuthenticatorBase and duplicated the same
> code. But the HttpServletRequest.getSession(true/false) call always
> return null. Is it because my request is the first contact between the
> browser and server, that there is no cookie set to identify session yet?
> I don't quite understand the problem.
>

You're passing the second argument as "true", right?  If the second
argument is false, you'd only get a session back if it already existed
(same as the corresponding method on HttpServletRequest for applications).

If you are passing true, it's important to know which of the "return
(null)" statements is being triggered, to understand why it's happening --
either run under a debugger or stick in some debugging print statements so
you know which condition is failing.

> Thanks!
>
> -Jerry
>

Craig


>
>
> -----Original Message-----
> From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 6:07 PM
> To: Tomcat Users List
> Subject: RE: Sessions across contexts, is it possible?
>
>
> This seems to be breaking the jsp specification.  Will this really work, and
> will it bring headaches in the future if I switch to a different servlet
> container?
>
>
>
> -----Original Message-----
> From: Mario Felarca [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 5:49 PM
> To: Tomcat Users List
> Subject: RE: Sessions across contexts, is it possible?
>
>
> At 04:21 PM 01/11/2002 -0600, you wrote:
>
> If you have your context's set to crossContext="true", you can receive the
> request in one context, set a request attribute with the value
> (setAttribute("otherContextPath", getServletContext().getRealPath("")), and
> then forward the request to the other context.
>
> In the other context, you just pull the data out of the request attribute
> with that key.
>
> I don't know if you were looking for something simpler than that, but if
> you are just trying to pass data around, that should work.
>
> M-
>
>
>
> >I want to pass servletContext.getRealPath("") over to another context.  I
> >don't want to have to do this with http parameters because of security
> >reasons.  Am I out of luck, or is there a way?
> >
> >Thanks in advance for any help!
> >
> >-----Original Message-----
> >From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, January 11, 2002 3:45 PM
> >To: Tomcat Users List; Jonathan Eric Miller
> >Subject: Sessions across contexts, is it possible?
> >
> >
> >Is it possible to use session attributes across contexts in tomcat 3.2.4?
> >
> >
> >--
> >To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> >For additional commands: <mailto:[EMAIL PROTECTED]>
> >Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >--
> >To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> >For additional commands: <mailto:[EMAIL PROTECTED]>
> >Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>
> _________________________________________________________
>
> Do You Yahoo!?
>
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to