Well I simply subclassed "Action" to my own and made the session-checking configurable through properties for the respective ActionMapping. Therefore you simply need to subclass ActionMapping also and put this on top of your <action-mapping>s:
<action-mappings type="az.dias.miner.AzActionMapping"> Properties will be read to the customer ActionMapping throgh reflection just like in FormBeans. -----Ursprüngliche Nachricht----- Von: Sanoj, Antony (IE10) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 19. März 2004 11:14 An: Struts Users Mailing List Betreff: RE: SessionTimeout handling I am using Struts1.1 with Tomcat5.0. The reason why I am extending ActionServlet is to handle the timeout in a central place. Target environment might be Websphere 4.0. I heard it doesn't support Filters. My requirement is not to propogate the session timeout handling to action classes. Regards, Sanoj Antony -----Original Message----- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 3:28 PM To: Struts Users Mailing List Subject: Re: SessionTimeout handling If your container supports it use a Filter. And I think (perhaps don't know) that session timeout is something you usually configure the container to do, but again i'm not sure of your requirement. On 19 Mar 2004, at 10:48, Sanoj, Antony (IE10) wrote: > Hi, > > I am trying to handle session timeout by extending the ActionServlet. > > I am trying to use the request method isRequestedSessionIdValid() > coupled with checking the session for my userbean. > > Please comment about this code. Advice if there is a better way to do > session timeout trapping. > > / > *********************************************************************** > *******/ > > public boolean processPreprocess(HttpServletRequest > request, HttpServletResponse response) > { > > /* "UserBean" is a bean which represents the logged in user. */ > if( request.isRequestedSessionIdValid() > || request.getSession().getAttribute("UserBean") != null) > return true; > else > { > try > { > request.getRequestDispatcher("SessionTimeout.do").forward(request,r > esponse); > } > catch(Exception e) > { > e.printStackTrace(); > } > return false; > } > } > > / > *********************************************************************** > *******/ > > Regards, > Sanoj Antony > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]