Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with servlet useing cookie to read a webpage

 
Chaz Andrews
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Im trying to get my servlet to access and download a page. The page requires a cookie to access it tho. Can a servlet use a cookie to access other webpages? Any info is appreciated.
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, if you know cookie name and value then just set them when you open URL connection.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an example of setting a JSEESIONID which is just
a cookie as far as HTTP is concerned.
 
Chaz Andrews
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Here is an example of setting a JSEESIONID which is just
a cookie as far as HTTP is concerned.


Bimey, that was easier than I expected it to be. Cheers guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic