• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Tracking  RSS feed

 
Sachitra Samarakoon
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
I heard that we can't track sessions with hyperlinks in JSPs,,..
Is it true? Do we really have to use submit buttons for that.?
So, if v can use hyper links for that purpose, can anybody help me out with it please?.....
Thank you........
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default session tracking is done by cookies. In this case, it does not matter whether you make a request from a hyperlink or form submission.
However, if the cookies are disabled, you would have to use URL rewriting to track sessions. In this case, you need to change your URL to include the session information.
Some information on URL rewriting is present in this article and JGuru discussion.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you heard is incorrect. It's perfectly possible to use session tracking through links in JSP pages. The JSTL tag library makes it rather simple; check out the <c:url> tag in part 2 of this JSTL introduction.
[ June 04, 2008: Message edited by: Ulf Dittmer ]
 
Sachitra Samarakoon
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much guys,,,, i'll work on that...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!