隨筆 - 6  文章 - 129  trackbacks - 0
          <2007年12月>
          2526272829301
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          常用鏈接

          留言簿(14)

          隨筆檔案(6)

          文章分類(467)

          文章檔案(423)

          相冊

          收藏夾(18)

          JAVA

          搜索

          •  

          積分與排名

          • 積分 - 826722
          • 排名 - 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 閱讀(10725) 評論(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 歐陽
          謝謝博主和混沌  回復  更多評論
            
          主站蜘蛛池模板: 咸丰县| 应用必备| 麻栗坡县| 资兴市| 全州县| 邯郸市| 扶绥县| 镇原县| 天门市| 安达市| 泽库县| 白城市| 轮台县| 封丘县| 洱源县| 彭州市| 榆林市| 闸北区| 东安县| 中方县| 项城市| 玉山县| 霍州市| 恩施市| 宁海县| 烟台市| 繁昌县| 肥城市| 固阳县| 青河县| 沿河| 万源市| 防城港市| 新巴尔虎左旗| 九寨沟县| 崇明县| 武定县| 中方县| 城口县| 左权县| 三门峡市|