本帖最后由 susie 于 2015-9-6 16:58 编辑
部署集成》服务器部署》常见部署问题》与struct2集成部署报错404 描述 报错信息 报错原因 解决方案 [size=10.5000pt]1.描述
将报表应用与自己的项目嵌入部署之后,比如自己项目使用了 struts2,访问fs之后出现报错
2报错信息
There is no Action mapped for namespace [/] and action name [ReportServer] associated with context path []. description The requested resource (There is no Action mapped for namespace [/] and action name [ReportServer] associated with context path [].) is not available 3.报错原因
web.xml里面struts的 /* 拦截导致的,在解决之前,web.xml里面代码为
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
4.解决方案
修改web.xml上面的代码部分为下面内容
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*.action</url-pattern>
</filter-mapping>
|