Claudio,
The problem is not with your knowledge, but with Tomcat. Although URL-rewriting is
part of the Servlet spec, Tomcat does not yet implement it. That is one reason why
Tomcat does not claim to be ready to use in "production." Among other JSP engines,
JRun is one that I know supports URL-rewriting, and I am sure that others do, also.
You might want to look at Orion and Caucho's Resin.
However, you should know that using URL-rewriting will require work on your part as
a JSP writer. *Every* URL on your pages that is used for site navigation needs to
be encoded, using encodeURL. That is, every URL in an anchor tag needs to be
encoded, unless the URL points to somewhere out of your site. Also, every URL in
the action attribute of a form tag will need to be encoded.
Here are a couple of examples:
<A href='<%= response.encodeURL("/myapp/nextpage") %>'>Next Page</A>
<FORM action='<%= response.encodeURL("/myapp/submit") %>'>...</FORM>
Hope this is helpful.
Yours, JonTom
JT Kittredge
ITA Software
Cambridge, Massachusetts
Claudio Henrique Vianna wrote:
> Hi,
>
> I'm working with JSP in Tomcat. If I disable the cookies in my
> browser, the session concept is lost and every page
> became a new session. I have been researching another way to detect an
> session in JSP and I read a lot about URL
> Rewriting. But I couldn't find any explanation on how to do this ...
>
> Could somebody tell me where can I find samples of how to do this ?
>
> Thanks !!!
>
> Cl�udio H. Vianna
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets