隨筆-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整合開發常見問題及解決方案  回復  更多評論
            

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


          網站導航:
           
          主站蜘蛛池模板: 九江市| 高清| 中西区| 澜沧| 砚山县| 韶关市| 灵丘县| 宁南县| 彰武县| 许昌市| 辛集市| 抚松县| 海南省| 江门市| 华安县| 荥阳市| 宜昌市| 邵武市| 襄汾县| 伊通| 西畴县| 海盐县| 翁牛特旗| 买车| 象州县| 沂水县| 文水县| 东源县| 乌审旗| 万州区| 凌海市| 望谟县| 遂川县| 凤山县| 斗六市| 汤原县| 厦门市| 五指山市| 大英县| 阿图什市| 土默特左旗|