Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-7545

Update documentation and XSD for mvc:default-servlet-handler

    Details

    • Type: Task
    • Status: Closed
    • Priority: Trivial
    • Resolution: Complete
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.0.5
    • Component/s: Web
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbeams Chris Beams
                Reporter:
                jamestastic James Earl Douglas
                Last updater:
                Trevor Marshall
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  7 years, 36 weeks, 6 days ago