Hi, no one responded, so I just went and did this.  I don't know how to
give the code back, but if you would like it, I'd be glad to provide
it.  I ended up adding the session to the ServletInfoRequest class, and
overriding the getSession in there to return that session.  It works,
but only if the JSSI servlet is in the same zone as the sub-servlet.

        -Nissim

Nissim Karpenstein wrote:
> 
> Hi,
> 
> I want to add a feature to JSSI, and I want to know if it's a bad idea.
> I want to be able to access the session from a servlet that's called
> through the <SERVLET> tag.  I've found that since the SSI servlet
> already wrote output to the response, request.getSession() always
> returns a new session in such servlets.
> 
> Here's my idea for a solution...please comment.
> 
> I was thinking that we can have the SSI servlet get the Session before
> writing any output.  Then, when calling a servlet from the <SERVLET> tag
> it can check (through reflection) if there's a method
> service(ServletRequest, ServletResponse, HttpSession), and if there is,
> call that, and pass it the session, otherwise, call the standard
> service() method.  It could also be done by making an abstract class
> which extends GenericServlet, and has the additional method, and then we
> can check with instanceOf rather than using reflection.
> 
> Let me know if this is an OK idea as I will implement it.
> 
> Cheers,
> 
>         -Nissim
> 
> ------------------------------------------------------------
> To subscribe:    [EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:       [EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to