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>
  • 相关阅读:
    Docker 制作定制asp.netcore 的容器
    Windows docker k8s asp.net core
    Ubuntu 18 Kubernetes集群的安装和部署 以及Helm的安装
    ubuntu 18 docker 搭建Prometheus+Grafana
    ubuntn18 docker zabbix+grafana安装和使用
    .net Core MongoDB用法演示
    Ubuntu18 安装搭建Harbor
    ubuntu docker inflxudb(安装 使用 备份 还原 以及python编码) telegraf Grafana
    python selenium爬虫工具
    python selenium IE Firxfor pyinstaller
  • 原文地址:https://www.cnblogs.com/ceet/p/6409430.html
Copyright © 2011-2022 走看看