首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

批改struts2中action的拓展名

2012-09-21 
修改struts2中action的拓展名struts2中action的默认拓展名是.action,而之前的拓展名一直为.do,工作中

修改struts2中action的拓展名

struts2中action的默认拓展名是".action",而之前的拓展名一直为".do",工作中需要要把struts2的action拓展名改为".do"的形式,查了一下,找到两种方法:

?

    在struts.xml中进行如下配置
    ?<constant name="struts.action.extension" value="do" />
    ?
    ?在web.xml的filter中进行配置<init-param>
    <param-name>struts.action.extension</param-name><param-value>do</param-value></init-param>
    ?

?

热点排行