tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java
Date Tue, 21 Jan 2003 19:44:42 GMT
costin      2003/01/21 11:44:42

  Modified:    jasper2/src/share/org/apache/jasper JspC.java
  Log:
  Support for packages in precompiled servlets - otherwise all go to the
  same package and we get conflicts.
  
  Revision  Changes    Path
  1.21      +8 -5      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JspC.java	31 Dec 2002 14:01:17 -0000	1.20
  +++ JspC.java	21 Jan 2003 19:44:42 -0000	1.21
  @@ -547,7 +547,10 @@
                   targetClassName = null;
               }
               if (targetPackage != null) {
  -                clctxt.setServletPackageName(targetPackage);
  +                int baseLen=jspUri.lastIndexOf("/");
  +                if( baseLen <0 ) baseLen=0;
  +                String packageSubs= jspUri.substring(0, baseLen).replace( '/', '.' );
  +                clctxt.setServletPackageName( targetPackage + "." + packageSubs);
               }
               
               setupContext(clctxt);
  @@ -593,7 +596,7 @@
               } else if (dieLevel != NO_DIE_LEVEL) {
                   dieOnExit = true;
               }
  -            throw new JasperException( e );
  +            throw new JasperException( "Error compiling " + file, e );
           }
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message