Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解決
環境:MyEclipse6.5+ Tomcat6.0.18+Struts2.1+Hibernate3.2+Spring2.5.6
問題:啟動Tomcat出現如下異常:
IOException parsing XML document from ServletContext resource[/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException:Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
解決:出現這個問題是專案找不到配置檔案。只要在web.xml中配置applicationContext.xml的路徑即可。
比如我新增如下程式碼:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
參考資料:
http://www.cnblogs.com/tjsquall/archive/2009/01/05/1368784.html
相關文章
- Ubuntu Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)UbuntuAPTAI
- su - root could not open sessionSession
- open failed: EBUSY (Device or resource busy)AIdev
- 【kingsql分享】解決RAC大量UNKNOWN和CRS-0216: Could not stop resourceSQL
- jedis異常:Could not get a resource from the pool
- 從根本解決windows安裝JDK出現error:could not open ‘...jvm.cfg‘的問題WindowsJDKErrorJVM
- su的時候報:could not open sessionSession
- Could not find *.apk!解決辦法APK
- 解決 CRS-2640: Required resourceUI
- ORA-25507: resource 解決方法
- 解決"Could not reserve enough space for object heap"Object
- Access restriction: The type 'Resource' is not API 解決辦法RESTAPI
- Go:錯誤 could not launch process: EOF 解決Go
- Could not find jar tool executable問題解決JAR
- jar檔案could not find the main class解決JARAI
- 解決“su: cannot open session: Permission denied”Session
- linux解決xhost: unable to open displayLinux
- linux解決xhost unable to open display‘’Linux
- Many To Many could not initialize proxy – no Session的解決方法Session
- 解決nltk_data LookupError: Resource punkt not found.Error
- Laravel Resource Routes和API Resource Routes講解LaravelAPI
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolRedisclientException
- 【故障處理】ORA-65500: could not modify DB_UNIQUE_NAME, resource exists
- 完美解決xhost +報錯: unable to open display
- 轉貼:xhost unable to open display解決方法
- Ubuntu 解決 Too many open files 問題Ubuntu
- 關於 artisan migrants Could not find drive 解決方法
- Could not decode a text frame as UTF-8 的解決
- Android: The following classes could not be instantiated: 解決方法Android
- Could not resolve host: 'localhost 報錯解決辦法localhost
- su cannot set user id Resource temporarily unavailable故障解決AI
- Myeclipse:resource is out of sync with the file system的解決辦法Eclipse
- applicationContext.xmlAPPContextXML
- 解決 yum clean all Error rpmdb open failedErrorAI
- Fotify掃描結果Open Redirection解決方案
- Could not initialize class sun.awt.X11GraphicsEnvironment解決方案
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet解決方案ExceptionSQL
- FATAL ERROR: Could not find ./bin/my_print_defaults 解決方法Error