Alternatively, you could design your application such that all requests *do*
go through the controller. Note that this is a prerequisite in any case, if
you want to take advantage of the multi-app functionality available in
Struts 1.1.

It's possible that Servlets 2.4 will allow for a filter-based solution to
this problem. However, there are still solutions available to us under
Servlets 2.3, even if they may seem less than ideal.

--
Martin Cooper


----- Original Message -----
From: "Mark Abbott" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Sunday, April 07, 2002 9:06 PM
Subject: Re: Servlet 2.3 filter


> Nonetheless, a filter mapped to all requests to perform
> path rewriting would seem to always be needed to catch
> requests for static resources or any other requests not
> coming into the controller. While it seems from your examples
> that there are also ways to get that same rewriting performed
> within the framework where needed, it's unfortunate that simply
> putting the filter in place for all requests isn't enough.
>
>          Mark
>
> At 08:55 PM 4/7/2002, Martin Cooper wrote:
>
> >One way I have seen this addressed is to use an Action to make the
decision.
> >Instead of forwarding to "foo.jsp" directly, you forward to another
action.
> >That action composes the path to the appropriate JSP page, using
knowledge
> >of the base page name and the variant, locale and markup, and then
forwards
> >to that path.
> >
> >Alternatively, you could extend Action and add a method to perform the
path
> >composition. Then you would call this new method (composeForward(),
perhaps)
> >at the end of your execute() method, instead of making the typical call
to
> >mapping.findForward(). This approach has the advantage that
composeForward()
> >can take advantage of any logical forwards you have defined for the
action,
> >so that those forwards can be used to provide the base name for JSP page
> >(e.g. foo.jsp).
>
>
>
>
> --
> 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