struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aapo Laakkonen" <aapo.laakko...@projectcast.com>
Subject Re: subclassing ActionServlet for session validation?
Date Sun, 11 Nov 2001 19:20:05 GMT
I did it something like this:

public abstract class BaseAction extends Action
{

    public ActionForward perform(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
    throws IOException, ServletException
    {

    // put here your user validation code... and if user is not valid then:
    // return (mapping.findForward("logoff"));
    // else:

     return (performAction(mapping, form, request, response));
 }

public abstract ActionForward performAction(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response) throws
IOException, ServletException;
}

I think that I got this idea from one of Ted's papers.


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message