Re: Authenticating to servlet
From: Wendy S (wendywds_at_hotmail.com)
Date: 11/04/03
- Next message: Bura Tino: "Re: Subclasses in interfaces"
- Previous message: rbs: "Re: jtoolbar & OS X 1.4.1"
- In reply to: Ike: "Re: Authenticating to servlet"
- Next in thread: Wendy S: "Re: Authenticating to servlet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 03 Nov 2003 20:54:28 -0700
Ike wrote:
> Yes.....I thought (mistakenly perhaps) that typically people assigned a
> connection object with a login. I guess not though. Perhaps I can obtain a
> session object, passing it via php or jsp as a parameter to the applet
> (ugh)......there must be an easier way?
Not me, I grab connections and throw them away as soon as I'm done with
them. Holding connections open for long periods of time isn't appealing to
me.
I don't know enough about how sessions are created and stored in Tomcat to
be able to advise, but I bet you can get the session ID and pass it to the
applet. From what I've seen, (and I have no idea if this would work,) you
might be able to tag it on the end of the URL with
;jsessionid=aldjf89623865 and Tomcat will pick that up and "know" what
session the request belongs to.
Play around with Tomcat sessions with your browser, you'll see the
jsessionid get appended to the URL on the first request (and IIRC
subsequent requests as well if you don't have cookies enabled). So the
applet could just behave like a non-cookie-enabled browser. Tomcat isn't
going to know the difference, all it sees is a request.
The applet/servlet communication I'm talking about here is over HTTP. You
can send pretty much anything over HTTP, even serialized objects. So when
you talk about passing the session id as a parameter, I would not do that.
I would have the applet connect to the server and ask, "What's my session
id?" Then it would remember that value and append it to any subsequent
requests so that the server will know what session the applet is in.
Note, however, that I've never actually written an applet. :) All my
experience is server-side.
This is still separate from the issue of connection pooling though!
-- Wendy in Chandler, AZ
- Next message: Bura Tino: "Re: Subclasses in interfaces"
- Previous message: rbs: "Re: jtoolbar & OS X 1.4.1"
- In reply to: Ike: "Re: Authenticating to servlet"
- Next in thread: Wendy S: "Re: Authenticating to servlet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|