You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mladen Turk <mt...@mappingsoft.com> on 2002/10/02 11:17:44 UTC

[JK2] uriMap processing, need some opinions

Hi,

Having some trouble clarifying uriMap processing.


Situation 1:

[uri:/examples/*]

The context is /

Situation 2:

[uri:/examples/*]
context=/ex

The context is /ex

Situation 3:

[uri:/examples/*]
context=/examples

The context is /examples


Now since all situations need the /examples/ as a prefix match, (to be
able to sepate things like /examples/servlet/ uri with
/examples/servlests/* mapping). We have a problem accesing /examples
(without a trailing slash).

The third situation can be solved returning context if no match is found
and the uri equals to context. Is this right thing to do, and could it
be used even before the prefixMatch?.

The other two situations having context different then a uri could be
solved by adding the trailing slash to the uri (in case there isnt one)
and doing prefix match again.


So:
Situation 1 and 2:
uriRequest /examples will find context '/' and no match, and since it
doesn't ends with the trailing slash it will be added and we'll rerun
prefixMatch returning /examples/ inside the root context.

Situation 3:

uriRequest /examples will find context '/examples' and no match, and
since it doesn't ends with the trailing slash it will be added and we'll
rerun prefixMatch returning /examples/ inside the '/examples' context.


MT.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>