Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session with URL Rewrite

 
Sophia Oscario
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 **
 
Mark Simms
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just change the method from get into post ...
and it works ....
------------------
** Science belongs to the world **
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic