This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Hi, encodeURL question... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Hi, encodeURL question..." Watch "Hi, encodeURL question..." New topic
Author

Hi, encodeURL question...

Carmen Brianick
Ranch Hand

Joined: Feb 23, 2006
Posts: 67
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

Joined: May 05, 2005
Posts: 162
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

Joined: Feb 23, 2006
Posts: 67
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

Joined: Feb 23, 2006
Posts: 67
Chandu, i accidently printed your name twice, please excuse that.

Thanks,
Carmen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hi, encodeURL question...