in struts this is accomplished implementing
 org.apache.struts2.interceptor.createSessionInterceptor
configured in interceptor-ref name in struts-config.xml


 <action name="someAction" class="com.examples.SomeAction">
 *     <interceptor-ref name="createSession"/>

afterwards you can access the HttpServletRequest:

HttpServletRequest req=ServletActionContext.getServletContext().getRequest()

HttpSession session=req.getSession();

get all the params from session you need


HTH

Martin
______________________________________________



________________________________
From: Emi <em...@encs.concordia.ca>
Sent: Friday, February 9, 2018 4:02 PM
To: Struts Users Mailing List
Subject: Re: newFixedThreadPool in struts2

Hello Yasser,
> You can write your own listener by implementing HttpSessionListener
> and call shutdown in it's `sessionDestroyed` method. Please see [1].
> [1] http://www.myjavarecipes.com/tag/session-timeout-handling-in-java/
Session timeout handling in Java | My Java 
Recipes<http://www.myjavarecipes.com/tag/session-timeout-handling-in-java/>
www.myjavarecipes.com
Hi Reader, Recently I got requirement from customer that how much time user is 
spending on web application. Requirement is simple, for this we just need to 
record ...



In HttpSessionListener, it seems that there are no session attributes
anymore. So, there is no way for me to do the following in the listener
class:

fixPool = session.getAttribute('fixpool_name');
fixPool.shutdown();

So, the only possible way is through springframework config, right?

Thanks a lot.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to