In Struts 1 you could have, in struts-config.xml, a declaration like:
<action path="/first" forward="/second.do">
Is something similar also possible in Spring, or can I map an URL only to a controller? I am using Spring 2.5.x.
I could off course map the URL to the same controller as:
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/first.do">theController</prop>
<prop key="/second.do">theController</prop>
...
Or maybe use the org.springframework.web.servlet.mvc.ParameterizableViewController
and have something like:
<bean id="theDummyController" class="org.springframework.web.servlet.mvc.ParameterizableViewController">
<property name="viewName" value="forward:second.do"/>
</bean>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/first.do">theDummyController</prop>
<prop key="/second.do">theController</prop>
...
I know I could be complicating things and I should just stick to the simple stuff that gets the job done, but I would like this to be more like a statement of the kind: "this URL is in fact a shortcut (or alias) to this other URL" (don't ask why... long story...) which is somehow visible with the ParameterizableViewController
but not completely.
So, is this possible?
Thank you!