struts2修改默认后缀
来源:互联网 发布:mysql 触发器 性能 编辑:程序博客网 时间:2024/05/11 03:46
优秀的MVC框架struts2提供了3种方法可以修改默认的action后缀
方法一:在web.xml中配置
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> <init-param> <param-name>struts.action.extension</param-name> <param-value>action,do,</param-value> </init-param> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping></web-app>
方法二:在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> <constant name="struts.action.extension" value="do,action,"></constant> <package name="default" namespace="/" extends="struts-default"> </package></struts>
方法三:在struts.properties中配置
struts.action.extension=do,action,
0 0
- struts2修改默认后缀
- 配置struts2的默认后缀
- struts2 修改action的后缀
- struts2 修改action的后缀
- 如何配置struts2 action默认后缀
- struts2 修改默认上传大小
- struts2默认无法处理以.do后缀的请求
- struts2:默认的Action(用户友好界面)和后缀
- 修改Struts2默认的模板配置
- 修改Struts2默认的模板配置
- 修改Struts2默认的模板配置
- 修改Struts2默认的模板配置
- Struts2上传文件修改默认错误提示
- 修改struts2 中 struts.xml 默认路径
- struts2文件上传怎么修改默认大小
- Struts2 后缀
- 修改struts2 显示的后缀 .action 为 .jsp
- Struts2框架修改访问路径后缀的三种方式
- 记录,学习,分享
- java面试题二十 try catch
- HDU-2102 A计划
- adduser和useradd的区别
- 完全二叉树插入
- struts2修改默认后缀
- STL中map用法详解
- 10G 个整数,乱序排列,要求找出中位数。内存限制为 2G。只写出思路即可
- 代码审查的5点经验教训总结
- HDU-3001 Travelling
- 数据结构 尾插法
- Webix-Layout resizer limit
- xml解析--Pull方式
- Windows Server 2008 上 XAMPP 配置NameVirtualHost的问题