tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel FARBOS <lfar...@cvf.fr>
Subject Re: To have SetCookie in the Response
Date Mon, 15 Apr 2002 12:24:42 GMT
In fact, there is no special configuration to obtain this.
Only : <SessionId cookiesFirst="true" noCookies="false" /> to authorize
cookies.

My problem was :
I invoke LoginServlet (in which I do "...request.getSession( true );")
and at the end of this servlet, I do :
request.getRequestDispatcher(response.encodeURL("../servlet/DisplayHomePageServlet")).forward(request,response);

So, in this way, there is no SetCookie in the response.

To correct this, I do :
request.getRequestDispatcher("../servlet/DisplayHomePageServlet").forward(request,response);

and there is the SetCookie in my response : -)

Lionel FARBOS wrote:

> Hi,
>
> I configure my Tomcat 3.3.1 Final server with :
> <SessionId cookiesFirst="true" noCookies="false" />
> and my servlet do "HttpSession session = req.getSession( true );"
>
> but in my HTTP Response, I don't have the SetCookie parameter :
> HTTP/1.0 200 OK
> Content-Type: text/html
> Pragma: No-cache
> Cache-Control: no-cache
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Date: Fri, 12 Apr 2002 14:53:12 GMT
> Server: Tomcat Web Server/3.3a Final ( JSP 1.1; Servlet 2.2 )
>
> Is there a special configuration to obtain this ?
>
> Note :
>     with a telnet localhost 8080 : I have this header
>     with Netscape, I see the sessionId which is created...
>
> Thanks
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message