zoukankan      html  css  js  c++  java
  • Struts2的struts.xml的标准配置文档

    <?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>
        <!-- 所有匹配*.action的请求都由struts2处理 -->
        <constant name="struts.action.extension" value="action" />
        <!-- 是否启用开发模式 -->
        <constant name="struts.devMode" value="true" />
        <!-- struts配置文件改动后,是否重新加载 -->
        <constant name="struts.configuration.xml.reload" value="true" />
        <!-- 设置浏览器是否缓存静态内容 -->
        <constant name="struts.serve.static.browserCache" value="false" />
        <!-- 请求参数的编码方式 -->
        <constant name="struts.i18n.encoding" value="UTF-8" />
        <!-- 每次HTTP请求系统都重新加载资源文件,有助于开发 -->
        <constant name="struts.i18n.reload" value="true" />
        <!-- 文件上传最大值 -->
        <constant name="struts.multipart.maxSize" value="104857600" />
        <!-- 让struts2支持动态方法调用 -->
        <constant name="struts.enable.DynamicMethodInvocation" value="true" />
        <!-- Action名称中是否还是用斜线 -->
        <constant name="struts.enable.SlashesInActionNames" value="false" />
        <!-- 允许标签中使用表达式语法 -->
        <constant name="struts.tag.altSyntax" value="true" />
        <!-- 对于WebLogic,Orion,OC4J此属性应该设置成true -->
        <constant name="struts.dispatcher.parametersWorkaround" value="false" />
    
        <!-- default的意思是默认的 -->
        <package name="test" namespace="/"  extends="struts-default">
            <action name="login" class="com.mstf.action.LoginAction">
                <!-- 如果登录成功 -->
                <result name="success">
                    /welcome.jsp
                </result>
                <!-- 如果登录失败 -->
                <result name="error">
                    /error.jsp
                </result>
            </action>
        </package>
    
    </struts>
  • 相关阅读:
    这样的专家门诊
    CPU 知识介绍
    软考结束了!
    ubuntu环境配置eclipse+opencv
    2016年3月份总结
    点聚合功能基于ARCGIS RUNTIME SDK FOR ANDROID
    如何用java语言获取某个网页的源代码
    点聚合功能改良版本
    ARCGIS切图:TPK文件的空间参考为地理坐标系
    Java中的数据类型
  • 原文地址:https://www.cnblogs.com/ceet/p/6409430.html
Copyright © 2011-2022 走看看