Jijith Sivarajan wrote:

> hi
>     while going through the JRun docs, I found that they have
> implemented the same 'asp concept of global.asa file' to their
> implementation as 'global.jsa'. But I donot know whether any other jsp
> engine has implemented the concept.
>
> In the global.jsa file one can write scripts for handling Session
> start,end and Application start,end events.
>

This implementation is specific to JRun.  It is not in the servlet API, so you
cannot count on using it anywhere else.

A portable way to deal with "session start" and "session end" events is to define
a user object that implements HttpSessionBindingListener, and store this object in
the user session when the session is established (i.e. when the user first logs
on).  The valueBound() method of this object will be called then, which is
effectively a "session start" notification.  The valueUnbound() method of this
object will be called when the session is invalidated or times out, which gives
you a "session end" notification.

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to