Struts2.xml 中Action的名字包含/特殊字符

1,在struts2.xml如果要在action的配置的name属性中包含"/",则需要配置一个常量就能达到效果,代码如下:

在struts.xml中添加如下配置:

<constant name="struts.enable.SlashesInActionNames" value="true"></constant>

ps:具体的相关参数可以在struts2-core-xxx.jar\org.apache.struts\default.properties属性文件中查找

猜你喜欢

转载自gengen201314.iteye.com/blog/1233814
今日推荐