Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Session with URL Rewrite

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 **
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just change the method from get into post ...
and it works ....
------------------
** Science belongs to the world **
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic