larryi      01/11/30 14:17:40

  Modified:    jasper/src/share/org/apache/jasper Tag: tomcat_40_branch
                        EmbededServletOptions.java JspC.java Options.java
               jasper/src/share/org/apache/jasper/compiler Tag:
                        tomcat_40_branch Compiler.java JavaCompiler.java
                        JikesJavaCompiler.java SunJavaCompiler.java
               jasper/src/share/org/apache/jasper/resources Tag:
                        tomcat_40_branch messages.properties
                        messages_es.properties messages_ja.properties
  Log:
  For the few who need it, add a "classdebuginfo" init parameter to enable
  compiling the class file with debugging information.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +24 -3     
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java
  
  Index: EmbededServletOptions.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- EmbededServletOptions.java        2001/02/04 01:03:28     1.6
  +++ EmbededServletOptions.java        2001/11/30 22:17:39     1.6.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
 1.6 2001/02/04 01:03:28 glenn Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/02/04 01:03:28 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
 1.6.2.1 2001/11/30 22:17:39 larryi Exp $
  + * $Revision: 1.6.2.1 $
  + * $Date: 2001/11/30 22:17:39 $
    *
    * ====================================================================
    * 
  @@ -106,6 +106,11 @@
       public boolean sendErrorToClient = false;
   
       /**
  +     * Do we want to include debugging information in the class file?
  +     */
  +    public boolean classDebugInfo = false;
  +
  +    /**
        * I want to see my generated servlets. Which directory are they
        * in?
        */
  @@ -173,6 +178,13 @@
       }
    
       /**
  +     * Should class files be compiled with debug information?
  +     */
  +    public boolean getClassDebugInfo() {
  +        return classDebugInfo;
  +    }
  +
  +    /**
        * Class ID for use in the plugin tag when the browser is IE. 
        */
       public String getIeClassId() {
  @@ -257,6 +269,15 @@
               else if (senderr.equalsIgnoreCase("false"))
                   this.sendErrorToClient = false;
               else Constants.message ("jsp.warning.sendErrToClient", Logger.WARNING);
  +        }
  +
  +        String debugInfo = config.getInitParameter("classdebuginfo");
  +        if (debugInfo != null) {
  +            if (debugInfo.equalsIgnoreCase("true"))
  +                this.classDebugInfo  = true;
  +            else if (debugInfo.equalsIgnoreCase("false"))
  +                this.classDebugInfo  = false;
  +            else Constants.message ("jsp.warning.classDebugInfo", Logger.WARNING);
           }
   
           String ieClassId = config.getInitParameter("ieClassId");
  
  
  
  1.12.2.1  +8 -3      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- JspC.java 2001/09/18 00:16:34     1.12
  +++ JspC.java 2001/11/30 22:17:39     1.12.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.12 
2001/09/18 00:16:34 craigmcc Exp $
  - * $Revision: 1.12 $
  - * $Date: 2001/09/18 00:16:34 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.12.2.1 
2001/11/30 22:17:39 larryi Exp $
  + * $Revision: 1.12.2.1 $
  + * $Date: 2001/11/30 22:17:39 $
    *
    * ====================================================================
    * 
  @@ -181,6 +181,11 @@
           return true;
       }
    
  +    public boolean getClassDebugInfo() {
  +        // compile with debug info
  +        return false;
  +    }
  +
       public String getIeClassId() {
           return ieClassId;
       }
  
  
  
  1.6.2.1   +8 -3      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Options.java
  
  Index: Options.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Options.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- Options.java      2001/02/04 01:04:11     1.6
  +++ Options.java      2001/11/30 22:17:39     1.6.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Options.java,v 1.6 
2001/02/04 01:04:11 glenn Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/02/04 01:04:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Options.java,v 1.6.2.1 
2001/11/30 22:17:39 larryi Exp $
  + * $Revision: 1.6.2.1 $
  + * $Date: 2001/11/30 22:17:39 $
    *
    * ====================================================================
    * 
  @@ -97,6 +97,11 @@
        */
       public boolean getSendErrorToClient();
    
  +    /**
  +     * Should we include debug information in compiled class?
  +     */
  +    public boolean getClassDebugInfo();
  +
       /**
        * Class ID for use in the plugin tag when the browser is IE. 
        */
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.12.2.3  +4 -3      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.12.2.2
  retrieving revision 1.12.2.3
  diff -u -r1.12.2.2 -r1.12.2.3
  --- Compiler.java     2001/10/04 19:20:08     1.12.2.2
  +++ Compiler.java     2001/11/30 22:17:40     1.12.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Compiler.java,v
 1.12.2.2 2001/10/04 19:20:08 kinman Exp $
  - * $Revision: 1.12.2.2 $
  - * $Date: 2001/10/04 19:20:08 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Compiler.java,v
 1.12.2.3 2001/11/30 22:17:40 larryi Exp $
  + * $Revision: 1.12.2.3 $
  + * $Date: 2001/11/30 22:17:40 $
    *
    * ====================================================================
    * 
  @@ -264,6 +264,7 @@
           javac.setClasspath( System.getProperty("java.class.path")+ sep + classpath);
           javac.setOutputDir(ctxt.getJavacOutputDir());
           javac.setMsgOutput(out);
  +        javac.setClassDebugInfo(ctxt.getOptions().getClassDebugInfo());
   
           /**
            * Execute the compiler
  
  
  
  1.1.4.1   +8 -3      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JavaCompiler.java
  
  Index: JavaCompiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JavaCompiler.java,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- JavaCompiler.java 2000/08/12 00:52:08     1.1
  +++ JavaCompiler.java 2001/11/30 22:17:40     1.1.4.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JavaCompiler.java,v
 1.1 2000/08/12 00:52:08 pierred Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/12 00:52:08 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JavaCompiler.java,v
 1.1.4.1 2001/11/30 22:17:40 larryi Exp $
  + * $Revision: 1.1.4.1 $
  + * $Date: 2001/11/30 22:17:40 $
    *
    * ====================================================================
    * 
  @@ -96,6 +96,11 @@
        * Set where you want the compiler output (messages) to go 
        */ 
       void setMsgOutput(OutputStream out);
  +
  +    /**
  +     * Set if you want debugging information in the class file 
  +     */ 
  +    void setClassDebugInfo(boolean classDebugInfo);
   
       /**
        * Execute the compiler
  
  
  
  1.5.2.1   +22 -7     
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java
  
  Index: JikesJavaCompiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- JikesJavaCompiler.java    2001/08/14 20:52:43     1.5
  +++ JikesJavaCompiler.java    2001/11/30 22:17:40     1.5.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
 1.5 2001/08/14 20:52:43 seguin Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/08/14 20:52:43 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
 1.5.2.1 2001/11/30 22:17:40 larryi Exp $
  + * $Revision: 1.5.2.1 $
  + * $Date: 2001/11/30 22:17:40 $
    *
    * ====================================================================
    *
  @@ -92,6 +92,7 @@
       String compilerPath = "jikes";
       String outdir;
       OutputStream out;
  +    boolean classDebugInfo=false;
   
       /**
        * Specify where the compiler can be found
  @@ -151,6 +152,13 @@
         this.out = out;
       }
   
  +    /**
  +     * Set if you want debugging information in the class file
  +     */
  +    public void setClassDebugInfo(boolean classDebugInfo) {
  +        this.classDebugInfo = classDebugInfo;
  +    }
  +
      /**
        * Execute the compiler
        * @param source - file name of the source to be compiled
  @@ -179,8 +187,8 @@
   
           String[] compilerCmd = null;
   
  -     if( outdir != null ) {
  -         compilerCmd = new String[] {
  +        if( outdir != null ) {
  +            compilerCmd = new String[] {
                quote + compilerPath + quote,
                //XXX - add encoding once Jikes supports it
                "-classpath", quote + classpath + MicrosoftClasspath + quote,
  @@ -189,7 +197,7 @@
                   "+E",
                quote + source + quote
               };
  -     } else {
  +        } else {
               compilerCmd = new String[] {
                   quote + compilerPath + quote,
                   //XXX - add encoding once Jikes supports it
  @@ -198,7 +206,14 @@
                   "+E",
                   quote + source + quote    
               };
  -     }
  +        }
  +        if( classDebugInfo ) {
  +            String[] compilerCmd2 = new String[compilerCmd.length + 1];
  +            compilerCmd2[0] = compilerCmd[0];
  +            compilerCmd2[1] = "-g";
  +            System.arraycopy(compilerCmd,1,compilerCmd2,2,compilerCmd.length - 1);
  +            compilerCmd=compilerCmd2;
  +        }
   
           ByteArrayOutputStream tmpErr = new 
ByteArrayOutputStream(OUTPUT_BUFFER_SIZE);
        try {
  
  
  
  1.2.2.1   +21 -7     
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/SunJavaCompiler.java
  
  Index: SunJavaCompiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/SunJavaCompiler.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- SunJavaCompiler.java      2001/02/08 13:38:02     1.2
  +++ SunJavaCompiler.java      2001/11/30 22:17:40     1.2.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/SunJavaCompiler.java,v
 1.2 2001/02/08 13:38:02 glenn Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/02/08 13:38:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/SunJavaCompiler.java,v
 1.2.2.1 2001/11/30 22:17:40 larryi Exp $
  + * $Revision: 1.2.2.1 $
  + * $Date: 2001/11/30 22:17:40 $
    *
    * ====================================================================
    * 
  @@ -80,6 +80,7 @@
       String compilerPath;
       String outdir;
       OutputStream out;
  +    boolean classDebugInfo=false;
   
       /**
        * Specify where the compiler can be found
  @@ -123,12 +124,19 @@
       public void setOut(OutputStream out) {
           this.out = out;
       }
  +
  +    /**
  +     * Set if you want debugging information in the class file 
  +     */ 
  +    public void setClassDebugInfo(boolean classDebugInfo) {
  +        this.classDebugInfo = classDebugInfo;
  +    }
       
       public boolean compile(String source) {
           Main compiler = new Main(out, "jsp->javac");
  -     String[] args = null;
  +        String[] args = null;
   
  -     if( outdir != null ) {
  +        if( outdir != null ) {
               args = new String[]
               {
                   "-encoding", encoding,
  @@ -136,14 +144,20 @@
                   "-d", outdir,
                   source
               };
  -     } else {
  +        } else {
               args = new String[]
               {
                   "-encoding", encoding,
                   "-classpath", classpath,
                   source       
               };
  -     }
  +        }
  +        if( classDebugInfo ) {
  +            String[] args2 = new String[args.length + 1];
  +            args2[0] = "-g";
  +            System.arraycopy(args,0,args2,1,args.length);
  +            args=args2;
  +        }
   
           return compiler.compile(args);
       }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.20.2.3  +2 -1      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.20.2.2
  retrieving revision 1.20.2.3
  diff -u -r1.20.2.2 -r1.20.2.3
  --- messages.properties       2001/11/21 02:09:55     1.20.2.2
  +++ messages.properties       2001/11/30 22:17:40     1.20.2.3
  @@ -1,4 +1,4 @@
  -# $Id: messages.properties,v 1.20.2.2 2001/11/21 02:09:55 kinman Exp $
  +# $Id: messages.properties,v 1.20.2.3 2001/11/30 22:17:40 larryi Exp $
   #
   # Default localized string information
   # Localized this the Default Locale as is en_US
  @@ -115,6 +115,7 @@
   largeFile. Will use the default value of \"true\"
   jsp.warning.mappedFile=Warning: Invalid value for the initParam mappedFile. Will 
use the default value of \"false\"
   jsp.warning.sendErrToClient=Warning: Invalid value for the initParam 
sendErrToClient. Will use the default value of \"false\"
  +jsp.warning.classDebugInfo=Warning: Invalid value for the initParam classdebuginfo. 
Will use the default value of \"false\"
   jsp.error.badtaglib=Unable to open taglibrary {0} : {1}
   jsp.error.badGetReader=Cannot create a reader when the stream is not buffered
   jsp.warning.unknown.element.in.TLD=Warning: Unknown element {0} in TLD
  
  
  
  1.8.2.2   +2 -1      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages_es.properties
  
  Index: messages_es.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages_es.properties,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -r1.8.2.1 -r1.8.2.2
  --- messages_es.properties    2001/11/21 02:09:55     1.8.2.1
  +++ messages_es.properties    2001/11/30 22:17:40     1.8.2.2
  @@ -1,4 +1,4 @@
  -# $Id: messages_es.properties,v 1.8.2.1 2001/11/21 02:09:55 kinman Exp $
  +# $Id: messages_es.properties,v 1.8.2.2 2001/11/30 22:17:40 larryi Exp $
   #
   # Default localized string information
   # Localized para Locale es_ES
  @@ -99,6 +99,7 @@
   jsp.warning.largeFile=Aviso: valor incorrecto para el initParam largeFile. se usara 
el valor por defecto de \"true\"
   jsp.warning.mappedFile=Aviso: valor incorrecto para the initParam mappedFile. se 
usara el valor por defecto de \"false\"
   jsp.warning.sendErrToClient=Aviso: valor incorrecto para the initParam 
sendErrToClient. se usara el valor por defecto de \"false\"
  +jsp.warning.classDebugInfo=Aviso: valor incorrecto para the initParam 
classdebuginfo. se usara el valor por defecto de \"false\"
   jsp.error.badtaglib=No se puede abrir la libreria de tags {0} : {1}
   jsp.error.badGetReader=No se puede crear un reader cuando el stream no tiene buffer
   jsp.warning.unknown.element.in.TLD=Aviso: Elemento {0} desconocido en el TLD
  
  
  
  1.2.2.4   +2 -2      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages_ja.properties
  
  Index: messages_ja.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages_ja.properties,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- messages_ja.properties    2001/11/21 02:09:55     1.2.2.3
  +++ messages_ja.properties    2001/11/30 22:17:40     1.2.2.4
  @@ -1,4 +1,4 @@
  -# $Id: messages_ja.properties,v 1.2.2.3 2001/11/21 02:09:55 kinman Exp $
  +# $Id: messages_ja.properties,v 1.2.2.4 2001/11/30 22:17:40 larryi Exp $
   #
   # Default localized string information
   # Localized this the Default Locale as is ja_JP
  @@ -111,7 +111,7 @@
   jsp.warning.largeFile=\u8b66\u544a: initParam 
largeFile\u306e\u5024\u304c\u7121\u52b9\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024
 \"true\" \u3092\u4f7f\u7528\u3057\u307e\u3059
   jsp.warning.mappedFile=\u8b66\u544a: initParam 
mappedFile\u306e\u5024\u304c\u7121\u52b9\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024
 \"false\" \u3092\u4f7f\u7528\u3057\u307e\u3059
   jsp.warning.sendErrToClient=\u8b66\u544a: initParam 
sendErrToClient\u306e\u5024\u304c\u7121\u52b9\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024
 \"false\" \u3092\u4f7f\u7528\u3057\u307e\u3059
  -jsp.warning.classDebugInfo=\u8b66\u544a: initParam 
classDebugInfo\u306e\u5024\u304c\u7121\u52b9\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024
 \"false\"\u3092\u4f7f\u7528\u3057\u307e\u3059
  +jsp.warning.classDebugInfo=\u8b66\u544a: initParam 
classdebuginfo\u306e\u5024\u304c\u7121\u52b9\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024
 \"false\"\u3092\u4f7f\u7528\u3057\u307e\u3059
   jsp.error.badtaglib=\u30bf\u30b0\u30e9\u30a4\u30d6\u30e9\u30ea {0} 
\u3092\u30aa\u30fc\u30d7\u30f3\u3067\u304d\u307e\u305b\u3093: {1}
   
jsp.error.badGetReader=\u30b9\u30c8\u30ea\u30fc\u30e0\u304c\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306b\u306f\u3001Reader\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093
   jsp.warning.unknown.element.in.TLD=\u8b66\u544a: {0} 
\u306fTLD\u306e\u672a\u77e5\u306e\u8981\u7d20\u3067\u3059
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to