在Struts2中,关于Action使用最多的就是通配符,在2.5以前通过配置Struts.xml文件即可正常使用通配符,但是升级到2.5以后,始终报404找不到Action。
通过查询,Struts2 2.5中默认是不开启通配符,需要将strict-method-invocation设置为false
通过查询,Struts2 2.5中默认是不开启通配符,需要将strict-method-invocation设置为false
<package name="default" namespace="/" extends="struts-default" strict-method-invocation="false">
</package>
本文介绍如何在Struts2.5中正确配置通配符,以避免出现404错误。升级到2.5版本后,需要在配置文件中明确设置strict-method-invocation属性为false。
3261

被折叠的 条评论
为什么被折叠?



