Claudio Henrique Vianna <[EMAIL PROTECTED]> 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 ?

First, tomcat doesn't support URL rewriting. Try using Resin 1.1.b6
(www.caucho.com).

Second, the syntax is:

  <a href='<%= response.encodeURL("your URL here") %>'>...</a>

In other words, anywhere you have a link to another of your pages,
wrap it in the response.encodeURL() call. That's it.

Tomcat supplies this method, but if you look at the source code you
will see that it does nothing but return the URL you gave it.

--
Antonio Freixas
[EMAIL PROTECTED]
(503) 626-5433

===========================================================================
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

Reply via email to