隨筆-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 應越 閱讀(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>

          要記住順序,先監聽,后面再寫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整合開發常見問題及解決方案  回復  更多評論
            

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


          網站導航:
           
          主站蜘蛛池模板: 岳阳县| 行唐县| 辽阳县| 祁门县| 建始县| 武川县| 德钦县| 集贤县| 孝感市| 苏尼特左旗| 临武县| 股票| 隆回县| 舞钢市| 五家渠市| 宜丰县| 焦作市| 策勒县| 成安县| 沁水县| 磴口县| 潞城市| 大厂| 砚山县| 彝良县| 贺州市| 广饶县| 将乐县| 霍州市| 祁东县| 海宁市| 容城县| 汕头市| 中超| 班戈县| 珲春市| 清镇市| 延吉市| 河南省| 临高县| 米林县|