Jason Rogers
Jason Rogers

Reputation: 19344

Servlet JApplet: HttpSession

This sounds like a simple question but I can't find good information.

I'm writing a small JApplet that will be sending some info to a server servlet

I want to be able to track who is who so I want to put up a system of logging and and session.

I found some information about httpsession but I can never find one information:

Do I have to create a session object in my applet or is there an automatic system that creates the httpsession when I do something like this on the applet side

HttpURLConnection con = (HttpURLConnection) u.openConnection ();
con.setDoInput(true);
con.setRequestMethod("GET");
con.connect();

Upvotes: 0

Views: 980

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240946

You need to keep track of session at server in servlet.

and from java applet you need to maintain cookie in header while requesting.

Also See

Upvotes: 1

Related Questions