• struts配置请求后缀,将.action改为.do、.doaction_2015.01.04


    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">
    
    <struts>
        <!-- 将.action访问,改为.do、.doaction:同时处理这两种后缀 -->
        <constant name="struts.action.extension" value="do,doaction"></constant>
        
        <package name="hw" namespace="/test" extends="struts-default">
            <action name="helloworld" class="com.self.action.HelloWorldAction" method="dohelloworld" >
                <result name="doresult">
                    /showresult.jsp
                </result>
            </action>
        </package>
    </struts>

    原访问地址:http://localhost:8080/Struts2_01/test/helloworld.action(改后访问404)
    该后地址01:http://localhost:8080/Struts2_01/test/helloworld.do
    该后地址02:http://localhost:8080/Struts2_01/test/helloworld.doaction

  • 相关阅读:
    Linux_day01_primaryCommand
    Variational auto-encoder VS auto-encoder
    python yield generator 详解
    Paper Writing
    DTU_AI lecture 09
    DTU_AI lecture 08
    Attention mechanism
    Energy Journals
    TF + pytorch学习
    expRNN
  • 原文地址:https://www.cnblogs.com/zjsy/p/4202467.html
Copyright © 2020-2023  润新知