• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to track session on the client side?  RSS feed

 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Does anyone know how to track HTTP sessions from a client side connection? There is no HttpSession object in J2SE ... I could have decorated the J2SE HttpURLConnection class to handle cookies. But is this the preferred way? Is there a standard property that I can turn on to enable cookie handling?
Thanks a lot
cheers
Michael
 
Erik Pragt
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Michael,
The way I do it (which means: probably NOT the prefered way ) is to use the HttpURLConnection to read the HTTP headers and read (and keep track of) cookies. This way you can handle sessions. I don't know if there's a better way, but like I said, this is how I do it.
Good luck,
Erik
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Erik. Isn't this something that should be included in the JDK?
cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!