第八章 指定Struts 2处理的请求 <constant>常用常量
来源:互联网 发布:bilibili下载mac 编辑:程序博客网 时间:2024/05/24 05:32
修改action的后缀
<struts> <constant name="struts.action.extension" value="do"/> //修改action的后缀<package name="itcast" namespace="/control/employee" extends="struts-default"><action name="list" class="cn.itcast.action.HelloWorldAction" method="execute"><param name="savepath">/images</param> //为action注入值<result name="success">/WEB-INF/page/message.jsp</result></action></package></struts>
注意:struts.xml中修改了action的后缀为do或者action,web.xml里也要相应的修改
<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping></web-app>
常用常量:
指定默认编码集,作用于HttpServletRequest的setCharacterEncoding方法和freemarker、velocity的输出
<constant name="struts.i18n.encoding" value="UTF-8"/>
设置浏览器是否缓存静态内容,默认值为true(生产环境下使用),开发阶段最好关闭
<constant name="struts.serve.static.browserCache" value="false"/>
当struts配置文件修改后,系统是否自动重新加载该文件,默认false,开发阶段最好打开
<constant name="struts.configuration.xml.reload" value="true"/>
开发模式下使用,可以打印更详细的错误信息
<constant name="struts.devMode" value="true">
默认的视图主题
<constant name="struts.ui.theme" value="simple"/>
与spring集成时,指定由spring负责action对象的创建
<constant name="struts.objectFactory" value="spring"/>
是否支持动态方法调用,默认true
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
上传文件大小的限制
<constant name="struts.multipart.maxSize" value="10701096"/>
- 第八章 指定Struts 2处理的请求 <constant>常用常量
- Struts2 指定需要Struts 2处理的请求后缀-定义常量
- Struts2_指定Struts2处理的请求后缀、常用常量
- Struts 2 constant 常量配置
- stuts2学习笔记------指定需要struts2处理的请求后缀&细说常量定义&常用常量介绍
- 【Struts2学习笔记(4)】指定需要Struts 2处理的请求后缀和细说常量定义
- struts2常用的常量constant
- 常用的常量介绍<constant>
- struts2常用的常量constant
- 指定需要Struts 2处理的请求后缀
- struts2常用的常量constant(转)
- struts2 常用的常量介绍<constant
- Struts 2处理的请求后缀与常量定义和介绍
- struts框架<constant>常量配置
- struts 常用的constant作用和配置
- struts 常用的constant作用和配置
- [Struts]Struts2 - 常用的constant总结
- 传智Struts2笔记(6)指定需要Struts 2处理的请求后缀
- 第四章 Action名称的搜索顺序
- 第五章 Action配置的各项默认值
- LeetCode:Roman to Integer
- 第六章 result配置的各种视图转发类型
- 第七章 为Action属性注入值
- 第八章 指定Struts 2处理的请求 <constant>常用常量
- 整数平方根的计算(一)
- C# 中的委托和事件
- C#中的委托和事件(续)
- 第九章 _Struts2的处理流程与Action的管理方式
- 第十章 为应用指定多个配置文件
- 第11章 动态方法调用和使用通配符定义action
- 第十二章 请求参数的接收
- 第十三章 自定义类型转换器