tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspCompilationContext.java
Date Thu, 09 Sep 2004 21:28:13 GMT
remm        2004/09/09 14:28:13

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        JDTCompiler.java
               jasper2/src/share/org/apache/jasper
                        JspCompilationContext.java
  Log:
  - Fix tag files (which may be nice from a user perspective, but from an implementation perspective,
it's another story).
  - The behavior of JDT is completely different from a regular compiler, so it needs a little
extra trick to see the tagfile class when compiling.
  
  Revision  Changes    Path
  1.4       +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java
  
  Index: JDTCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JDTCompiler.java	2 Sep 2004 16:28:07 -0000	1.3
  +++ JDTCompiler.java	9 Sep 2004 21:28:13 -0000	1.4
  @@ -87,7 +87,7 @@
           final String targetClassName = 
               ((packageName.length() != 0) ? (packageName + ".") : "") 
                       + ctxt.getServletClassName();
  -        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
  +        final ClassLoader classLoader = ctxt.getJspLoader();
           String[] fileNames = new String[] {sourceFile};
           String[] classNames = new String[] {targetClassName};
           final ArrayList problemList = new ArrayList();
  
  
  
  1.53      +12 -5     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java
  
  Index: JspCompilationContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- JspCompilationContext.java	1 Sep 2004 22:54:13 -0000	1.52
  +++ JspCompilationContext.java	9 Sep 2004 21:28:13 -0000	1.53
  @@ -170,6 +170,17 @@
           this.loader = loader;
       }
   
  +    public ClassLoader getJspLoader() {
  +        if( jspLoader == null ) {
  +            jspLoader = new JasperLoader
  +            (new URL[] {baseUrl},
  +                    getClassLoader(),
  +                    rctxt.getPermissionCollection(),
  +                    rctxt.getCodeSource());
  +        }
  +        return jspLoader;
  +    }
  +
       /** ---------- Input/Output  ---------- */
       
       /**
  @@ -566,11 +577,7 @@
           throws JasperException, FileNotFoundException
       {
           try {
  -            jspLoader = new JasperLoader
  -                (new URL[] {baseUrl},
  -                 getClassLoader(),
  -                 rctxt.getPermissionCollection(),
  -                 rctxt.getCodeSource());
  +            getJspLoader();
               
               String name;
               if (isTagFile()) {
  
  
  

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


Mime
View raw message