From 7fa9a959b53f38dcdc4f6b6fe805ecaa83ac1065 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Tue, 16 Dec 2008 21:13:03 +0000 Subject: [PATCH] Added webAppRootKey context-param to samples to prevent conflicts when run together in Tomcat. --- .../client/src/main/webapp/WEB-INF/web.xml | 65 +++++----- .../contacts/src/main/webapp/WEB-INF/web.xml | 116 +++++++++--------- samples/ldap/src/main/webapp/WEB-INF/web.xml | 5 + .../webapp/WEB-INF/classes/log4j.properties | 13 +- .../heavyduty/src/main/webapp/WEB-INF/web.xml | 77 ++++++------ 5 files changed, 143 insertions(+), 133 deletions(-) diff --git a/samples/cas/client/src/main/webapp/WEB-INF/web.xml b/samples/cas/client/src/main/webapp/WEB-INF/web.xml index f5b60bf375..d208d5e6d5 100644 --- a/samples/cas/client/src/main/webapp/WEB-INF/web.xml +++ b/samples/cas/client/src/main/webapp/WEB-INF/web.xml @@ -12,61 +12,66 @@ Spring Security CAS Demo Application - - contextConfigLocation - - /WEB-INF/applicationContext-security.xml - - + - Location of the XML file that defines the root application context + - Applied by ContextLoaderListener. + --> + + contextConfigLocation + + /WEB-INF/applicationContext-security.xml + + log4jConfigLocation /WEB-INF/classes/log4j.properties - - CAS Single Sign Out Filter - org.jasig.cas.client.session.SingleSignOutFilter - + + webAppRootKey + cas.root + + + + CAS Single Sign Out Filter + org.jasig.cas.client.session.SingleSignOutFilter + springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy - - CAS Single Sign Out Filter - /* - + + CAS Single Sign Out Filter + /* + springSecurityFilterChain /* - - - org.jasig.cas.client.session.SingleSignOutHttpSessionListener - + + org.jasig.cas.client.session.SingleSignOutHttpSessionListener + - - org.springframework.web.context.ContextLoaderListener - + + org.springframework.web.context.ContextLoaderListener + org.springframework.web.util.Log4jConfigListener - + org.springframework.security.ui.session.HttpSessionEventPublisher diff --git a/samples/contacts/src/main/webapp/WEB-INF/web.xml b/samples/contacts/src/main/webapp/WEB-INF/web.xml index ce91b2378c..669a9fbc32 100644 --- a/samples/contacts/src/main/webapp/WEB-INF/web.xml +++ b/samples/contacts/src/main/webapp/WEB-INF/web.xml @@ -12,26 +12,30 @@ Contacts Sample Application - - - contextConfigLocation - - /WEB-INF/applicationContext-security.xml - classpath:applicationContext-common-business.xml - classpath:applicationContext-common-authorization.xml - - + + + contextConfigLocation + + /WEB-INF/applicationContext-security.xml + classpath:applicationContext-common-business.xml + classpath:applicationContext-common-authorization.xml + + - - log4jConfigLocation - /WEB-INF/classes/log4j.properties - + + log4jConfigLocation + /WEB-INF/classes/log4j.properties + + + webAppRootKey + contacts.root + springSecurityFilterChain @@ -43,18 +47,18 @@ /* - - - org.springframework.web.context.ContextLoaderListener - + + org.springframework.web.context.ContextLoaderListener + - - org.springframework.web.util.Log4jConfigListener - + + org.springframework.web.util.Log4jConfigListener + - - contacts - org.springframework.web.servlet.DispatcherServlet - 1 - + + contacts + org.springframework.web.servlet.DispatcherServlet + 1 + - - remoting - org.springframework.web.servlet.DispatcherServlet - 2 - - - - contacts - *.htm - - - - remoting - /remoting/* - - - - index.jsp - - - - 403 - /error.html - + + remoting + org.springframework.web.servlet.DispatcherServlet + 2 + + + + contacts + *.htm + + + + remoting + /remoting/* + + + + index.jsp + + + + 403 + /error.html + diff --git a/samples/ldap/src/main/webapp/WEB-INF/web.xml b/samples/ldap/src/main/webapp/WEB-INF/web.xml index 38d3b7d50f..05dae3ab99 100644 --- a/samples/ldap/src/main/webapp/WEB-INF/web.xml +++ b/samples/ldap/src/main/webapp/WEB-INF/web.xml @@ -22,6 +22,11 @@ + + webAppRootKey + ldap.root + + springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/log4j.properties b/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/log4j.properties index 0ce72aa265..4859cd5307 100755 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/log4j.properties +++ b/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/log4j.properties @@ -1,19 +1,10 @@ # Global logging configuration log4j.rootLogger=DEBUG, stdout -log4j.logger.org.springframework.security=DEBUG, stdout -log4j.logger.org.apache.directory=INFO, stdout +log4j.logger.org.springframework.security=DEBUG +log4j.logger.org.apache.directory=INFO # Console output... log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.conversionPattern=[%p,%c{1},%L] - %m%n - -# Rolling log file output... -#log4j.appender.fileout=org.apache.log4j.RollingFileAppender -#log4j.appender.fileout.File=spring-security-tutorial.log -#log4j.appender.fileout.File=${webapp.root}/WEB-INF/log4j.log -#log4j.appender.fileout.MaxFileSize=1024KB -#log4j.appender.fileout.MaxBackupIndex=1 -#log4j.appender.fileout.layout=org.apache.log4j.PatternLayout -#log4j.appender.fileout.layout.conversionPattern=%d{ABSOLUTE} %5p %c{1},%t:%L - %m%n diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/web.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/web.xml index f43928bc2d..1d6f237482 100755 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/web.xml +++ b/sandbox/heavyduty/src/main/webapp/WEB-INF/web.xml @@ -10,24 +10,29 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> Spring Security Tutorial Application - + - - contextConfigLocation - - classpath:applicationContext-business.xml - /WEB-INF/appContext-persistence.xml - /WEB-INF/appContext-security.xml - - - + - Location of the XML file that defines the root application context + - Applied by ContextLoaderListener. + --> + + contextConfigLocation + + classpath:applicationContext-business.xml + /WEB-INF/appContext-persistence.xml + /WEB-INF/appContext-security.xml + + + log4jConfigLocation /WEB-INF/classes/log4j.properties - + + + + webAppRootKey + heavyduty.root + springSecurityFilterChain @@ -43,39 +48,39 @@ org.springframework.web.util.Log4jConfigListener - - - org.springframework.web.context.ContextLoaderListener - + + org.springframework.web.context.ContextLoaderListener + - org.springframework.security.ui.session.HttpSessionEventPublisher - - heavyduty - org.springframework.web.servlet.DispatcherServlet - 1 - + + heavyduty + org.springframework.web.servlet.DispatcherServlet + 1 + - - heavyduty - *.htm - + + heavyduty + *.htm + - index.jsp - + index.jsp +