struts架构中为ActionForm添加表单验证功能时遇到的一个问题

java.lang.IllegalArgumentException: Path register.jsp does not start with a “/” character

解决方法:

<!– 配置Action映射时 –>
<action-mappings>
<action path=”/register” parameter=”method” name=”registerForm” type=”struts.actions.RegisterAction” input=”/register.jsp”>
<forward name=”success” path=”/login.jsp”></forward>
<forward name=”failure” path=”/register.jsp”></forward>
</action>
</action-mappings>

register.jsp前面加上/符号

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>