-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Henner:
thanks a lot.
but I still got a problem, I can access the session in any servlet within
the JSSI page. in servlet of this JSSI page, 
 request.isRequestedSessionIdFromCookie(),      false
 request.isRequestedSessionIdFromUrl() ,        true
 request.isRequestedSessionIdValid(),           false
because last one is false, so I can' t get session passed from previous
page,
session.isNew() is always true.
how come to this? sessionid has been passed to this page within url.

sincerely
sun

> *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]
> 


--
--------------------------------------------------------------
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]

Reply via email to