Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Alpha3
-
Fix Version/s: 2.0-Alpha3
-
Component/s: Samples
-
Labels:None
-
Environment:ICEpush
Description
Images and CSS files are not being served by the icechat-spring demo.
Spring DispatcherServlet is mapped to "/" to provide REST URLs in the application, but this interferes with default static resource serving:
<servlet>
<servlet-name>chat</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>chat</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
It is possible to map *.jpg, *.css to the Servlet named "default", but this is only provided by Tomcat.
A portable method should use Spring dispatch.