You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/11/06 14:39:36 UTC
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ApplicationContext.java
remm 2002/11/06 05:39:36
Modified: catalina/src/share/org/apache/catalina/core
ApplicationContext.java
Log:
- Port patch for bug 13583.
Revision Changes Path
1.40 +15 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
Index: ApplicationContext.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- ApplicationContext.java 28 Jun 2002 01:35:34 -0000 1.39
+++ ApplicationContext.java 6 Nov 2002 13:39:36 -0000 1.40
@@ -589,7 +589,8 @@
if (!path.startsWith("/"))
throw new IllegalArgumentException
(sm.getString("applicationContext.requestDispatcher.iae", path));
- if (normalize(path) == null)
+ path = normalize(path);
+ if (path == null)
return (null);
// Construct a "fake" request to be mapped by our Context
@@ -649,6 +650,11 @@
*/
public URL getResource(String path)
throws MalformedURLException {
+
+ path = normalize(path);
+ if (path == null)
+ return (null);
+
DirContext resources = context.getResources();
if (resources != null) {
String fullPath = context.getName() + path;
@@ -687,6 +693,10 @@
* @param path The path to the desired resource.
*/
public InputStream getResourceAsStream(String path) {
+
+ path = normalize(path);
+ if (path == null)
+ return (null);
DirContext resources = context.getResources();
if (resources != null) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>