Thanks for the answer, till here everything is OK.
What happen after this?
For example, if I send the encoded URL in a JSP where the user have to fill
some forms and then submit a button and send all data to a servlet.
The servlet will find in his request the sessionID or I have to pass it
again using encode URL?
Thanks
Elena

"Craig R. McClanahan" wrote:

> Elena Palanca wrote:
>
> > Hi,
> > I would like to maintain the session in my web application with
> > URLrewriting.
> > Could you show me the flow I have to follow to guarantee the usage of
> > this technic?
> > I'm using only JSP1.0 without an application server.
> > Thanks
> > Elena
>
> In the JSP page, wherever you would write something like:
>
>     <a href="/somewhere.html">Go somewhere</a>
>
> to create a hyperlink, replace it with something like this:
>
>     <a href="<%= response.encodeURL("/somewhere.html") %>">Go
> somewhere</a>
>
> This causes the destination of the hyperlink to be encoded with the
> session ID if necessary to maintain session state (encoding won't be
> necessary if cookies are available).
>
> Craig McClanahan
begin:vcard
n:Palanca;Elena
tel;work:Dipartimento di Informatica di Pisa
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Dott. Elena Palanca
end:vcard

Reply via email to