Check Hunter again. There is an entire chapter on Applet/Servlet
communication. He did a nice job with it too. Sorry I can't remember the
chapter number or title. I don't think he refers to the communication as
tunneling. Goodwill's book does, but Hunter's is much better for this topic.
Dave
-----Original Message-----
From: Shital Kanitkar [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 22, 2000 1:10 PM
To: [EMAIL PROTECTED]
Subject: Maintaining session (passing cookie!) between Servlet and
Applet
Hello,
Let me start by saying, I am new to servlets(started just last week). I have
searched the archives on this topic, and did find the trail, but to no
definite conclusion. Someone suggested that the book by Jason Hunter would
have a solution, but I checked up yesterday with no success. In fact all the
sources that I have checked, merely mention HTTP tunneling, but avoid the
session issue. Core Servlets (by SUN!!!) also avoid the topic(i.e.
Maintaining session (passing cookie!) between Servlet and Applet).
I am using a three tier architecture of Applet ---> Servlet ---> JDBC.
To connect between Applet - Servlet, I use URLConnection.openConnection(),
setRequestProperty("CONTENT_TYPE", "application/octet-stream"),
ObjectOutputStream, and writeObject to pass the serialized object.
I need to know how to maintain a session between an Applet and Servlet. In
my case, the user logs in and the system allows him features as per his Id
an administrator will have more features than an ordinary user for e.g.)
One thought that comes to mind is, since I am using Applet, I have live
objects which can maintain such status can I not? i.e. I can have an Object
called User in my Applet with Name, Password, STATUS_LOGGED and privilege
level as members. after logging in, this user object will be passed to the
servlet. The servlet validates the user, and sets the privilege level and
STATUS_LOGGED. The servlets can access this object (obviously by the Applet
sending it) to determine the access level. Is this plausible, and are there
any drawbacks to this?
If not, what is the best method to use. Please help, I am desperate.
Thanks,
-Shital
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html