try using request.getSession(true). It get's the same session object if it's
already created.
And if you are using response.sendRedirect() for redirection, then I think a
new session is created, though I am not sure abt it, but you can see that
getting the session ID both times.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Pedro
Mart�nez Asensio
Sent: Sunday, April 02, 2000 11:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Session problem


Could u tell me how to unsubscribe the list, please?

Chandrasekaran.V wrote:
>
> Hi ,
> We have 2 servlets which communicate with each other.The case is like this
> For certain JSP's (like product related Information
> we have a seperate servlet called "ProductServlet ")and a "ControlServlet"
> which along with other functions forwards the request
> to ProductServlet if the user requests productInformation.In our case the
> ProductServlet itself forwards the response to the
> respective JSP pages after putting the result in the session (say
> session.putValue("putByProductServlet",product) )
>
> But the problem is that when the ControlServlet says
> session.getValue("putByProductServlet") i get a null in return.What is
that
> i am doing wrong.To get the session i am using session =
> request.getSession(false) and the session is first created by the
> ControlServlet
> as soon as the user logs in.
>
> Can any one clarify on this.We are using weblogic4.5.1
>
> Chandra Sekaran.V,
> Software Developer,
> Wisor Telecom India Pvt Ltd,
> Bangalore
>
> [EMAIL PROTECTED]
> Ph : 091-80-5525821 x 4217
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to