对应action里面增加对cancel按钮的处理方法 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (isCancelled(request)) { return mapping.findForward("welcome"); } return mapping.findForward("success"); } struts-config.xml中的action增加对应属性 <action attribute="addForm" input="/add.jsp" name="addForm" path="/add" scope="request" type="com.jinchun.struts.action.AddAction"> <set-property property="cancellable" value="true" /> <forward name="success" path="/index.jsp" redirect="true" /> </action>
&amp;lt;html:cancel cancel 取消按钮事件处理
最新推荐文章于 2022-05-24 16:14:01 发布