tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Williams" <>
Subject Re: The function for still not sure
Date Wed, 10 Sep 2003 07:55:05 GMT
As I said, the URL-rewriting is done by the container to allow you to use
HTTP sessions when the user of your site has disabled cookies and it does
this by appending ";jessionid=blah-blah-blah" to end of your URLs prior to
the query string ("?blah=stuff&jabber=yakka-yakka...").  This is all in the
servlet spec.  However, you need to give the container the opportunity to do
so and for this you need to use the encodeURL methods of

Think about your JSPs.  Currently (presumably) you have links like the
    <a href="some_link.jsp">Some link</a>

To enable session tracking without cookies, all you need to do is:
    <a href="<%= response.encodeURL("some_link.jsp") %>">Some link</a>

Likewise, whenever the logic of your page indicates that a redirect is
required, instead of calling:
you call

Check out the J2EE tutorial for examples:


----- Original Message ----- 
From: "Anson Zeall" <>
To: "Tomcat Users List" <>
Sent: Wednesday, September 10, 2003 2:56 AM
Subject: The function for still not sure

> Hi guys,
>     I was asking about the login stuff before from previous emails and
> trying to avoid the use of cookies. Someone in the group asked me to try
> use sessions ...using response.encodeURL and stuff. Can someone explain a
> bit more what that does, or is there a site that can explain to me about
> that?
> Thanks,
> Anson


> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message