Spring中的Multiaction Controller问题

时间:2013-03-25 09:21:35

标签: spring spring-mvc

我有一个jsp页面,我必须将控件传递给下一页。 我正在使用Multiaction Controller,但它给了我一个错误404.

我的JSP文件是

<form id="form1" name="form1" method="post"  action="registerSuccessControl.htm" commandName="register" >
        <strong> <label> <label> <label>
                        <div align="center">Registeration</div>
                </label></strong> <label></label>
        <h1>&nbsp;</h1>
        <p>
            First Name <input type="text" name="textfield" accesskey="1"
                tabindex="1" /> <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;Last Name</label> <strong> <input type="text"
                name="textfield3" />
            </strong>
        </p>

这是我的控制器

@RequestMapping("/registerSuccessControl.htm")
    public ModelAndView registerSuccessControl(@ModelAttribute("register") Register register,BindingResult brResult,HttpServletRequest request,HttpServletResponse response) throws Exception {
        System.out.println("RegisterSuccesssControl called");
        //logger.debug("Registration Page Accessed at "+new Date());
        System.out.println("I am In registerSuccess");

        RegistrationValidator uValidator=new RegistrationValidator();       
        uValidator.validate(register,brResult);     
        HashMap<String, BindingResult> resultMap = new HashMap<String, BindingResult>();
        if(brResult.hasErrors()){           
            resultMap.put("errors", errors);
            return new ModelAndView("Register",resultMap);
        }
        else 
            return new ModelAndView("Firm");
}

我在同一个控制器中处理了其他请求并且工作正常,但它不适用于此链接。

0 个答案:

没有答案