How to register a HttpSessionListener [message #88302] |
Fri, 18 May 2007 01:54 |
Eclipse User |
|
|
|
Originally posted by: kedar.sadekar.ca.com
I have seen workarounds for registering ServletContextListener classes.
How do I register HttpSessionListener's?
Are there any workarounds or extension points available.
Thanks.
|
|
|
|
|
Re: How to register a HttpSessionListener [message #88398 is a reply to message #88320] |
Fri, 18 May 2007 17:40 |
Eclipse User |
|
|
|
Originally posted by: kedar.sadekar.ca.com
I am currenty just interested in the session created / destroyed events.
Could you please explain what is possible with the
HttpSessionBindingListener
Thanks,
/kedar
Simon Kaegi wrote:
> Depending on what you're trying to do you might be able to do something
> clever with an HttpSessionBindingListener.
> Eventually I'm hoping we'll be able to support a regular SessionListener
> scoped by the HttpContext, but that's not for the current release.
> HTH
> -Simon
> "Kedar" <kedar.sadekar@ca.com> wrote in message
> news:6b0b76992b7c3fb43aaf75099a468bea$1@www.eclipse.org...
>>I have seen workarounds for registering ServletContextListener classes. How
>>do I register HttpSessionListener's?
>>
>> Are there any workarounds or extension points available.
>>
>> Thanks.
>>
|
|
|
|
Re: How to register a HttpSessionListener [message #88514 is a reply to message #88439] |
Mon, 21 May 2007 20:33 |
Eclipse User |
|
|
|
Originally posted by: kedar.sadekar.ca.com
Thanks Simon,
Will definitely try that.
/kedar
Simon Kaegi wrote:
> Maybe something like this...
> import javax.servlet.http.*;
> public class HttpSessionListenerAdaptor implements
> HttpSessionBindingListener {
> private HttpSessionListener delegate;
> public HttpSessionListenerAdaptor(HttpSessionListener delegate) {
> this.delegate = delegate;
> }
> public void valueBound(HttpSessionBindingEvent event) {
> delegate.sessionCreated(event);
> }
> public void valueUnbound(HttpSessionBindingEvent event) {
> delegate.sessionDestroyed(event);
> }
> }
> The idea is to always check and register this in your session as you
> get/create it. The valueUnbound event iwll get sent if either the session is
> explicitly invalidated or if the container times it out.
> HTH
> -Simon
> "Kedar" <kedar.sadekar@ca.com> wrote in message
> news:b00c5b0bb88c7bc0adc41f014c4beba3$1@www.eclipse.org...
>>I am currenty just interested in the session created / destroyed events.
>>
>> Could you please explain what is possible with the
>> HttpSessionBindingListener
>>
>> Thanks,
>> /kedar
>>
>> Simon Kaegi wrote:
>>
>>> Depending on what you're trying to do you might be able to do something
>>> clever with an HttpSessionBindingListener.
>>> Eventually I'm hoping we'll be able to support a regular SessionListener
>>> scoped by the HttpContext, but that's not for the current release.
>>
>>> HTH
>>> -Simon
>>
>>
>>> "Kedar" <kedar.sadekar@ca.com> wrote in message
>>> news:6b0b76992b7c3fb43aaf75099a468bea$1@www.eclipse.org...
>>>>I have seen workarounds for registering ServletContextListener classes.
>>>>How do I register HttpSessionListener's?
>>>>
>>>> Are there any workarounds or extension points available.
>>>>
>>>> Thanks.
>>>>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03559 seconds