Struts中action访问不到的原因。

Posted valarchie

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Struts中action访问不到的原因。相关的知识,希望对你有一定的参考价值。

因为需要在项目中构造restful的链接,action通配符使用/进行分割。但是struts默认不支持反斜杠。

所以需要在Struts.xml配置

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

即可使用反斜杠。

以上是关于Struts中action访问不到的原因。的主要内容,如果未能解决你的问题,请参考以下文章