tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_ja.properties
Date Mon, 03 Dec 2001 15:47:39 GMT
larryi      01/12/03 07:47:39

  Modified:    jasper/src/share/org/apache/jasper
                        EmbededServletOptions.java JspC.java Options.java
               jasper/src/share/org/apache/jasper/compiler Compiler.java
                        JavaCompiler.java JikesJavaCompiler.java
                        SunJavaCompiler.java
               jasper/src/share/org/apache/jasper/resources
                        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
  1.7       +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.7
  diff -u -r1.6 -r1.7
  --- EmbededServletOptions.java	2001/02/04 01:03:28	1.6
  +++ EmbededServletOptions.java	2001/12/03 15:47:39	1.7
  @@ -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.7 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/12/03 15:47: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.13      +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.13
  diff -u -r1.12 -r1.13
  --- JspC.java	2001/09/18 00:16:34	1.12
  +++ JspC.java	2001/12/03 15:47:39	1.13
  @@ -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.13 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.13 $
  + * $Date: 2001/12/03 15:47:39 $
    *
    * ====================================================================
    * 
  @@ -181,6 +181,11 @@
           return true;
       }
    
  +    public boolean getClassDebugInfo() {
  +        // compile with debug info
  +        return false;
  +    }
  +
       public String getIeClassId() {
           return ieClassId;
       }
  
  
  
  1.7       +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.7
  diff -u -r1.6 -r1.7
  --- Options.java	2001/02/04 01:04:11	1.6
  +++ Options.java	2001/12/03 15:47:39	1.7
  @@ -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.7 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/12/03 15:47: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. 
        */
  
  
  
  1.15      +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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Compiler.java	2001/10/04 19:12:52	1.14
  +++ Compiler.java	2001/12/03 15:47:39	1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Compiler.java,v
1.14 2001/10/04 19:12:52 kinman Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/10/04 19:12:52 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Compiler.java,v
1.15 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.15 $
  + * $Date: 2001/12/03 15:47:39 $
    *
    * ====================================================================
    * 
  @@ -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.2       +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.2
  diff -u -r1.1 -r1.2
  --- JavaCompiler.java	2000/08/12 00:52:08	1.1
  +++ JavaCompiler.java	2001/12/03 15:47:39	1.2
  @@ -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.2 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/12/03 15:47:39 $
    *
    * ====================================================================
    * 
  @@ -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.6       +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.6
  diff -u -r1.5 -r1.6
  --- JikesJavaCompiler.java	2001/08/14 20:52:43	1.5
  +++ JikesJavaCompiler.java	2001/12/03 15:47:39	1.6
  @@ -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.6 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/12/03 15:47:39 $
    *
    * ====================================================================
    *
  @@ -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.3       +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.3
  diff -u -r1.2 -r1.3
  --- SunJavaCompiler.java	2001/02/08 13:38:02	1.2
  +++ SunJavaCompiler.java	2001/12/03 15:47:39	1.3
  @@ -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.3 2001/12/03 15:47:39 larryi Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/12/03 15:47:39 $
    *
    * ====================================================================
    * 
  @@ -80,6 +80,7 @@
       String compilerPath;
       String outdir;
       OutputStream out;
  +    boolean classDebugInfo=false;
   
       /**
        * Specify where the compiler can be found
  @@ -124,11 +125,18 @@
           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);
       }
  
  
  
  1.23      +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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- messages.properties	2001/11/21 01:57:19	1.22
  +++ messages.properties	2001/12/03 15:47:39	1.23
  @@ -1,4 +1,4 @@
  -# $Id: messages.properties,v 1.22 2001/11/21 01:57:19 kinman Exp $
  +# $Id: messages.properties,v 1.23 2001/12/03 15:47:39 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.10      +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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- messages_es.properties	2001/11/21 01:57:19	1.9
  +++ messages_es.properties	2001/12/03 15:47:39	1.10
  @@ -1,4 +1,4 @@
  -# $Id: messages_es.properties,v 1.9 2001/11/21 01:57:19 kinman Exp $
  +# $Id: messages_es.properties,v 1.10 2001/12/03 15:47:39 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.6       +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- messages_ja.properties	2001/11/21 01:57:19	1.5
  +++ messages_ja.properties	2001/12/03 15:47:39	1.6
  @@ -1,4 +1,4 @@
  -# $Id: messages_ja.properties,v 1.5 2001/11/21 01:57:19 kinman Exp $
  +# $Id: messages_ja.properties,v 1.6 2001/12/03 15:47:39 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:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message