2011-03-21 128 views
0

谁能告诉我什么可能引发这个错误..?OGNL解析异常

[ognl.ParseException: Encountered "<EOF>" at line 1, column 1 
Was expecting one of: 
    ":" ... 
    "not" ... 
    "+" ... 
    "-" ... 
    "~" ... 
    "!" ... 
    "(" ... 
    "true" ... 
    "false" ... 
    "null" ... 
    "#this" ... 
    "#root" ... 
    "#" ... 
    "[" ... 
    "{" ... 
    "@" ... 
    "new" ... 
    <IDENT> ... 
    <DYNAMIC_SUBSCRIPT> ... 
    "\'" ... 
    "`" ... 
    "\"" ... 
    <INT_LITERAL> ... 
    <FLT_LITERAL> ... 
    ] 

回答

0

某些parameter解析错误,你可以找出哪些参数是通过检查提交的URL无效。

尝试:
- 纠正参数的无效name
- 或者,下面的例子可能是一个解决方案/给你一个想法:

struts.xml的

<interceptor-stack name="defaultStack"> 
    <interceptor-ref name="params"> 
     <param name="excludeParams">dojo\..*,^struts\..*,jquery\..*</param> 
    </interceptor-ref> 
</interceptor-stack> 


Excluding parameters

通过设置它的excludeParams属性,可以强制该拦截器忽略参数。该属性接受逗号分隔的正则表达式列表。当这些表达式中的任何一个匹配参数的名称时,这个参数将被拦截器忽略。