Duffey Kevin wrote:
>
> Hello,
>
> I am wondering, using JSP and JavaBeans with HttpSession tracking, if I
> want to support URL Rewriting, do I just do something like so on every link
> in every JSP page:
>
> <a href="<%= response.encodeURL("/somepath/somefile.jsp") %>">click here</a>
>
> Is that all that is needed? Does the servlet engine (Servlet 2.1 and 2.2,
> JSP 1.0 and 1.1) automatically append the session id to every link for me,
> and on the server side, it automatically gets the right session?
>
> Is there ANY work I need to do on the server side, in my code, to GET the
> session, or pass it back to the response?
>
> I would like to support both cookies and URL Rewriting, and I just want to
> know what lies ahead for me to do so. If its just a matter of adding the
> response.encodeURL() to every link, that is small potatoes compared to
> doing some tedious work on the server code.
Yes, doing this on *all* references in your web pages is enough, but note that
you can not have any static pages (.html) with references. *All* pages with
references must be JSP pages, with the encodeURL(), so that you don't loose
the session by clicking on a link that's not encoded.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
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