> if matchingWelcomeFile.contains("/"):
>   # psycopathic case no one cares about ( ie. welcome file is a/b.jsp )
>   redirect, old style //we show the filename here, but if we didn't we'd
> break relative paths
> else:
>   if path.endsWith("/"):
>     # happy, smiley family case
>     redispatch, using welcome-file full path (ie. /foo/index.jsp ) for
> security checking

This redirect may cause problems, because it will happen regardless of
whether or not the path exist (or it makes sense to redirect).

Example:
You have index.jsp and index.html in the welcome files. No matter what you
do,
the request will always be redirected to Jasper, which will always return a
404. Checking for the presence of the physical file won't work either
(you could have a *.do mapping like Struts uses).

Any idea to avoid that problem ?

Also, the changes are going to make the mapping slower. I plan to refactor
that
operation (use an automaton and bytes instead of String manipulations) in
the
next major version of Tomcat, which should help tremendously, but until
then ...

>   else:
>     if adding slash causes a servlet mapping match:
>       # we handle the stupid case of having two servlet mappings
>       # ( /foo and /foo/ ) in web.xml.
>       redirect, old style //we show the filename here, but if we didn't
> we'd call the wrong servlet
>     else:
>       redirect, adding "/" ( ie. redirect /foo to /foo/ )

Remy


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

Reply via email to