> On the other hand, if you need to do sessions with clients that do not
necessarily
> have cookies enabled, you also need to do the URL encoding around *every*
> hyperlink in your pages that refers back to this page (or servlet), or
another
> page (or servlet) in your application. A simple example -- let's assume
you have
> a link that returns the user to the main menu, like this:
>
> Go to the <a href="menu.jsp">Main Menu</a>.
>
> To have it encoded when necessary, just do this:
>
> Go to the <a href="<%= response.encodeURL("menu.jsp") %>">Main
Menu</a>.
>
> and your URL will be encoded if necessary (i.e. cookies not in use). If
cookies
> are being used, the encodeURL() method will return the hyperlink
unmodified.
> That's pretty much all there is to the mechanics.
This can be complicated by URLs for forms, redirecting to URLs, and of
course, all's lost if you link to a non-JSP page (static HTML). I've more
or less given up on trying to satisfy session work for non-cookie people.
Cookies are just too normal to have a worrywart make life so hard because
they fear something horrible about cookies.
David
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html