In Spring MVC (2.0) how can you easily hook multiple pages/urls to use 1 controller?
- by danny
<!--dispatcher file-->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/foo/bar/baz/boz_a.html">bozController</prop>
</props>
</property>
</bean>
<!--mappings file-->
<bean id="bozController" class="com.mycompany.foo.bar.baz.BozController">
<property name="viewPathA" value="foo/bar/baz/boz_a" />
<property name="viewPathB" value="foo/bar/baz/boz_b" />
...
<property name="viewPathZ" value="foo/bar/baz/boz_z" />
</bean>
how do I set it up so that when the user loads page boz_w.html it uses the bozController, and sets the viewPath to use boz_w.jsp?