-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
Hi,
On Mon, 20 Sep 1999, Sun JunXu wrote:
SJ| I think in JSSI manual, only tell use how to pass JServSessionId, but didn't
SJ| tell us how to retrive it in JSSI page, is it right?
SJ| I wish I can get some reply, I have sent several messages, but no one reply.
*PLEASE* read the documentation for sessions especially the encodeUrl()
stuff e.g. in the Java Tutorial to understand session tracking first. Try
to implement a simple application which uses sessions. Turn cookies in
your browser on and off and see if it works. NOW ..
That what JSSI does is to apply any configured paramter passed to the page
to any Link (<a href="url">) in the page -- not more not less.
Since JServ happens to use a GET-parameter to pass the session string in
case cookies are not accpted by the browser, JSSI is able to help tracking
session in the static part of the page even if cookies are turned off.
Note that you won't be able to create new sessions with cookies within the
JSSI page because this involves writing headers which isn't possible since
output has been generated before that servlet. Either insert a session
generating Servlet at the very beginning of the file or switch on the
'buffered' parameter of JSSI to circumvent this.
But the normal case would be that you have a session generating Servlet
(e.g. a Login servlet) which redirects to another page which may be a JSSI
page. If you've encoded the URL to which you're redirecting and cookies
are turned off, the session parameter is appended to that URL. If you've
configured JSSI correctly, now every link in the STATIC part of the page
contains the session parameter. Any servlet within the page can access the
session with the request.getSession() method. Note that, if your embedded
servlet creates a link itself, it has to call encodeUrl() since JSSI
doesn't take care to rewrite the DYNAMIC part of the page.
ciao,
-hen
---
Henner Zeller [EMAIL PROTECTED]
PGP pub key [77F75B39]: finger [EMAIL PROTECTED]
Microsoft is not the answer, it's the question. The answer is 'NO'
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]