zoukankan      html  css  js  c++  java
  • 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>


  • 相关阅读:
    一个爬虫的练习(妹子图)
    安装模块出现的编译问题(解决)
    基于套接字通信的简单练习(FTP)
    Python3 之选课系统
    数据爬取后台(PHP+Python)联合作战
    让pip 使用国内镜像源
    为啥学蛇和python10年后的变化
    模拟登陆百度以及Selenium 的基本用法
    冒泡排序及其效率分析(无聊搞来玩玩)
    LLVM编译器
  • 原文地址:https://www.cnblogs.com/mthoutai/p/6738336.html
Copyright © 2011-2022 走看看