Struts中的常量
以下是Struts中常量的一些经常使用配置,保存下来留作积累吧。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- 把它设置为开发模式,公布时要设置为false -->
<constant name="struts.devMode" value="true" />
<!-- 设置在class被改动时是否热载入,公布时要设置为false -->
<constant name="struts.convention.classes.reload" value="true"/>
<!-- 自己主动动态方法的调用,使用这个设置后能够这样调用:action!method -->
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<!-- 指定jsp文件所在的文件夹地址 -->
<constant name="struts.convention.result.path" value="/WEB-INF/content/" />
<!-- 使用struts-default默认的转换器。假设是rest的使用:rest-default,rest须要rest的jar插件 -->
<constant name="struts.convention.default.parent.package" value="struts-default"/>
<!-- 用于配置包名后缀。 默觉得action、actions、struts-->
<constant name="struts.convention.package.locators" value="actions" />
<!-- 用于配置类名后缀,默觉得Action,设置后。Struts2仅仅会去找这样的后缀名的类做映射 -->
<constant name="struts.convention.action.suffix" value="Action"/>
<!-- 设置即使没有@Action凝视,依旧创建Action映射。 默认值是false。由于Convention-Plugin是约定优于配置的风格,
能够不通过注解依据预先的定义就能訪问对应Action中的方法 -->
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<!-- 自己定义jsp文件命名的分隔符 -->
<constant name="struts.convention.action.name.separator" value="-" />
<!-- 国际化资源文件名 -->
<constant name="struts.custom.i18n.resources" value="i18n" />
<!-- 是否自己主动载入国际化资源文件 -->
<constant name="struts.i18n.reload" value="true" />
<!-- 浏览器是否缓存静态内容 -->
<constant name="struts.serve.static.browserCache" value="false" />
<!-- 上传文件限制大小设置 -->
<constant name="struts.multipart.maxSize" value="-1" />
<!-- 主题。将值设置为simple,即不使用UI模板。这将不会生成额外的html标签 -->
<constant name="struts.ui.theme" value="simple" />
<!-- 编码格式 -->
<constant name="struts.i18n.encoding" value="UTF-8" />
<!-- 自己主动载入xml配置不用重新启动tomcat -->
<constant name="struts.configuration.xml.reload" value="true" />
</struts>
Struts中的常量的更多相关文章
- struts中的常量,action配置中的默认值
1.struts中Action的开发方式 继承ActionSupport类,这种方法实现的Action可以进行数据校验: 实现Action接口: 不继承任何类,不实现任何接口: 是否继承类或实现接口, ...
- Action开发、通配符、路径问题和struts中常量用法
1.action开发 开发的几种方式 (1).继承自ActionSupport,(如果用struts的数据效验功,能必须必须使用此功能,因为ActionSupport实现了数据效验的接口) publi ...
- struts配置中的常量定义
一.常量可以在struts.xml或struts.properties中配置,建议在struts.xml中配置,两种配置方式如下: (1)在struts.xml文件中配置常量 <struts&g ...
- struts2中的常量
struts2中的常量: 在:struts2-core-2.1.8.1\org\apache\struts2\default.properties 文件里 <!-- 配制i18n国际化--> ...
- Struts中文件的上传与下载
前面学到的用组件去上传 前台: 1.post表单提交 2.表单类型 multipart/form-data 3.intput type=file 后台: Apach提供的FileUpload组件 核心 ...
- 转载-struts中logic标签使用
Struts中Logic逻辑标签的作用及用法 Struts中Logic逻辑标签的作用及用法 2006年10月18日 星期三 21:34 Terry原创,转载请说明作者及出处 Logic标签大部分的功能 ...
- 在php中定义常量时,const与define的区别?
问]在php中定义常量时,const与define的区别? [答]使用const使得代码简单易读,const本身就是一个语言结构,而define是一个函数.另外const在编译时要比define快很 ...
- C++中指针常量和常量指针的区别
在C++学习使用过程中,每个人都不可避免地使用指针,而且都或多或少的接触过常量指针或指针常量,但是对这两个的概念还是很容易搞糊涂的. 本文即是简单描述指针常量和常量指针的区别. 常量指针 定义: 又叫 ...
- Struts中的OGNL和EL表达式笔记
Struts中的OGNL和EL表达式笔记 OGNL(Object-Graph Navigation Language),可以方便的操作对象属性的表达式语言. 1.#符号的用途 一般有三种方式: 1.1 ...
随机推荐
- HUST 1017 Exact cover(DLX精确覆盖)
Description There is an N*M matrix with only 0s and 1s, (1 <= N,M <= 1000). An exact cover is ...
- golang slice切片的原理以及内置函数cap, len
golang中slice(切片)是常用的类型, slice是对数组进行封装 package main import ( "fmt" "strconv") fun ...
- shader内置变量
内置变量都在UnityShaderVariables.cginc文件中声明 变换矩阵 All these matrices arefloat4x4 type. Name Value UNITY_MAT ...
- Struts2 S标签 数目字格式化成金额输出(保留两位小数)
JSP: <s:property value="%{formatDouble(price)}" /> Action:添加 //格式化数字显示 public String ...
- Ip和long互转
// <summary> /// 将127.0.0.1形式的IP地址转换成十进制整数 /// </summary> /// <param name="strIp ...
- [Linux] Systemd 入门教程:实战篇
reference : http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-part-two.html 上一篇文章,我介绍了 Systemd ...
- Android触摸事件
简单介绍: 做了一个语音发送UI的小demo. 按下显示语音窗体,依据音量调节UI音量显示,上划至窗体显示取消发送. 原理: 1:获取什么事件来运行操作: 给Button加入setOnTouchLis ...
- Servlet监听器统计在线人数
监听器的作用是监听Web容器的有效事件,它由Servlet容器管理,利用Listener接口监听某个执行程序,并根据该程序的需求做出适应的响应. 例1 应用Servlet监听器统计在线人数. (1)创 ...
- 配置sonarqube+maven
Maven与Sonar配合使用 准备工作:下载sonarqube源码即可 步骤: 1).安装sonar 解压,启动sonarqube-4.1\bin\windows-x86-32目录下的 ...
- 【Python】Django删除数据迁移记录
find . -path "*migrations*" -name "*.py" -not -path "*__init__*" -exec ...