Skip to content

Update documentation and XSD for mvc:default-servlet-handler [SPR-7545] #12202

@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits aab05c4, d8ecc76

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions