summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2013-09-22 20:25:21 -0700
committerJesse Morgan <jesse@jesterpm.net>2013-09-22 20:25:21 -0700
commitf2bd99c91b3d615c9fea4f9195fe1a888a2d93e8 (patch)
tree94713c5fbf5d4270af4b25518ec83e9de0766bc2 /web
parente18831fb897c7b9ea7bf7045ebaaf00f94e01acc (diff)
Fixing tomcat config overrides.20130922b
Finally fixing config overrides. Found a bug? in restlet where the Servlet context parameters aren't passed to the final application. I'm working around the issue by creating my own component which builds the config and shares it with the frontend and backend. Overall I think it's a much more elegant solution. Now we have the ability to specify an external config file for the F1 credentials and the ability configure different domains in different tomcat containers.
Diffstat (limited to 'web')
-rw-r--r--web/META-INF/context.xml2
-rw-r--r--web/WEB-INF/restlet.xml20
-rw-r--r--web/WEB-INF/web.xml4
3 files changed, 5 insertions, 21 deletions
diff --git a/web/META-INF/context.xml b/web/META-INF/context.xml
index 24744f5..c8a8f07 100644
--- a/web/META-INF/context.xml
+++ b/web/META-INF/context.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context>
- <Parameter name="configFile" value="grow.properties" override="false"/>
+ <Parameter name="com.p4square.grow.configDomain" value="prod" override="true"/>
</Context>
diff --git a/web/WEB-INF/restlet.xml b/web/WEB-INF/restlet.xml
deleted file mode 100644
index 67ee36d..0000000
--- a/web/WEB-INF/restlet.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<component xmlns="http://www.restlet.org/schemas/2.0/Component">
- <client protocol="FILE" />
- <client protocol="HTTP" />
- <client protocol="HTTPS" />
- <server protocols="HTTP HTTPS" />
-
- <defaultHost>
- <attach uripattern="/images" targetDescriptor="war:///images" />
- <attach uripattern="/scripts" targetDescriptor="war:///scripts" />
- <attach uripattern="/style.css" targetDescriptor="war:///style.css" />
- <attach uripattern="/favicon.ico" targetDescriptor="war:///favicon.ico" />
- <attach uriPattern="" targetClass="com.p4square.grow.frontend.GrowFrontend" />
- </defaultHost>
-
- <internalRouter>
- <attach uriPattern="/backend"
- targetClass="com.p4square.grow.backend.GrowBackend" />
- </internalRouter>
-</component>
diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml
index 758b004..4b85bde 100644
--- a/web/WEB-INF/web.xml
+++ b/web/WEB-INF/web.xml
@@ -14,6 +14,10 @@
<servlet-class>
org.restlet.ext.servlet.ServerServlet
</servlet-class>
+ <init-param>
+ <param-name>org.restlet.component</param-name>
+ <param-value>com.p4square.grow.GrowProcessComponent</param-value>
+ </init-param>
</servlet>
<!-- Catch all requests -->