Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is separate httpsession listener instance is bound with each session created?

I need to add a session listener to my application. I need to know whether separate session listeners are registered with each session created or all sessions are listened by a single(per application) listener.

like image 314
Tom Sebastian Avatar asked Jun 15 '26 03:06

Tom Sebastian


1 Answers

The session listner will be listened to single listner for the application. http://www.easywayserver.com/blog/listener-in-java/

As you can see here we are configuring the listner for the web-application in web.xml

<web-app>
    <display-name>Listener</display-name>

     <listener>
          <listener-class>com.listener.MySessionListener</listener-class>
     </listener>

</web-app>

So there need single session listner for the web application.

like image 87
Niju Avatar answered Jun 17 '26 17:06

Niju



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!