wood burning stoves 2.0*
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
Author

Session with URL Rewrite

Sophia Oscario
Greenhorn

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

Mark
Sophia Oscario
Greenhorn

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: http://aspose.com/file-tools
 
subject: Session with URL Rewrite
 
Similar Threads
i v deployed a folder in tomcat 5.5.1,more sessions are created
Getting HttpSession object from SessionContext
encodeURL vs encodeRedirectURL
Tomcat session sharing - url rewrite and switching from http to https
dwr and mod_rewrite with tomcat