struts2使用<s:token/>报错
java.lang.NullPointerException
org.apache.struts2.util.TokenHelper.setToken(TokenHelper.java:71)
org.apache.struts2.components.Token.buildToken(Token.java:114)
org.apache.struts2.components.Token.evaluateExtraParams(Token.java:96)
org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856)
1.问题原因:为了使用<jsp:forwardpage=""></jsp:forward>,我配置了
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
2.解决方法:
去掉<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
改用:<%response.sendRedirect("");%>跳转
相关推荐
hgzhang 2020-05-06
白净垃圾桶 2020-05-04
playis 2020-04-18
郭大路路 2020-04-16
lenchio 2020-04-08
yixiaoqi00 2020-04-08
melonjj 2020-01-05
mmywcoco 2019-12-28
wangruiling 2014-06-13
yaoyao0 2014-06-01
YangHuiLiang 2014-05-20
方志朋 2019-12-22
xcguoyu 2014-01-18
方志朋 2015-04-30
殷龙飞 2014-06-24
zmysna 2016-12-16
89264255 2011-04-23
wuddny的blog 2014-12-04