You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/09/06 13:49:13 UTC
svn commit: r573230 -
/incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
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