struts2 较常用的配置

来源:互联网 发布:淘宝编辑宝贝 编辑:程序博客网 时间:2024/05/18 18:02

  一、4个开发模式简介:

 

  1、开启使用开发模式,详细错误提示 
           <constant name="struts.devMode" value="true"/>

 

    2、指定每次请求到达,重新加载资源文件 
     <constant name="struts.i18n.reload" value="true"/> 

 

    3、指定每次配置文件更改后,自动重新加载
    <constant name="struts.configuration.xml.reload" value="true"/>

 

   4、 指定XSLT Result使用样式表缓存
      <constant name="struts.xslt.nocache" value="true"/>

 

<constant name="struts.i18n.encoding" value="UTF-8" />字符集

<constant name="struts.convention.action.packages" value="cn.jingmin.web" /> 只搜索特定package下的Action

<constant name="struts.convention.result.path" value="/WEB-INF/context" /> 指定加载页面的目录

<constant name="struts.convention.relative.result.types" value="dispatcher,velocity,freemarker" />返回的页面类型

<constant name="struts.convention.exclude.packages" value="" />忽略某些包

<constant name="struts.convention.package.locators" value="" /> Convention默认的根packages

<constant name="struts.convention.classes.reload" value="true" />

<constant name="struts.objectFactory" value="spring" /> 指定spring自动装载

<constant name="struts.action.extension" value="action" /> 指定struts的扩展名

<constant name="struts.devMode" value="true" /> 指定struts的开发模式

<constant name="struts.i18n.reload" value="action" /> 指定struts的资源文件自动重载

<constant name="struts.custom.i18n.resource" value="" /> 指定struts的国际化资源文件

<constant name="struts.configuration.xml.reload" value="" /> 指定struts的配置文件是否自动重载

<constant name="struts.ul.theme" value="xthml" /> 指定struts的模板

原创粉丝点击