struts简单案例-适合初学者(三) - 编程入门网
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-15
========================== –> <form-beans> <!– Logon form bean –> <form-bean name=”departmentForm” type=”cn.haose.struts.presentation.DepartmentForm”> </form-bean> </form-beans> <!– ========== Action Mapping Definitions ============================== –> <action-mappings> <action path=”/create” type=”cn.haose.struts.presentation.CreateDepartmentAction” name=”departmentForm” scope=”request” input=”/create/register.jsp”> <forward name=”success” path=”/create/success.jsp”/> <forward name=”failure” path=”/create/failure.jsp”/> </action> <action path=”/list” type=”cn.haose.struts.presentation.ListDepartmentAction” > <forward name=”success” path=”/list/departmentList.jsp”/> <forward name=”failure” path=”/list/failure.jsp”/> </action> <action path=”/select” type=”cn.haose.struts.presentation.SelectDepartmentAction” > <forward name=”success” path=”/update/update.jsp”/> <forward name=”failure” path=”/update/failure.jsp”/> </action> <action path=”/delete” type=”cn.haose.struts.presentation.DeleteDepartmentAction” > <forward name=”success” path=”/list.do”/> <forward name=”failure” path=”/update/failure.jsp”/> </action> <action path=”/update” type=”cn.haose.struts.presentation.UpdateDepartmentAction” name=”departmentForm” scope=”request” input=”/update/update.jsp”> <forward name=”success” path=”/list.do”/> <forward name=”failure” path=”/update/failure.jsp”/> </action> </action-mappings> <!– ========== Message Resources Definitions =========================== –> <message-resources parameter=”ApplicationResources”/> </struts-config> web.xml. <?xml version=”1.0″ encoding=”UTF-8″?> <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”> <web-app id=”WebApp”> <display-name>sample</display-name> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!– Action Servlet Mapping –> |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于struts简单案例-适合初学者(三) - 编程入门网的所有评论