Under NT (and presumably any OS where File.sep != '/') JspC has a stack underflow at baseDirStack.peek() in ParserController.java. This patch converts from '\' to '/' for those cases. It also sets the package name for the class based on the URI, so that the java file is distinguished from others with the same name.
 
 

<><><><><><><><><><><><><><><><><><><><><>This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail. <><><><><><><><><><><><><><><><><><><><><>

? org/apache/jasper/.nbattrs
? org/apache/jasper/compiler/.nbattrs
Index: org/apache/jasper/CommandLineContext.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/CommandLineContext.java,v
retrieving revision 1.6
diff -u -r1.6 CommandLineContext.java
--- org/apache/jasper/CommandLineContext.java   2001/02/08 13:36:56     1.6
+++ org/apache/jasper/CommandLineContext.java   2001/03/02 14:15:42
@@ -113,7 +113,8 @@
         classPath = newClassPath;
         uriBase = newUriBase;
         String tUriRoot = newUriRoot;
-        jspFile = newJspFile;
+        //Convert from FileSystem to URI namespace
+        jspFile = newJspFile.replace(File.separatorChar, '/'); 
         // hack fix for resolveRelativeURI
         errPage = newErrPage;
         options = newOptions;
@@ -130,6 +131,10 @@
             uriBase += '/';
         }
 
+        servletPackageName = uriBase.substring(1).replace('/', '.');
+        int l = servletPackageName.length();
+        servletPackageName = servletPackageName.substring(0, l - 1);
+        
         if (tUriRoot == null) {
             uriRoot = new File("");
         } else {
Index: org/apache/jasper/JspC.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v
retrieving revision 1.8
diff -u -r1.8 JspC.java
--- org/apache/jasper/JspC.java 2001/02/04 01:03:42     1.8
+++ org/apache/jasper/JspC.java 2001/03/02 14:15:43
@@ -487,6 +487,9 @@
             if (tUriBase == null) {
                 tUriBase = "/";
             }
+            if (! tUriBase.startsWith("/")) {
+                tUriBase = "/" + tUriBase;
+            }
             try {
                 if (f.exists()) {
                     f = new File(f.getCanonicalPath());
@@ -501,7 +504,7 @@
                             break;
                         }
                         if (f.exists() && f.isDirectory()) {
-                            tUriBase = "/" + f.getName() + "/" + tUriBase;
+                            tUriBase = "/" + f.getName() + tUriBase;
                         }
                         
                         String fParent = f.getParent();
@@ -647,6 +650,8 @@
                     if (nextjsp.startsWith("." + File.separatorChar)) {
                         nextjsp = nextjsp.substring(2);
                     }
+                    
+                    nextjsp = nextjsp.replace(File.separatorChar, '/');
 
                     parseFile(log, nextjsp, servletout, mappingout);
                 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to