Hello,
I have exactly 1 Controller that I want to pick up any request. Since I want to put information in the URL (as opposed to parameters), and I want to be able to start this info from the root (eg http://hostname/info/moreinfo/...), I came up with the following mapping:
The problem is, that when I want to show a View, it is again picked up by the Controller (since it matches /*). How can I avoid this? Is this behaviour at all desirable? I would think that by the time you decide to show a View, you are beyond matching Controllers.Code:<bean name="showCategoryController" class="favorites.www.ShowCategoryController"> <property name="bookmarkService" ref="bookmarkService"/> </bean> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/*">showCategoryController</prop> </props> </property> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix"> <value>/WEB-INF/jsp/</value> </property> <property name="suffix"> <value>.jsp</value> </property> <property name="viewClass"> <value>org.springframework.web.servlet.view.JstlView</value> </property> </bean>
Jeroen


Reply With Quote