美文网首页
Struts中的访问后缀

Struts中的访问后缀

作者: 暗香抚动 | 来源:发表于2016-10-14 17:42 被阅读0次

    Struts中默认的访问后缀

    Struts1中默认的访问后缀是.do
    Struts2中默认的访问后缀是.action

    如何修改默认的访问后缀

    1. Struts中的.action访问后缀在哪里定义?
    struts2-core-2.5.2.jar/org/apache/struts2/default.properties
    struts.action.extension=action,,
    2. 在struts.xml文件中通过常量修改
    <constant name="struts.action.extension" value="action,do,"></constant>其value最后如果为,则表示没有后缀也可以匹配

    相关文章

      网友评论

          本文标题:Struts中的访问后缀

          本文链接:https://www.haomeiwen.com/subject/quzwyttx.html