Struts2 Action扩展名的修改
来源:互联网 发布:速卖通产品标题优化 编辑:程序博客网 时间:2024/05/17 18:03
一般情况下:struts2默认的action扩展名是.action。一般是不用修改的。
<!-- 过滤器类 --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <!-- 过滤所有的请求 --> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
想要换个样式的话可以试试下边的方法:
<!-- 过滤器类 --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <!-- 过滤所有的.action的请求 --> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> <!-- 过滤所有的.jsp的请求 --> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping>
方法一:在struts.xml文件中加入:
<constant name="struts.action.extension" value="aaa"/>
方法二:在web.xml文件中配置struts时这样配置:
<filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> <init-param> <param-name>struts.action.extension</param-name> <param-value>aaa</param-value> </init-param> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.aaa</url-pattern> </filter-mapping>
方法三:在struts.properties 文件中添加配置信息:
struts.action.extension=aaa
- struts2 action 扩展名的修改
- Struts2 Action扩展名的修改
- Struts2 action的扩展名修改方法
- [struts2]Struts2 Action扩展名的三种修改方法
- Struts2 action的扩展名两种修改方法
- Struts2 action的扩展名两种修改方法
- Struts2 action的扩展名两种修改方法
- Struts2 action的扩展名两种修改方法
- Struts2 Action扩展名的三种修改方法
- Struts2 Action扩展名的三种修改方法
- Struts 2 Action 的扩展名修改方法
- struts2 action的扩展名更改方法 .action .do
- struts2 修改action的后缀
- struts2修改action的后缀名
- 修改struts2的.action后缀名
- 修改struts2的.action后缀名
- 修改struts2的.action后缀名
- struts2 修改action的后缀
- win7下的Object Header结构
- yii框架下输出hive结果
- jQuery 屏蔽页面再次被按和延迟加载函数
- C#遍历指定文件夹中的所有文件
- 初识ExtJS
- Struts2 Action扩展名的修改
- 在GridView中,中高亮顯示光標所在行
- 函数模板
- 做人的基本原则
- 关于PHP中对数组的排序
- 周鸿祎年会演讲全文:未来两年无线互联网格局将定
- Android实用小工具介绍之Monitor
- android对OnTouchListener、OnClickListener等事件响应的研究(转)
- Uninstall Ulead VideoStudio with UninstallGeek.Com Uninstall Guides