Struts2中页面点击后退报错的问题,我将url-pattern从/*改成了*.action
各位好:请教个问题,我用struts2,其中的<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
在提交了请求后,点击后退按钮时报:The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]错误,是怎么回事呢??该如何设置呢?我把*.action改成 *,就没问题了
------解决方案--------------------<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
你没加这个吧?
------解决方案--------------------
如果是a标签你就必修加*。action
如果是Struts 2.0 标签就不用加了
------解决方案--------------------
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class> 加上分配器