tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51894] Dynamic includes (with jsp:include or in Java code) of static content fails with Spring + Tomcat
Date Tue, 27 Sep 2011 00:30:44 GMT

--- Comment #5 from Konstantin Kolinko <> 2011-09-27 00:30:44
UTC ---
Please provide a WAR file (without Spring libraries - those can be downloaded),
so that it can be tested.

Thus I cannot test the app itself. Testing the views and reviewing
configuration instead.

1. Accessing the views directly does work. Forwarding to your views works as
well (that is what DispatcherServlet does when displaying a view).
So it is a problem with your configuration.

2. You mapped DispatcherServlet to <url-pattern>/</url-pattern>. It is wrong,
because it conflicts with mapping of DefaultServlet (in conf/web.xml).

In short: DefaultServlet is the servlet that is used to serve static files. In
your configuration the nested request to helloWorld.html is served not by
DefaultServlet but by DispatcherServlet.

Whatever happens in this case is beyond my scope.
IIRC in such cases DispatcherServlet responds with HTTP response code 400
(wrong request), because it cannot map request to proper controller.

Closing as INVALID: you should fix your mapping for static resources.
For example, configure org.apache.catalina.servlets.DefaultServlet explicitly
and map it to *.html URLs.  Or change the mapping for DispatcherServlet so that
there would not be a conflict.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message