summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/host-http/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-19 07:52:32 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-19 07:52:32 +0000
commitd3700527dbea081802e78cfbc3b6661c3f076dd3 (patch)
tree8fe95820696a162ec24984c1635b53b9af1c1588 /java/sca/modules/host-http/src
parent13516e275bec701dceb3ed78a2c8e685c4820f4f (diff)
Simplify implementation-web-runtime by adding a facility to set context attributes to the servlet host
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@745770 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/host-http/src')
-rw-r--r--java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java4
-rw-r--r--java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ServletHost.java7
2 files changed, 11 insertions, 0 deletions
diff --git a/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java b/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java
index 4be5de4100..5b11735166 100644
--- a/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java
+++ b/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java
@@ -120,4 +120,8 @@ public class ExtensibleServletHost implements ServletHost {
public void setContextPath(String path) {
getDefaultServletHost().setContextPath(path);
}
+
+ public void setAttribute(String name, Object value) {
+ getDefaultServletHost().setAttribute(name, value);
+ }
}
diff --git a/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ServletHost.java b/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ServletHost.java
index e5dbd59a07..2eb9f70601 100644
--- a/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ServletHost.java
+++ b/java/sca/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ServletHost.java
@@ -108,4 +108,11 @@ public interface ServletHost {
* @return the URL mapped to the specified URI
*/
URL getURLMapping(String uri);
+
+ /**
+ * Set an attribute in the application ServletContext
+ * @param name the name of the attribute
+ * @param value the attribute value
+ */
+ void setAttribute(String name, Object value);
}