Announcement Announcement Module
Collapse
No announcement yet.
multiaction controller URL issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiaction controller URL issue

    Hi,

    I have a form created using SimpleFormController, When I am submitting the form the successview is opening with old URL in addressbar, because of which my successview controller method (multiactioncontroller) is not executed

    Code:
     formView=jsp1
        successView=jsp2
    I am using the code below:

    Code:
        protected ModelAndView onSubmit(HttpServletRequest aRequest,
            HttpServletResponse aResponse, Object aCommand, BindException aErrors)
            throws Exception {
    
            ModelAndView mv = super.onSubmit(aRequest, aResponse, aCommand, aErrors);
            mv.setViewName(getSuccessView());
    
            return mv;
        }
    When I hit submit on form page(jsp1) then after processing it opens the jsp2 page but the url it show inside the address bar is of jsp1.
    Because of which my multiactioncontroller method configured for jsp2 not executed.



    Please help.

  • #2
    You shouldn't show a view you should redirect to the url of the controller. The view is handled directly by the ViewResolver and is not doing anything with the backend/controllers.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      You shouldn't show a view you should redirect to the url of the controller. The view is handled directly by the ViewResolver and is not doing anything with the backend/controllers.
      Thanks Marten
      it works for me

      Comment

      Working...
      X