OK. I realized, after going to somewhere near bottom of the spring mvc doc,
that I needed to have "/foo" in my url in order for the handler mapping to
work out.
mavenj wrote:
>
> Basically, I can't get MultiActionController to work and wondered if
> someone could see what I am doing incorrectly. I have an AppFuse Basic
> Spring MVC Archetype. I am extending MultiActionController, like so:
>
> import
> org.springframework.web.servlet.mvc.multiaction.MultiActionController;
> public class FooController extends MultiActionController {
> public ModelAndView action1(
> HttpServletRequest httpServletRequest,
> HttpServletResponse httpServletResponse)
> throws Exception {
> // do something for action1...
> return (new ModelAndView());
> }
> }
>
> My dispatcher config contains:
> <!-- foo bean -->
> <bean id="fooController" class="FooController">
> <property name="methodNameResolver" ref="paramResolver"/>
> </bean>
> <!-- resolvers -->
> <bean id="paramResolver"
> class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
> <property name="paramName" value="type"/>
> </bean>
> <bean id="viewResolver"
> class="org.springframework.web.servlet.view.InternalResourceViewResolver">
> <property name="requestContextAttribute" value="rc"/>
> <property name="viewClass"
> value="org.springframework.web.servlet.view.JstlView"/>
> <property name="prefix" value="/WEB-INF/pages/"/>
> <property name="suffix" value=".jsp"/>
> </bean>
>
> When I run the app and browse to
> http://localhost:8080/foo.html?type=action1, I see in the log:
>
> [myapp] WARN [btpool0-2] PageNotFound.noHandlerFound(1041) | No mapping
> for [/foo.html] in DispatcherServlet with name 'dispatcher'
>
> All of my other controllers follow the same naming convention
> (SomeController maps to some.jsp via some.html) and either implement
> org.springframework.web.servlet.mvc.Controller or extend
> org.appfuse.webapp.controller.BaseFormController for form... What am I
> doing wrong with this MultiActionController?
>
> Thanks.
>
--
View this message in context:
http://www.nabble.com/Using-MultiActionController-tf4793057s2369.html#a13712061
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]