tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r573230 - /incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
Date Thu, 06 Sep 2007 11:49:13 GMT
Author: antelder
Date: Thu Sep  6 04:49:12 2007
New Revision: 573230

URL: http://svn.apache.org/viewvc?rev=573230&view=rev
Log:
Fix getContextPath to use the context not the config

Modified:
    incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java

Modified: incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java?rev=573230&r1=573229&r2=573230&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
(original)
+++ incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
Thu Sep  6 04:49:12 2007
@@ -184,11 +184,12 @@
         if (Collections.list(config.getInitParameterNames()).contains("contextPath")) {
             contextPath = config.getInitParameter("contextPath");
         } else {
+            ServletContext context = config.getServletContext();
             Method m;
             try {
-                m = config.getClass().getMethod("getContextPath", new Class[]{});
+                m = context.getClass().getMethod("getContextPath", new Class[]{});
                 try {
-                    contextPath = (String)m.invoke(config, new Object[]{});
+                    contextPath = (String)m.invoke(context, new Object[]{});
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message