解决异常ognl OgnlException source is null for getProperty null

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

异常如下

  1. 2010-03-13 09:26:06,224 INFO  [STDOUT] (http-0.0.0.0-8080-3) 09:26:06,223 WARN  [OgnlValueStack] Error setting expression 'struts.token.name' with value '[Ljava.lang.String;@5cfe5cfe'  
  2.     ognl.OgnlException: source is null for getProperty(null, "token")  
  3.      at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2203)  
  4.      at ognl.ASTProperty.getValueBody(ASTProperty.java:114)  
  5.   
  6.     ...........................  
2010-03-13 09:26:06,224 INFO  [STDOUT] (http-0.0.0.0-8080-3) 09:26:06,223 WARN  [OgnlValueStack] Error setting expression 'struts.token.name' with value '[Ljava.lang.String;@5cfe5cfe'    ognl.OgnlException: source is null for getProperty(null, "token")     at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2203)     at ognl.ASTProperty.getValueBody(ASTProperty.java:114)    ...........................

在Struts2配置文件里添加如下代码

  1. <interceptor-ref name="params">  
  2.     <param name="excludeParams">dojo/..*,struts.token,struts.token.name</param>  
  3. </interceptor-ref>  
<interceptor-ref name="params">    <param name="excludeParams">dojo/..*,struts.token,struts.token.name</param></interceptor-ref>

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

版权声明:本文为hfrujhv原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。