Are the JSPs and servlets in the same branch of your directory tree?
>>> jony@(protected) >>>
Hmm.. The session IDs are def different.. Which begs the question -
why?
The servlet is being called from the .JSP - why would it start a new
session?
-----Original Message-----
From: Ben Souther [mailto:bsouther@(protected)]
Sent: Monday, January 12, 2004 10:23 AM
To: Tomcat Users List
Subject: Re: communication issue between .jsp and servlet
Also make sure that you have session cookies enabled in your browser.
On Monday 12 January 2004 01:00 pm, Shapira, Yoav wrote:
> Howdy,
> Are you sure it's the same session? (Check it's ID in the JSP and
> servlet).
>
> Yoav Shapira
> Millennium ChemInformatics
>
> >-----Original Message-----
>
> From: jon yeargers [mailto:jony@(protected)]
>
> >Sent: Monday, January 12, 2004 12:57 PM
> >To: tomcat-user@(protected)
> >Subject: communication issue between .jsp and servlet
> >
> >Im hoping to restrict access to a servlet object by setting a
session
> >attribute in the valid .jsp and looking for it in the called
servlet.
> >Unfortunately the object doesn't seem to be transferring properly.
> >
> >Are there issues with using:
> >
> ><%
> >HttpSession sessionObj = request.getSession();
> >sessionObj.setAttribute("something", new Boolean(true));
> >
> >/*** some code here to call servlet - form or similar **/
> >%>
> >
> >in my .jsp and then calling:
> >
> >
> >protected void doPost(HttpServletRequest request,
HttpServletResponse
> >response)
> >throws ServletException,
java.io.IOException> >{
> > HttpSession sessionObj = request.getSession();
> > Boolean b = (Boolean)sessionObj.getAttribute("something");
> >
> >
> >}
> >
> >
> >For some reason I keep turning up a null obj in the servlet. Ive
> >tried enumerating all the sessionObj and its all turning up null.
> >
> >This seems pretty straightforward.. what am I doing wrong?
>
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged. This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else. If you are not the(an)
> intended recipient, please immediately delete this e-mail from your
> computer system and notify the sender. Thank you.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
--
Ben Souther
F.W. Davison & Company, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)