隨筆-8  評論-8  文章-10  trackbacks-0

          這個錯誤主要是struts-config.xml或web.xml上配置出錯
          仔細對比后就可以解決
          struts-config.xml
          <controller
            processorClass="org.springframework.web.struts.DelegatingRequestProcessor">
           </controller>

            <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
              <set-property property="contextConfigLocation" value="/WEB-INF/classes/applicationContext.xml" />
            </plug-in>

          web.xml
          <context-param>
             <param-name>contextConfigLocation</param-name>
             <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
            </context-param>
           
            <servlet>
             <servlet-name>context</servlet-name>
             <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
            </servlet>

          仔細對比 要一字不差


          每天進步一點點

          posted on 2008-10-24 15:55 應越 閱讀(5911) 評論(2)  編輯  收藏

          評論:
          # re: Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解決方案 2010-03-13 23:57 | Josh
          <listener>
          <listener-class>
          org.springframework.web.context.ContextLoaderServlet
          </listener-class>
          </listener>

          <context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>/WEB-INF/applicationContext.xml</param-value>
          </context-param>

          要記住順序,先監聽,后面再寫applicationContext.xml  回復  更多評論
            
          # re: Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解決方案 2013-07-19 23:26 | tolerance
          錯誤,看這里

          http://wenku.baidu.com/view/20a87eef551810a6f52486ae.html

          Spring2.5、Struts2.1、Hibernate3.2、sitemesh、freemarker整合開發常見問題及解決方案  回復  更多評論
            

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


          網站導航:
           
          主站蜘蛛池模板: 栾川县| 新干县| 安乡县| 台湾省| 黄浦区| 沅江市| 丹巴县| 南靖县| 习水县| 西昌市| 繁峙县| 远安县| 雷山县| 仁寿县| 鹤庆县| 鹤山市| 武陟县| 柘荣县| 丰县| 晋中市| 博客| 巧家县| 揭阳市| 海安县| 吉木乃县| 建水县| 柳州市| 榆社县| 项城市| 巨鹿县| 玉林市| 吉木萨尔县| 松潘县| 寻甸| 新乡县| 随州市| 吴旗县| 涿鹿县| 晋中市| 敦化市| 宜春市|