Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Struts2 struts 2令牌拦截器_Struts2_Interceptor_Interceptorstack - Fatal编程技术网

Struts2 struts 2令牌拦截器

Struts2 struts 2令牌拦截器,struts2,interceptor,interceptorstack,Struts2,Interceptor,Interceptorstack,我得到类似“警告:在参数中找不到令牌名。” 在Struts.xml中 <interceptors> <interceptor name="entityInterceptor" class="entity.jpa.EntityInterceptor"/> <interceptor name="sessionInterceptor" class="env.actionitems.struts.SessionInterceptor"/> <intercept

我得到类似“警告:在参数中找不到令牌名。”

在Struts.xml中

<interceptors>
<interceptor name="entityInterceptor" class="entity.jpa.EntityInterceptor"/>
<interceptor name="sessionInterceptor" class="env.actionitems.struts.SessionInterceptor"/>

<interceptor-stack name="entityStack">
<interceptor-ref name="entityInterceptor"/>
<interceptor-ref name="sessionInterceptor"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="defaultStack">   
</interceptor-ref>

</interceptor-stack>
</interceptors>
<default-interceptor-ref name="entityStack"></default-interceptor-ref>

<action name="*acegitran*jsp*pkg*create*dcode*" method="{1}" class="env.transactions.{3}.{4}">
<interceptor-ref name="token"/> 
<interceptor-ref name="entityStack"/>
<result name="invalid.token">Transaction.{2}iport{5}create</result>
<result name="success" type="tiles">Transaction.{2}iport{5}create</result>
<result name="error" type="tiles">Transaction.{2}iport{5}create</result>
<result name="input" type="tiles">Transaction.{2}iport{5}create</result>
</action>

事务{2}iport{5}创建
事务{2}iport{5}创建
事务{2}iport{5}创建
事务{2}iport{5}创建
在JSP中

<s:token name="clientToken"/> 


任何其他参数都应该在struts.xml中传递以解决。

我遇到了类似的问题。您可能希望尝试将
Struts.xml
文件中的“
invalid.token
”更改为“
invalid.clientToken
” 乙二醇

请记住,
Struts.xml
文件只有在服务器重新启动后才会生效

希望有帮助

result name="invalid.clientToken"