mirror of
https://github.com/apache/struts.git
synced 2026-08-06 23:27:07 +00:00
ww-3230
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:
+9
-1
@@ -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" +
|
||||
|
||||
Reference in New Issue
Block a user