Rich, you're the man, thanks for the patch!

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817287 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Wesley Wannemacher
2009-09-21 15:22:08 +00:00
parent 50f4589980
commit 9bc7147442
@@ -76,7 +76,15 @@ public class StrutsSpringObjectFactory extends SpringObjectFactory {
boolean useClassCache = "true".equals(useClassCacheStr);
LOG.info("Initializing Struts-Spring integration...");
ApplicationContext appContext = (ApplicationContext) servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
Object rootWebApplicationContext = servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
if(rootWebApplicationContext instanceof RuntimeException){
RuntimeException runtimeException = (RuntimeException)rootWebApplicationContext;
LOG.fatal(runtimeException.getMessage());
return;
}
ApplicationContext appContext = (ApplicationContext) rootWebApplicationContext;
if (appContext == null) {
// uh oh! looks like the lifecycle listener wasn't installed. Let's inform the user
String message = "********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION **********\n" +