Announcement Announcement Module
Collapse
No announcement yet.
map url with path info Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • map url with path info

    I have a url with the following format /songHandler.do/a/b/c

    I want to map this to the songHandler bean. The songHandler bean maps to a controller class. I'd like to get the pathInfo "a/b/c" in the controller class.

    How do I modify web.xml and applicationContext to make it happen? I used SimpleUrlHandlerMapping. But, did not seem to work

    Code:
    <bean id="songHandlerMapping"
        class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"
        abstract="false" singleton="true" lazy-init="default" autowire="default"
        dependency-check="default">
        <property name="alwaysUseFullPath" value="true"/>
        <property name="urlMap">
          <map>
            <entry key="/songHandler.do/*">
              <ref local="songHandler" />
            </entry>
          </map>
        </property>
      </bean>
Working...
X