隨筆 - 6  文章 - 129  trackbacks - 0
          <2015年3月>
          22232425262728
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          常用鏈接

          留言簿(14)

          隨筆檔案(6)

          文章分類(467)

          文章檔案(423)

          相冊

          收藏夾(18)

          JAVA

          搜索

          •  

          積分與排名

          • 積分 - 826617
          • 排名 - 49

          最新評論

          閱讀排行榜

          評論排行榜

          今天在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 閱讀(10723) 評論(12)  編輯  收藏 所屬分類: exceptionstruts 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
          我也是,哈哈~  回復  更多評論
            
          # re: struts2中使用displayTags的問題(ParametersInterceptor - [setParameters]: Unexpected Exception) 2008-11-24 11:00 mingje
          哦,在這里看到解釋了!多謝!  回復  更多評論
            
          # re: struts2中使用displayTags的問題(ParametersInterceptor - [setParameters]: Unexpected Exception)[未登錄] 2009-01-06 09:35 kkk
          趔到鼻子豁眼睛的事情.  回復  更多評論
            
          # re: struts2中使用displayTags的問題(ParametersInterceptor - [setParameters]: Unexpected Exception) 2009-05-13 19:18 farman
          迷惑了好久,解決嘍  回復  更多評論
            
          # Uchastie V Konferenciyah 2009-05-18 12:29 Uchastie V Konferenciyah
          Good evening. Posterity is as likely to be wrong as anyone else.
          I am from Haiti and learning to write in English, give please true I wrote the following sentence: "Commentaries about search engine optimization and the latest trends in ethical seo techniques.Don be intimidated by the large fees of so many seo firms."

          Thank you very much :-). Aditi.  回復  更多評論
            
          # re: struts2中使用displayTags的問題(ParametersInterceptor - [setParameters]: Unexpected Exception) 2010-10-14 13:48 CL
          我在網上找到消除異常的辦法就是在ParametersInterceptor加了個-,后臺報異常是解決了但是Struts無法獲取表單參數值,只能通過Request對象去獲取,這是什么原因,希望高手能告訴我萬分感激。QQ315917525  回復  更多評論
            
          # re: struts2中使用displayTags的問題(ParametersInterceptor - [setParameters]: Unexpected Exception)[未登錄] 2015-03-02 22:02 歐陽
          謝謝博主和混沌  回復  更多評論
            
          主站蜘蛛池模板: 关岭| 三江| 加查县| 名山县| 固阳县| 洛隆县| 定襄县| 合川市| 博客| 安义县| 碌曲县| 台安县| 廊坊市| 衡阳县| 景泰县| 白城市| 扎鲁特旗| 古交市| 阿克苏市| 和田县| 临沧市| 马边| 澄迈县| 菏泽市| 佛学| 仪陇县| 全南县| 永靖县| 三门峡市| 勃利县| 亚东县| 西乌珠穆沁旗| 彩票| 新巴尔虎右旗| 正宁县| 临夏市| 大埔区| 榆树市| 襄垣县| 康平县| 龙岩市|