struts2中使用displayTags的问题(ParametersInterceptor)

struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception)
今天在struts2中使用了displayTags,没想到控制台却输出以下错误信息:
ERROR - ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'd-49653-p' on 'class dgut.ke.actions.SubjectAction: Error setting expression 'd-49653-p' with value '[Ljava.lang.String;@d73256'

在网上的搜了一下,在一些中文网页上几乎都找不到相关的信息,结果在一个英语网站上看到了以下信息:

I use struts2.0.9 and displaytag,xwork-2.0.4.jar,when I click next page of
displaytag,it will raise flowing warning:

Warn: ParametersInterceptor - [setParameters]: Unexpected Exception caught
setting 'd-1332698-p' on 'class Test.TestAction: Error setting expression
'd-1332698-p' with value '[Ljava.lang.String;@14bf534'
RE:
It's a warning that occurs because you're using displaytags.

Don't worry about it, it won't hurt you, and messing with it will just make
bad things happen (you know the kind of thing, long nights trying to work
out things like why table sorting isn't working, why data isn't being
displayed, and why the world is so unfair).

In the words of a nice policeman; "Move along, there's nothing to see here"

-----Original Message-----
From: red phoenix [mailto:rodphoenix@...]
Sent: 26 September 2007 16:29
To: Struts Users Mailing List
Subject: Error: ParametersInterceptor - [setParameters]


I use struts2.0.9 and displaytag,xwork-2.0.4.jar,when I click next page of
displaytag,it will raise flowing warning:

Warn: ParametersInterceptor - [setParameters]: Unexpected Exception caught
setting 'd-1332698-p' on 'class Test.TestAction: Error setting expression
'd-1332698-p' with value '[Ljava.lang.String;@14bf534'

Why raise above waring? How to solve it?
Thanks!
Add the following line to your struts.xml file.
d-.*-p

Example:
        <interceptor-stack name="creditDefaultStack">
                <interceptor-ref name="creditException" />
                <interceptor-ref name="alias" />
                <interceptor-ref name="servlet-config" />
                <interceptor-ref name="prepare" />
                <interceptor-ref name="i18n" />
                <interceptor-ref name="chain" />
                <interceptor-ref name="debugging" />
                <interceptor-ref name="profiling" />
                <interceptor-ref name="scoped-model-driven" />
                <interceptor-ref name="model-driven" />
                <interceptor-ref name="checkbox" />
                <interceptor-ref name="static-params" />
                <interceptor-ref name="params">
                        dojo\..*
                        d-.*-p </interceptor-ref>
                <interceptor-ref name="conversionError" />
                <interceptor-ref name="validation">
               
  cancel,execute,delete,edit,list,start
               
                </interceptor-ref>
                <interceptor-ref name="workflow">
                       
                                input,back,cancel,browse
                       
                </interceptor-ref>
                    </interceptor-stack>
                </interceptors>
                <default-interceptor-ref name="creditDefaultStack" />
照上面的说法去做,由于本人能力有限,还是未能解决.去下个高点的版本试试看,期待能解决!


posted on 2007-11-17 15:21 KE 阅读(1254) 评论(6)  编辑  收藏 所属分类: exception 、struts 2


FeedBack:
# re: struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception) 2007-12-03 15:38 刘文涛
我在没使用 displayTags 也遇到 这个问题。 听它的意思是说不用管它, 但控制台上总 报 严重 也不好啊。

严重: ParametersInterceptor - [setParameters]: Unexpected Exception caught setti
ng 'msg_param' on 'class demo.action.IoCServletNonAction: Error setting expressi
on 'msg_param' with value '[Ljava.lang.String;@ebf068'
2007-12-3 15:32:05 com.opensymphony.xwork2.interceptor.ParametersInterceptor set
Parameters
严重: ParametersInterceptor - [setParameters]: Unexpected Exception caught setti
ng 'msg' on 'class demo.action.IoCServletNonAction: Error setting expression 'ms
g' with value '[Ljava.lang.String;@e0c7c3'
2007-12-3 15:34:27 com.opensymphony.xwork2.interceptor.ParametersInterceptor set
Parameters
严重: ParametersInterceptor - [setParameters]: Unexpected Exception caught setti
ng 'msg' on 'class demo.action.IoCServletNonAction: Error setting expression 'ms
g' with value '[Ljava.lang.String;@57ae58'

这个应该是 log4j error级别打出来的。   回复  更多评论
  
# re: struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception) 2007-12-25 09:04 混沌
当struts.devMode设置为true时,html表单数据中有和action属性匹配不上的参数名时就会被这样显示出来,没什么大碍,就是为了便于使用者调试。struts.devMode设置为false就没有了。可能它的log级别设置的容易让人误会。  回复  更多评论
  
# re: struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception) 2007-12-25 09:58 KE
嗯.把struts.devMode设置为false就没有了
谢了.  回复  更多评论
  
# re: struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception) 2007-12-25 10:00 KE
谢谢@混沌
  回复  更多评论
  
# re: struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception) 2008-05-07 18:16 wukong
混沌厉害!终于在这里找到答案了!谢谢  回复  更多评论
  
# re: struts2中使用displayTags的问题(ParametersInterceptor - [setParameters]: Unexpected Exception) 2008-08-12 10:01 Icesky
我也是,哈哈~  回复  更多评论

http://www.51nev.com 无忧电动汽车网

你可能感兴趣的:(log4j,struts,dojo)