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 EmbeddedServletOptions.java JspCompilationContext.java
Date Wed, 01 Sep 2004 22:54:14 GMT
remm        2004/09/01 15:54:13

  Modified:    jasper2/src/share/org/apache/jasper
                        EmbeddedServletOptions.java
                        JspCompilationContext.java
  Log:
  - Handle configuring JDT and Ant using the compiler parameter. It's not final yet ;)
  
  Revision  Changes    Path
  1.12      +1 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java
  
  Index: EmbeddedServletOptions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- EmbeddedServletOptions.java	23 Jul 2004 22:45:38 -0000	1.11
  +++ EmbeddedServletOptions.java	1 Sep 2004 22:54:13 -0000	1.12
  @@ -96,7 +96,7 @@
       /**
        * JSP reloading check ?
        */
  -    private boolean reloading = true;
  +    private boolean reloading = false;
   
       /**
        * Is the generation of SMAP info for JSR45 debuggin suppressed?
  
  
  
  1.52      +20 -14    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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- JspCompilationContext.java	17 Aug 2004 22:25:01 -0000	1.51
  +++ JspCompilationContext.java	1 Sep 2004 22:54:13 -0000	1.52
  @@ -195,26 +195,32 @@
               return jspCompiler;
           }
           jspCompiler = null;
  -        try {
  -            jspCompiler = 
  -                (Compiler) Class.forName("org.apache.jasper.compiler.JDTCompiler").newInstance();
  -        } catch (Throwable t) {
  -            // Log ?
  -            // FIXME: log
  -        }
  -        if (jspCompiler == null) {
  -            try {
  -                jspCompiler = 
  -                    (Compiler) Class.forName("org.apache.jasper.compiler.AntCompiler").newInstance();
  -            } catch (Throwable t) {
  -                // Log ?
  -                // FIXME: log
  +        if (options.getCompiler() == null) {
  +            jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler");
  +            if (jspCompiler == null) {
  +                jspCompiler = createCompiler("org.apache.jasper.compiler.AntCompiler");
  +            }
  +        } else {
  +            jspCompiler = createCompiler("org.apache.jasper.compiler.AntCompiler");
  +            if (jspCompiler == null) {
  +                jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler");
               }
           }
           jspCompiler.init(this, jsw);
           return jspCompiler;
       }
   
  +    private static Compiler createCompiler(String className) {
  +        Compiler compiler = null; 
  +        try {
  +            compiler = (Compiler) Class.forName(className).newInstance();
  +        } catch (Throwable t) {
  +            // Log ?
  +            // FIXME: log
  +        }
  +        return compiler;
  +    }
  +    
       public Compiler getCompiler() {
           return jspCompiler;
       }
  
  
  

---------------------------------------------------------------------
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