struts2的核心包中找到:org.apache.struts2.default.properties中找到
### Used by the DefaultActionMapper
### You may provide a comma separated list, e.g. struts.action.extension=action,jnlp,do
### The blank extension allows you to match directory listings as well as pure action names
### without interfering with static resources.
struts.action.extension=action,,
### Used by FilterDispatcher
### If true then Struts serves static content from inside its jar.
### If false then the static content must be available at <context_path>/struts
第一种:可以在struts.xml的配置文件中这样添加
<struts>
<constant name="struts.action.extension" value="do"/>
<package name="myLogin" namespace="/login" extends="struts-default">
<action name="login" class="" method="">
<result name="success" type="dispatcher">/login.jsp</result>
</action>
</package>
</struts>
可是如果要修改的属性比较多就有点不好了。
第二种:
在src目录下,单独写一个struts.properties的文件:内容如下
struts.action.extension=do
这样以后访问就以.do为结尾的路径请求了!!!
分享到:
相关推荐
struts2-core-2.0.1.jar, struts2-core-2.0.11.1.jar, struts2-core-2.0.11.2.jar, struts2-core-2.0.11.jar, struts2-core-2.0.12.jar, struts2-core-2.0.14.jar, struts2-core-2.0.5.jar, struts2-core-2.0.6.jar,...
Struts2升级到2.5.30,问题解决及过程记录, 文章详见:https://blog.csdn.net/sinat_36743893/article/details/124582101
org.springframework.web.struts-3.1.0.M2.jar
struts-taglib-1.3.8.jar struts-taglib-1.3.8.jar
struts2注解配置Action及拦截器几种不同方式写法对应的路径指向.docx
java struts如何隐藏提交后缀.action, .do
用URL扩展名来确定是否这个请求是被用作Struts action,其实也就是设置 action的后缀,例如login.do的'do'字。 struts.configuration The org.apache.struts2.config.Configuration implementation class org....
1、struts2概述 Struts2 软件下载 Struts2 比较重要的类 操作步骤及框架配置 struts运行机制 2、简单的struts2程序 3、struts2配置文件 4、cion主要内容 Namespace、自定义Action、路径问题、通配符、包含模块...
struts-2.3.34-all.rar,包括app,docs,lib,src
Struts2漏洞检查工具Struts2.2019.V2.3
struts2的token实现.
2017年7月7日,Apache Struts发布最新的安全公告,Apache Struts2-strus1-plugin插件存在远程代码执行的高危漏洞,漏洞编号为CVE-2017-9791(S2-048),主要受影响的Struts版本为:2.3.x。 攻击者可以构造恶意的字段值...
Struts2文件批量上传.zip Struts2文件批量上传.zip Struts2文件批量上传.zip Struts2文件批量上传.zip Struts2文件批量上传.zip
绝对可以解决这个这个问题。Struts初学者绝对可以受用的方法。
struts1.38包,struts-core-1.3.8.jarstruts1.38包,struts-core-1.3.8.jar
struts2-core-2.2.3.1-sources.jar struts2-core-2.2.3.1-sources.jar struts2-core-2.2.3.1-sources.jar
MyEclipse 6 Java 开发中文教程2011.pdfMyEclipse 6 Java 开发中文...开发Struts 2+Spring应用.pdf第十二章 开发Struts 2+Spring应用.pdf第十二章 开发Struts 2+Spring应用.pdf第十二章 开发Struts 2+Spring应用.pdf
struts2 上传图片限制.struts2 上传图片限制.struts2 上传图片限制.
Struts 2权威指南源码.rar
Struts2和SpringMvc区别.md