首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

struts1.2的action参数配备

2012-09-21 
struts1.2的action参数配置struts-config??? form-beans??????? form-bean namebaseForm typeja

struts1.2的action参数配置

<struts-config>
??? <form-beans>
??????? <form-bean name="baseForm" type="jade.struts.form.BaseForm"/>
??? </form-beans>

??? <action-mappings>
??? <!-- 关注action的配置 -->
??????? <action path="/customer/customer_action"? //请求url
??? ??? name="baseForm"? //该Action绑定的ActionForm(存放请求参数)
??? ??? validate="false"? //是否执行ActionForm中的validate方法来校对请求参数,缺省为true
??? ??? input="/error.jsp"? //当Bean发生错误时返回的路径
??? ??? scope="request"? //指定ActionForm的作用域,可选值有request和session,缺省为session
??????????????? type="cn.com.pc.groupbuy.action.CustomerAction"? //请求处理类
??? ??? parameter="method">? //用url参数指定处理方法。如:/user.do?method=execute将调execute方法
??????????? <forward name="list"? //逻辑视图名(ActionForward对象值),如:mapping.findForward("list")
??? ??? path="/WEB-INF/pages/customer/customer_list.jsp"? //视图
??? ??? redirect="false"/>? //是否重定向(默认值为false)
??????? </action>
??? </action-mappings>
</struts-config>

热点排行