문제

What is the reason for this warning?

WARNING: Form token PR78LAIFZJQRTL66GGAJDT61511L6YHN does not match the session token null

JSP:

<s:form method="post" action="test">
     <s:token></s:token>
     Email:<input name="email" />
</s:form>

Struts.xml:

<action name="test" class="test.RegisterAction">
    <interceptor-ref name="defaultStack" />
    <interceptor-ref name="token" /> 
    <result name="invalid.token">/error.jsp</result> 
    <result>/user/success.jsp</result>
    <result name="error">/error.jsp</result>
</action>
도움이 되었습니까?

해결책

The order of the interceptor token should be first. For example

<interceptor-ref name="token" />
<interceptor-ref name="defaultStack" />

The reason why your session token is null might be the session is expired or closed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top