File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Session with URL Rewrite Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session with URL Rewrite" Watch "Session with URL Rewrite" New topic

Session with URL Rewrite

Sophia Oscario

Joined: May 14, 2001
Posts: 22
I try to use session with URL Rewrite, but it doesn't work.
I use like this :
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException
URL = req.getRequestURI();
out.println("<form method=get action=\"" + res.encodeUrl (URL) + "\">");
then I turn off cookie in my browser, but it doesn't work.
Everytime I refresh the page, I got different session ID.
What do I miss ?
Please anyone could help ?
Thanks in advance
** Science belongs to the world **

** Science belongs to the world **
Mark Simms
Ranch Hand

Joined: Jul 20, 2000
Posts: 36
1) make sure you close, then reopen your browser when you do this test
2) check your app server configuration....
server.xml with Tomcat.
Tomcat is notorious for doing this.....
check your Contextpath settings....

Sophia Oscario

Joined: May 14, 2001
Posts: 22
i just change the method from get into post ...
and it works ....
** Science belongs to the world **
I agree. Here's the link:
subject: Session with URL Rewrite
It's not a secret anymore!