struts-config.XML中的解释
来源:互联网 发布:sql从大到小排序 编辑:程序博客网 时间:2024/05/22 10:37
在struts-config.XML中<controller>元素还提供另一个特性以控制<forward>元素的的name属性如何被解释。该<controller>元素用于联合<action>元素中input属性,如下所示:
<action path="/editCustomerProfile"
type="packageName.EditCustomerProfileAction"
name="customerProfileForm"
scope="request"
input="profile">
<forward name="profile" path="/CustomerProfile.jsp"/>
<forward name="sUCcess" path="/MainMenu.jsp"/>
</action>
<controller>
<set-property property="inputForward" value="true"/>
</controller>
上述的<action>元素包含一个input属性及一个向前名称;该前进名称与<forward>中的相同。在上述的<controller>配置中,当ActionForm.validate(…)返回一个非空或非null的ActionErrors对象,RequestProcessor将选择<forward>元素,其name属性与<action>元素的input属性拥有相同的值;除非用子类取代RequestProcessor,该行为是确认遇到错误的标准行为。对下面的<controller>元素声明,当ActionForm.validate(…)返回一个非空或非null的ActionErrors对象,input属性提供一个向前的URL以代替向前发生ActionForward的名称。在inputForward属性不存在时,这是默认的配置。
<!--
名称:controller
描述:用于配置ActionServlet
数量:最多一个
属性:
@bufferSize:指定上传文件的输入缓冲的大小.默认为4096
@className:指定当前控制器的配置类.默认为org.apache.struts.config.ControllerConfig
@contentType:指定相应结果的内容类型和字符编码
@locale:指定是否把Locale对象保存到当前用户的session中,默认为false
@processorClass:指定负责处理请求的Java类的完整类名.默认org.apache.struts.action.RequestProcessor
@tempDir:指定文件上传时的临时工作目录.如果没有设置,将才用Servlet容器为web应用分配的临时工作目录.
@nochache:true时,在相应结果中加入特定的头参数:Pragma ,Cache-Control,Expires防止页面被存储在可数浏览器的缓存中,默认为false
-->
<controller
contentType="text/html;charset=UTF-8"
locale="true"
processorClass="CustomRequestProcessor">
</controller>
- struts-config.XML中的解释
- struts中struts-config.xml文件解释
- struts-config.xml文件解释(二)
- struts-config.xml文件详细解释(一)
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- 深入了解struts中的struts-config.xml
- struts中的xml元素解释
- [j2ee]struts-config.xml 中的global-forwards
- struts-config.xml中的controller元素
- struts-config.xml文件中的contextRelative
- struts-config.xml中的controller元素
- 引用 struts-config.xml中的controller元素
- ASP.NET页面间的传值的几种方法
- 小议过滤器filter
- Servlets和JSP Pages最佳实践
- ASP.NET程序中常用的三十三种代码(第六页)
- 想上班了
- struts-config.XML中的解释
- ASP.NET程序中常用的三十三种代码(第五页)
- win mobile 5播放mp3音乐的方法(1)--libmad库的移植篇
- ASP.NET程序中常用的三十三种代码(第四页)
- win mobile 5播放mp3音乐的方法(2)--libmad库的使用篇
- 大型网站网页设计越简单越好
- win mobile 5播放mp3音乐的方法(3)--pcm码流播放篇
- DataGrid使用大全
- 逆转链表