Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hi, encodeURL question...

 
Carmen Brianick
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I've set my IE browser to block all cookies and I'm trying the code below for encoding urls, but when I look at the source of the generated html, there is no session id, am I doing something wrong?

out.println("<html><body>");
out.println("<a href=\"" + response.encodeURL("/sessionPractice.do") + "\">click me</a>");
out.println("</body></html>");

Thanks,
Carmen
 
Chandra Sagi
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Session ID will be attached to your URL as something like +JSESSIONID=8798058968768969868698 , you need not view the source for it.

Thanks
Chandu
 
Carmen Brianick
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chandu, thanks so much for your response! I was just curious and I thought the Httpsession would be attached in the url when I viewed the html source. So if I wanted to view it, I just I'd have to use some java code?

Thanks,
Chandu
 
Carmen Brianick
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandu, i accidently printed your name twice, please excuse that.

Thanks,
Carmen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic