Jetty9部署Spring3+Struts2的BUG
Jetty是目前JAVA WEB容器的新宠儿,收到了包括Google在内很多家企业的青睐。
不过最新版Jetty9却在部署Spring和Struts时有一个很严重的BUG。
部署了struts2-spring-plugin-2.3.1.2.jar后,Jetty9启动时抛出异常
FATAL StrutsSpringObjectFactory:89 - ********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION **********
Looks like the Spring listener was not configured for your web app!
Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.
You might need to add the following to web.xml:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
我试了整整一个下午这个BUG都没办法解决。最终到Eclipse官网下载了Jetty8,Spring+Struts环境才能够顺利部署下去。
浙公网安备 33010602011771号