-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
James Earl Douglas opened SPR-7545 and commented
It seems that the default-servlet-handler tag has not yet been added to the schema at http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd.
For now, I can get the expected feature by manually adding a DefaultServletHttpRequestHandler bean to my context, a la DefaultServletHandlerBeanDefinitionParser:
<bean class="org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler" />
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<util:map>
<entry key="/**"
value="org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler" />
</util:map>
</property>
</bean>
<bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />
Furthermore, forcing <mvc:default-servlet-handler /> into my configuration does work, though Eclipse still finds it in error.
It appears that the related documentation is out of sync with the API. The documentation discusses the DefaultServletHttpHandler, but the class appears to be named DefaultServletHttpRequestHandler. Reference: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-default-servlet-handler
Affects: 3.0.4
Reference URL: http://forum.springsource.org/showthread.php?p=318747#post318747
Issue Links:
- Publish spring-mvc-3.0.xsd [SPR-7555] #12212 Publish spring-mvc-3.0.xsd