The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. 异常
在jsp页面中引用了:
<font color="blue"><s:property value="#session.existAdminUser.username"/></font>
但是session中不存在existAminUser对象,因此,需要在web.xml中对jsp页面添加struts2过滤器:
<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>*.do</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>