[java-idp-testbed COMMIT] in /trunk/src/main: java/Main.java resources/system/conf/testbed-opensaml.xml webapp/WEB-IN...
noreply at shibboleth.net
noreply at shibboleth.net
Tue May 13 13:14:04 EDT 2014
Author: tzeller
Date: Tue May 13 13:14:03 2014
New Revision: 225
URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=225&view=rev
Log:
Yank the IdP out of the testbed by adding the idp-war webapp context to the Jetty server.
Added:
trunk/src/main/resources/system/conf/testbed-opensaml.xml (with props)
Modified:
trunk/src/main/java/Main.java
trunk/src/main/webapp/WEB-INF/web.xml
Modified: trunk/src/main/java/Main.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/java/Main.java?rev=225&r1=224&r2=225&view=diff
==============================================================================
--- trunk/src/main/java/Main.java (original)
+++ trunk/src/main/java/Main.java Tue May 13 13:14:03 2014
@@ -21,6 +21,7 @@
import java.security.ProtectionDomain;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.xml.XmlConfiguration;
@@ -43,7 +44,7 @@
PathPropertySupport.setupIdPHomeProperties();
PathPropertySupport.setupIdPProperties();
PathPropertySupport.setupTestbedHomeProperty();
-
+
// Configure Jetty from jetty.xml.
final Path pathToJettyXML =
Paths.get(System.getProperty(PathPropertySupport.IDP_HOME), "system", "conf", "jetty.xml");
@@ -51,16 +52,30 @@
final XmlConfiguration configuration = new XmlConfiguration(fileserver_xml.getInputStream());
final Server server = (Server) configuration.configure();
- final WebAppContext webapp = new WebAppContext();
- webapp.setContextPath("/");
- server.setHandler(webapp);
+ // The SP and test webapps
+ final WebAppContext testbedWebapp = new WebAppContext();
+ testbedWebapp.setContextPath("/");
if (protectionDomain.getCodeSource().getLocation().toString().endsWith(".war")) {
// Running from command line.
- webapp.setWar(location.toExternalForm());
+ testbedWebapp.setWar(location.toExternalForm());
} else {
// Running from Eclipse.
- webapp.setWar("src/main/webapp");
+ testbedWebapp.setWar("src/main/webapp");
}
+
+ // The IdP web app
+ // TODO support running from command line
+ final Path idpWebappPath =
+ Paths.get(Paths.get("").toAbsolutePath().getParent().toAbsolutePath().toString(),
+ "java-identity-provider", "idp-war", "src", "main", "webapp");
+ final WebAppContext idpWebapp = new WebAppContext();
+ idpWebapp.setContextPath("/idp");
+ idpWebapp.setWar(idpWebappPath.toString());
+
+ final ContextHandlerCollection contexts = new ContextHandlerCollection();
+ contexts.addHandler(testbedWebapp);
+ contexts.addHandler(idpWebapp);
+ server.setHandler(contexts);
server.start();
server.join();
@@ -68,5 +83,5 @@
e.printStackTrace();
}
}
-
+
}
Modified: trunk/src/main/webapp/WEB-INF/web.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/webapp/WEB-INF/web.xml?rev=225&r1=224&r2=225&view=diff
==============================================================================
--- trunk/src/main/webapp/WEB-INF/web.xml (original)
+++ trunk/src/main/webapp/WEB-INF/web.xml Tue May 13 13:14:03 2014
@@ -5,49 +5,13 @@
<!-- Context config params -->
<context-param>
<param-name>contextConfigLocation</param-name>
- <param-value>file:///${testbed.home}/system/conf/testbed-ldap.xml file:///${idp.home}/system/conf/global-system.xml file:///${idp.home}/conf/global-user.xml file:///${testbed.home}/system/conf/testbed-beans.xml</param-value>
+ <param-value>file:///${testbed.home}/system/conf/testbed-opensaml.xml file:///${testbed.home}/system/conf/testbed-ldap.xml file:///${testbed.home}/system/conf/testbed-beans.xml</param-value>
</context-param>
<!-- Listeners -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
-
- <!-- Filters and filter mappings -->
- <filter>
- <filter-name>CookieBufferingFilter</filter-name>
- <filter-class>net.shibboleth.utilities.java.support.net.CookieBufferingFilter</filter-class>
- </filter>
- <filter>
- <filter-name>DelegatingFilterProxy</filter-name>
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
- <init-param>
- <param-name>targetBeanName</param-name>
- <param-value>shibboleth.ClientStorageService</param-value>
- </init-param>
- </filter>
- <filter>
- <filter-name>RequestResponseContextFilter</filter-name>
[... 63 lines stripped ...]
More information about the commits
mailing list