On 4/9/2015 3:18 PM, George Sexton wrote:


On 4/9/2015 1:10 PM, David kerber wrote:
You can argue about whether it's smart to map servlets into .html, but
again my reading of the spec is that unequivocally, if the request path
matches a deployed context, the request must be routed to the
context/container.

Then your reading is incorrect.  The spec only applies to requests
that reach the container in the first place.  If something else
handles it before it reaches the container, the spec is not applicable.


Allow me to re-quote the spec:

A ServletContext is rooted at a known path within a Web server. For
example, a servlet context could be located at
http://www.mycorp.com/catalog. All requests that begin with the /catalog
request path, known as the context path, are routed to the Web
application associated with the ServletContext.

The spec explicitly includes the phrase "known path within a web server"
and it explicitly also states "All requests that begin with the /catalog
request path, known as the context path, are routed to the Web
application associated with the ServletContext."

I don't see any conditionals that would allow violation of this. Arguing
otherwise is really not supported by the language.

There is no violation of this if a request never reaches the container in the first place. The spec only applies to the servlet container itself, not to the overall system of which it might be a part.




There are a lot of legitimate reasons to map "static" resources into
servlets. Things like images, graphs, CSS files, Javascript files, etc.

Certainly, and that's what I do.  But it's for convenience and ease of
configuration, not because it's what the spec requires. Other people
have other needs...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to