Spring:Looks like the Spring listener was not configured for your web app!
2017-08-01 21:43
447 查看
1.Spring整合Struts2:配置文件问题
在Spring整合Struts2时出现的一个问题,其实Log的前几句已经告诉我们错误的原因了,因为忘记在web.xml配置文件中没有配置Spring Listener,当我们配置了ConextLoaderListener后,该监听器会在创建时自动查找WEB-INF/路径下applicationContext.xml文件,所以除了配置该ConextLoaderListener,我们还需要将applicationContext.xml放在WEB-INF下
异常如下:
在Spring整合Struts2时出现的一个问题,其实Log的前几句已经告诉我们错误的原因了,因为忘记在web.xml配置文件中没有配置Spring Listener,当我们配置了ConextLoaderListener后,该监听器会在创建时自动查找WEB-INF/路径下applicationContext.xml文件,所以除了配置该ConextLoaderListener,我们还需要将applicationContext.xml放在WEB-INF下
异常如下:
Looks like the Spring listener was not configured for your web app! Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.
<listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener>
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Dispatcher initialization failed java.lang.NullPointerException at com.opensymphony.xwork2.spring.SpringObjectFactory. getClassInstance(SpringObjectFactory.java:209) at com.opensymphony.xwork2.config.providers. XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:519)
相关文章推荐
- Looks like the Spring listener was not configured for your web app!
- Looks like the Spring listener was not configured for your web app!
- Looks like the Spring listener was not configured for your web app!
- Looks like the Spring listener was not configured for your web app
- [转载]Looks like the Spring listener was not configured for your web app
- Could not find the Visual SourceSafe Internet Web Service connection information for the specified database Would you like to launch the Visual sourceSafe connection wizard?
- Spring MVC looks for a file named [servlet-name]-servlet.xml in the WEB-INF
- the apk for your currently selected variant(app-release-unsigned.apk)is not signed.Please specity a
- java.lang.ClassNotFoundException: org.springframework.web.util.WebAppRootListener
- 【iOS】Could not launch Verify the Developer App certificate for your account is trusted on your devic
- [AX]AX2012激活HTTP适配器AIF端口提示错误“The deployment web site was not found for port”
- 8.1 Details Your app does not comply with the Guidelines for Using Apple's Trademarks and Copyrights
- You third iOS app,解决1The identity used to sign the executable is no longer valid 2.A valid provisioning profile for this executable was not found。
- Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
- egit 出现问题 The current branch is not configured for pull No value for key branch.master.merge found i
- javaWeb错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu
- 程序启动时报'webapp.root' =....Choose unique values for the 'webAppRootKey' context-param in your web.xml
- org.springframework.web.servlet.PageNotFound]-[WARN] No mapping found for HTTP request with URI [/re
- Using Windows Server 2012 Backup for Hyper-V Virtual Machines. Error 80780176 - The specified component was not reported by the VSS writer.
- iOS7 BUG:Your account is not valid for use in the ***Store...