以下是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中的常量的更多相关文章

  1. struts中的常量,action配置中的默认值

    1.struts中Action的开发方式 继承ActionSupport类,这种方法实现的Action可以进行数据校验: 实现Action接口: 不继承任何类,不实现任何接口: 是否继承类或实现接口, ...

  2. Action开发、通配符、路径问题和struts中常量用法

    1.action开发 开发的几种方式 (1).继承自ActionSupport,(如果用struts的数据效验功,能必须必须使用此功能,因为ActionSupport实现了数据效验的接口) publi ...

  3. struts配置中的常量定义

    一.常量可以在struts.xml或struts.properties中配置,建议在struts.xml中配置,两种配置方式如下: (1)在struts.xml文件中配置常量 <struts&g ...

  4. struts2中的常量

    struts2中的常量: 在:struts2-core-2.1.8.1\org\apache\struts2\default.properties 文件里 <!-- 配制i18n国际化--> ...

  5. Struts中文件的上传与下载

    前面学到的用组件去上传 前台: 1.post表单提交 2.表单类型 multipart/form-data 3.intput type=file 后台: Apach提供的FileUpload组件 核心 ...

  6. 转载-struts中logic标签使用

    Struts中Logic逻辑标签的作用及用法 Struts中Logic逻辑标签的作用及用法 2006年10月18日 星期三 21:34 Terry原创,转载请说明作者及出处 Logic标签大部分的功能 ...

  7. 在php中定义常量时,const与define的区别?

    问]在php中定义常量时,const与define的区别?  [答]使用const使得代码简单易读,const本身就是一个语言结构,而define是一个函数.另外const在编译时要比define快很 ...

  8. C++中指针常量和常量指针的区别

    在C++学习使用过程中,每个人都不可避免地使用指针,而且都或多或少的接触过常量指针或指针常量,但是对这两个的概念还是很容易搞糊涂的. 本文即是简单描述指针常量和常量指针的区别. 常量指针 定义: 又叫 ...

  9. Struts中的OGNL和EL表达式笔记

    Struts中的OGNL和EL表达式笔记 OGNL(Object-Graph Navigation Language),可以方便的操作对象属性的表达式语言. 1.#符号的用途 一般有三种方式: 1.1 ...

随机推荐

  1. mysql安装三 linux源码安装mysql5.6.22

    http://blog.csdn.net/beiigang/article/details/43053803

  2. MVC文件上传02-使用HttpPostedFileBase上传多个文件

    本篇体验上传多个文件.兄弟篇为: MVC文件上传01-使用jquery异步上传并客户端验证类型和大小           MVC最基本上传文件方式中的一个遗漏点 □ 前台视图部分 1: <% u ...

  3. .NET:“事务、并发、并发问题、事务隔离级别、锁”小议,重点介绍:“事务隔离级别"如何影响 “锁”?

    备注 我们知道事务的重要性,我们同样知道系统会出现并发,而且,一直在准求高并发,但是多数新手(包括我自己)经常忽略并发问题(更新丢失.脏读.不可重复读.幻读),如何应对并发问题呢?和线程并发控制一样, ...

  4. .NET:CLR via C# User-Mode Constructs

    The CLR guarantees that reads and writes to variables of the following data types are atomic: Boolea ...

  5. python笔记25-mock-server之moco

    前言 mock除了用在单元测试过程中,还有一个用途,当前端开发在开发页面的时候,需要服务端提供API接口 此时服务端没开发完成,或者说没搭建测试环境,这个时候前端开发会自己mock一个api服务端,自 ...

  6. CALayer(持续更新)

    CALayer The CALayer class manages image-based content and allows you to perform animations on that c ...

  7. Tomcat6内存不足问题及解决方法

    1.Tomcat默认可以使用的内存为128MB,在较大型的应用项目中,这点内存是不够的,有可能导致系统无法运行.常见的问题是报Tomcat内存溢出错误,Out of Memory(系统内存不足)的异常 ...

  8. 深度学习研究组Deep Learning Research Groups

    Deep Learning Research Groups Some labs and research groups that are actively working on deep learni ...

  9. UVA 10194 (13.08.05)

    :W Problem A: Football (aka Soccer)  The Problem Football the most popular sport in the world (ameri ...

  10. go语言基础之copy的使用

    1.copy的使用 示例: package main //必须有个main包 import "fmt" func main() { srcSlice := []int{1, 2} ...