feng

          飄逸~~~~~life

          關于struts2+spring中的Error filterStart錯誤

          2008-7-2 15:24:58 org.apache.catalina.core.StandardContext start
          嚴重: Error filterStart
          2008-7-2 15:24:58 org.apache.catalina.core.StandardContext start
          嚴重: Context [/struts2] startup failed due to previous errors


          在用tomcat開發struts2.0整合spring時,也許一不小心就會出現上面的錯誤
          我自己對struts2.0也是剛剛接觸一點點,我自己總結了點
          1.struts2.0整合spring時默認的spring配置文件應該放在web-inf/下,否則就要在web.xml中進行如下配置,比如有多個配置文件
          <context-param>
                 <param-name>contextConfigLocation</param-name>
                 <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
          </context-param>
          其中struts.xml中的
          <constant name="struts.objectFactory" value="spring" />你可以加入也可以不加入
          因為其實當你加入struts2-spring-plugin-2.0.11.1.jar  這個文件的時候里面有個
          struts-plugin.xml中已經有了
          struts2-spring-plugin-2.0.11.1.jar  是引起Error filterStart的主要原因,需要在項目中加入此JAR包
          此外我自己還發現另一個引起該錯誤的原因
          比如
          你有多個struts2的配置文件,在struts.xml中有有這樣的
          <include file="struts-jfreechart.xml" />
          包含語句
          則在對應的配置文件中的<package name="action" extends="struts-default">
          中的name屬性不能與其他的配置文件中的name重復,重復則會出現上面的錯誤!

           

          posted on 2008-07-02 15:45 feng 閱讀(2287) 評論(4)  編輯  收藏

          Feedback

          # re: 關于struts2+spring中的Error filterStart錯誤 2008-07-02 16:13 隔葉黃鶯

          Tomcat 啟動時顯示 Error filterStart 根本無從知道具體是什么原因,這時候只要看看 logs 目錄中的日志就一目了然了。  回復  更多評論   

          # re: 關于struts2+spring中的Error filterStart錯誤 2008-07-03 09:04 龐永慶

          你好 我是出版社的編輯,我看到你博客中的內容,感覺寫的非常不錯,如果想把這些內容和更多的人分享,可以和我聯系,把這些東西寫成書。
          我的郵箱:books_522008@yahoo.com.cn  回復  更多評論   

          # re: 關于struts2+spring中的Error filterStart錯誤 2008-07-03 09:25 javaread.com

          這樣也能出版?  回復  更多評論   

          # re: 關于struts2+spring中的Error filterStart錯誤 2008-07-03 10:35 feng

          可以,你覺得哪里好就拿去用吧 @龐永慶
            回復  更多評論   



          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 武山县| 孟州市| 手机| 贵南县| 沽源县| 安达市| 黎川县| 茌平县| 扶沟县| 樟树市| 肇东市| 青海省| 鹤峰县| 沈丘县| 包头市| 奉贤区| 乌鲁木齐县| 麟游县| 孟州市| 永昌县| 十堰市| 延川县| 喀喇沁旗| 上高县| 桂阳县| 北川| 建德市| 长垣县| 新津县| 离岛区| 承德市| 北安市| 乌审旗| 时尚| 翼城县| 阿坝| 昌都县| 桂东县| 通化市| 莫力| 黄梅县|