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

          這個錯誤主要是struts-config.xml或web.xml上配置出錯
          仔細(xì)對比后就可以解決
          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>

          仔細(xì)對比 要一字不差


          每天進(jìn)步一點點

          posted on 2008-10-24 15:55 應(yīng)越 閱讀(5913) 評論(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>

          要記住順序,先監(jiān)聽,后面再寫applicationContext.xml  回復(fù)  更多評論
            
          # 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整合開發(fā)常見問題及解決方案  回復(fù)  更多評論
            

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 昂仁县| 汉中市| 鹤壁市| 永济市| 伊宁市| 上饶县| 襄城县| 西盟| 湘阴县| 龙游县| 太保市| 马山县| 深水埗区| 铜陵市| 叶城县| 和林格尔县| 庆阳市| 台湾省| 防城港市| 岚皋县| 隆子县| 台中市| 佛冈县| 普安县| 宁乡县| 弋阳县| 临安市| 和林格尔县| 高要市| 邵阳县| 敖汉旗| 岳池县| 沁阳市| 尚义县| 罗平县| 沁源县| 开平市| 伊吾县| 宝山区| 德保县| 紫金县|