Subject: Re: Using Struts with filters
From: Vic Cekvenich <[EMAIL PROTECTED]>
 ===
Follow J2EE JAS Container based security is an alternative.

Daniel Steinberg wrote:

> I would like to put my authorization logic in a servlet filter.  If
> authorization fails, I would like to display an error page by forwarding to
> a JSP.  I would like to look up this JSP name just as I would while
> performing a Struts action.  
> 
> Unfortunately, the forward mappings (ActionForwards) are attached to the
> ActionServlet, and the filter knows nothing about the servlet.  It seems
> that my best bet at this point is to override ActionServlet.initOther() and
> attach the ActionForwards object to the servlet context.  My filter
> (assuming that the servlet has already been loaded) can then get the servlet
> context from the filter config and can get the ActionForwards from there.
> 
> Does anyone have any better ideas?  Would it make sense, in a future of
> revision of Struts, to attach automatically attach all of the configuration
> information to the servlet context, so that it will be available to filters
> and listeners?
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


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

Reply via email to