A.C
A.C

Reputation: 197

session management without cookies

I'm trying to scrape data off a website using URLConnection. Need to track my login and session, but the website has apparently denied cookies.

I cannot see cookies from that website. What are the alternatives they could've used to save their session? I see URL re-writing could be one option.

How can I track my login/session in that website?

Upvotes: 0

Views: 1958

Answers (2)

Dungeon Hunter
Dungeon Hunter

Reputation: 20583

Storing the Session ID in hidden fields is another option. Check out this tutorial

Upvotes: 1

Abhishekkumar
Abhishekkumar

Reputation: 1102

encodeURL() Use it to ensure session management is handled properly. It takes a URL in, and if the user has cookies turned off, it attaches the jsessionid to the URL in a proper format to be recognized as the session identifier.

When to use it? Every time you have a link, form action, sendRedirect or other URL that goes to the client and your application requires maintenance of a server-side session. You do not need it for server-side forwards and includes.

Upvotes: 1

Related Questions