tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat mapping of URLs -> servlets
Date Wed, 03 Dec 2008 16:02:22 GMT
Mark Thomas wrote:
> André Warnier wrote:
>> Mark Thomas wrote:
>>> André Warnier wrote:
>>>> Then I guess I have (at least) 2 webapps : a "/foo" webapp, and a
>>>> "/foo/bar" webapp.
>>>>
>>>> Now a request comes in with the url "/foo/bar/baz/various.jsp"
>>>>
>>>> How does Tomcat determine that /foo/bar/baz is not itself a webapp, but
>>>> merely a sub-dir of webapp "/foo/bar" ?
>>> The longest context path always wins. So in this case any request to
>>> /foo/bar/... will always be handled by the /foo/bar webapp.
>>>
>> I guess I wasn't clear enough in my question.
>>
>> What I meant to ask was : considering the apparent path of the URL is
>> "/foo/bar/baz/", how/why does Tomcat "give up" on the "/foo/bar/baz"
>> (potential) webapp path, and attribute this to the "/foo/bar" webapp.
>>
>> Of course, you and me know that there is no webapp in "/foo/bar/baz",
>> but we're smart humans who can just see this at a glance.
>> But how Tomcat know ?
>> Because there is no WEB-INF there, right now when it checks ? or because
>> of something we did/did not tell him earlier ?
> 
> It maintains an internal list of deployed contexts (web apps) and their
> associated paths so it knows there is no /foo/bar/baz webapp.
> 
At the risk of heavily insisting, but it seems we've now moved the issue 
back to the webapp deployment time, but not really solved it.
At deployment time thus (in my hypothetical case above when Tomcat 
starts and finds a such webapps top dir), does it recursively go through 
the webapp dirs and subdirs, to determine what is a webapp and what is not ?

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message