File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Applet failing to send HttpSession Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet failing to send HttpSession" Watch "Applet failing to send HttpSession" New topic

Applet failing to send HttpSession

Hugh Angle

Joined: Apr 15, 2009
Posts: 4
I have an applet opening a connection to a servlet, sending it a Table object. The servlet gets the
HttpSession object to allow the Table data to be stored for the appropriate client. This arrangement
has worked for a long time. I assumed that the: new URL(applet.getCodeBase(), servlet_path).open.Connection
was providing the HttpSession object.

Recently, request.getSession(false) is returning null. However, the applet is still sending valid Table data.

My question is am I making the correct assumption as to how the applet provides the servlet with the session object?


Hugh V. Angle
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12760
The client does not send a HTTPSession, it sends a request header containing the unique id of the session. The session object is maintained by the servlet container.

Therefor you should be looking at the request headers sent by the applet.

It is sorta covered in the JavaRanch Style Guide.
subject: Applet failing to send HttpSession
Similar Threads
Problem with passing object from servlet to applet using jsp page
Servlet to applet communication
JTable and Model
Passing more than one object
Servlet to Applet Communication problem