4 Jul 2005 00:16
svn commit: r208989 - in /cocoon/trunk/src/java/org/apache/cocoon: environment/http/HttpContext.java servlet/CocoonServlet.java
<danielf <at> apache.org>
2005-07-03 22:16:39 GMT
2005-07-03 22:16:39 GMT
Author: danielf Date: Sun Jul 3 15:16:36 2005 New Revision: 208989 URL: http://svn.apache.org/viewcvs?rev=208989&view=rev Log: Using /WEB-INF/web.xml for finding out the root servlet path instead of just /WEB-INF as the bundle protocol in OSGi has problems with accessing directories. Hopefully it doesn't affect existing code. Modified: cocoon/trunk/src/java/org/apache/cocoon/environment/http/HttpContext.java cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java Modified: cocoon/trunk/src/java/org/apache/cocoon/environment/http/HttpContext.java URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/http/HttpContext.java?rev=208989&r1=208988&r2=208989&view=diff ============================================================================== --- cocoon/trunk/src/java/org/apache/cocoon/environment/http/HttpContext.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/environment/http/HttpContext.java Sun Jul 3 15:16:36 2005 <at> <at> -76,11 +76,11 <at> <at> if (value == null) { // Try to figure out the path of the root from that of WEB-INF try { - value = this.servletContext.getResource("/WEB-INF").toString(); + value = this.servletContext.getResource("/WEB-INF/web.xml").toString(); } catch (MalformedURLException mue) { throw new CascadingRuntimeException("Cannot determine the base URL for " + path, mue); } - value = value.substring(0,value.length()-"WEB-INF".length()); + value = value.substring(0,value.length()-"WEB-INF/web.xml".length());(Continue reading)
RSS Feed