Hi
I have come across a plug-in for Struts, that is called as SAIF (Struts Action 
Invocation Framework), which enables us to write a pre-action and post action methods. 
 You can use PreAction method for doing all the session authentication, etc.,
I did not really use this, but the features are available at : 
http://struts.sourceforge.net/saif/ <http://struts.sourceforge.net/saif/> 
Any thoughts on this.
Regards,
Gopal
 
 
 
 

        -----Original Message----- 
        From: Fullam, Jonathan [mailto:[EMAIL PROTECTED] 
        Sent: Thu 12/4/2003 1:07 PM 
        To: 'Struts Users Mailing List' 
        Cc: 
        Subject: Subclassing ActionServlet
        
        

        All,
        
        I need to check the Session for an authenticated user before most requests.
        To do this I subclassed ActionServlet and only call super(request, response)
        upon verification that authenticated user is in the Session.
        
        if (request.getRequestURI().endsWith("welcome.do") |
        request.getRequestURI().endsWith("logon.do") |
        request.getRequestURI().endsWith("html"))
                        {
                                super.process(request, response);
                        }
                       
                       
        else if (request.getSession().getAttribute("USER") == null)
                        {
                                //Forward to login page
                                response.sendRedirect("/welcome.do");
                        }
        
         I also know about the ability to subclass the RequestProcessor and
        providing my own implementation of the processPreprocess method to
        accomplish the same thing.
        
        Does anybody know of any serious disadvantages or side effects of
        subclassing the ActionServlet class rather than the RequestProcessor class.
        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to