zoukankan      html  css  js  c++  java
  • struts2常量的配置

    (1)<!--指定web应用的默认编码集,相当于调用HttpServletRequest的setCharacterEncoding方法-->

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

    (2)<!--该属性指定需要struts2处理的请求后缀,该属性的默认值是action,即所有匹配*.action的请求都有struts2来处理,如果用户需要指定多个请求后缀,

       则多个后缀之间  以 英文逗号(、)隔开-->

       <constant name="struts.action.extendsion" value="false"/>

    (3)<!--设置浏览器是否缓存静态内容,默认值为true(生产环境下使用),开发阶段最好关闭-->

      <constant name="struts.serve.static.browserCache" value="false"/>

    (4)<!--当struts的配置文件修改后,系统是否自动重新加载该文件,默认值为false(生产环境下使用),开发阶段最好打开-->

      <constant name="struts.configuration.xml.reload" value="true"/>

    (5)<!--开发模式下使用,这样可以答应出更加详细的错误信息-->

      <constant name="struts.devMode" value="true"/>

    (6)<!--默认的视图主题-->

      <constant name="struts.ui.theme" value="simple"/>

    (7)<!--spring托管-->

      <comstant name="struts.objectFactory" value="spring"/>

    (8)<!--指定加载struts2配置文件管理器,默认为org.apache.struts2.config.DefaultConfiguration 开发者可以自定以配置文件管理器,

      该类要实现configuration接口,可以自动加载struts2配置文件-->

      <constant name="struts.configuration"   value="org.apache.struts2.config.DefaultConfiguration"/>

    (9)<!--可以在url中动态的调用某个方法,方法的调用是在Action的名字中使用感叹号(!)来表示要调用的方法名称,

      格式为actionName!methodName.action(不过现在很少用了)-->

      <constant name="strutsenableDynamicMethodInvocation" value="false"/>

    (10)<!--设置默认的locale和字符编码-->

      <constant name="struts.locale" value="zh_CN"/>

    (11)<!--指定spring框架的装配模式,装配方式有:name,type,auto,and constructor(name是默认的装配模式)

      <constant name="struts.objectFactory.spring.autoWire" value="name"/>

    (12)<!--该属性指定整合spring时,是否对bean进行缓存,值为true or false 默认为true-->

      <constant name="struts.objectFactory.spring.useClassCache" value="true"/>

    (13)<!--该属性指定struts2文件上传中整个请求内容允许的最大字节-->

      <constant name="struts.multinart.maxSize" value="2097152"/>

    (14)<!--是否允许使用表达式语言,默认为true-->

      <constant name="struts.tag.altSyntax" value="true"/>

    (15)<!--设置struts是否为开发模式,默认为false,测试阶段一般设为true-->

      <constant name="struts.devMode" value="true"/>

    点击链接加入群【java研究所】:http://jq.qq.com/?_wv=1027&k=eC5Q0O
  • 相关阅读:
    61. 最长不含重复字符的子字符串
    60. 礼物的最大价值 (未理解)
    59. 把数字翻译成字符串
    58. 把数组排成最小的数
    57. 数字序列中某一位的数字 (不懂)
    spring data jpa 官方文档
    idea 编译报错 源发行版 1.8 需要目标发行版 1.8
    idea maven 依赖报错 invalid classes root
    solr
    spring boot 官方文档
  • 原文地址:https://www.cnblogs.com/rosydawn/p/3408338.html
Copyright © 2011-2022 走看看