在JSP里使用struts2标签的时候,如果页面不是通过action跳转得到的会报错:
The Struts dispatcher cannot be found. This is usually caused by using Strut
解决办法:
web.xml中加入
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>