jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <li...@ehatchersolutions.com>
Subject [PATCH] Re: ServletRedirector mapping
Date Wed, 07 Nov 2001 11:14:23 GMT
I guess I was just looking at outdated documentation then.  Note at the
bottom of this page: http://jakarta.apache.org/cactus/howto_config.html it
shows:

    <url-pattern>/ServletRedirector/</url-pattern>

That should be corrected.  I'll even go one step further and submit a patch!
:)

    Erik


----- Original Message -----
From: "Vincent Massol" <vmassol@octo.com>
To: "Cactus Users List" <cactus-user@jakarta.apache.org>
Sent: Wednesday, November 07, 2001 4:09 AM
Subject: Re: ServletRedirector mapping


>
>
> ----- Original Message -----
> From: "Erik Hatcher" <lists@ehatchersolutions.com>
> To: <cactus-user@jakarta.apache.org>
> Sent: Monday, November 05, 2001 9:30 PM
> Subject: ServletRedirector mapping
>
>
> > This might be a cactus-dev issue, but I'll toss it out here since all
> > relevant parties are on this list also.  In order to get Cactus working,
I
> > had to modify the servlet mapping to have "/*" rather than "/" at the
end
> of
> > ServletRedirector, like this:
> >
> >     <servlet-mapping>
> >         <servlet-name>ServletRedirector</servlet-name>
> >         <url-pattern>/ServletRedirector/*</url-pattern>
> >     </servlet-mapping>
> >
> > Servlet 2.2 spec says this:
> >
> > 10.2 Specification of Mappings
> > In the web application deployment descriptor, the following syntax is
used
> > to define mappings:
> > . A string beginning with a '/' character and ending with a '/*' postfix
> is
> > used as a path mapping.
> > . A string beginning with a '*.' prefix is used as an extension mapping.
> > . All other strings are used as exact matches only
> > . A string containing only the '/' character indicates that servlet
> > specified by the mapping becomes the "default" servlet of the
application.
> >
> > So it seems the Cactus mapping of ServletRedirector is not compliant
with
> > the spec.  A quick glance at the Servlet 2.3 spec appears to say the
same
> > thing as the 2.2 spec.
> >
> > Is there any reason not to put the "/*" at the end?  It makes it work in
> > WebSphere at least!  :)  Are all the other containers Cactus just
implying
> > the "*"?
>
> I have tried Cactus on 10 different servlet engines and they all worked
with
> "/ServletRedirector" (forget "/ServletRedirector/" which is no longer
valid
> in Cactus 1." - and doesn't work if you're passing parameters). The reason
> is that the ServletRedirector is not meant as a path but as the last
element
> in the URL (exact match). So "/ServletRedirector/*" would work but would
> fire for urls such as ".../ServletRedirector/something/other?xxx=yyy".
> However, we want the last element in the URL to be the redirector. so
> "/ServletRedirector" should work on all engines.
>
> > I haven't dug into Cactus code to see how it fires things to the
> > ServletRedirector - is it sending a GET string to it?  Or just hitting
> > /ServletRedirector directly using POST and now URL parameters?
> >
>
> it uses the url in cactus.properties and either a post or get depending on
> whether the user has set post parameters in WebRequest.
>
> > Thanks,
> >     Erik
> >
>
> Thanks
> -Vincent
>
>
> --
> To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>
>
>

Mime
View raw message