cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request JspInterceptor.java

2000-12-22 Thread pierred

pierred 00/12/22 06:19:15

  Modified:src/share/org/apache/jasper Tag: tomcat_32
EmbededServletOptions.java JspC.java Options.java
   src/share/org/apache/jasper/compiler Tag: tomcat_32
Compiler.java
   src/share/org/apache/jasper/resources Tag: tomcat_32
messages.properties
   src/share/org/apache/tomcat/request Tag: tomcat_32
JspInterceptor.java
  Log:
  Bug fix: bug report #269 -- java.io.UnsupportedEncodingException when processing JSP
  
  From the bug report:
  
  "A "java.io.UnsupportedEncodingException: UTF8" is thrown when generating
  the servlet for a JSP file when the Kaffe VM is used. The "UTF8" encoding
  name is hardcoded in the Compiler class as the encoding for the generated
  servlet source code file. I believe the reason for using "UTF8" as opposed
  to "UTF-8" (note the dash) is that this is the only name supported in
  JDK 1.1. I suggest adding an init parameter to JspServlet for setting
  the encoding name when "UTF8" doesn't work."
  
  Given that there are several possible representations of Unicode data
  (UTF-8, UTF-16, UTF-32), and given that the supported encodings vary
  between different implementations of the Java platform,
  the best way to tackle this is probably as suggested by Hans.
  
  Submitted by: Hans Bergsten ( [EMAIL PROTECTED] )
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +14 -4 
jakarta-tomcat/src/share/org/apache/jasper/EmbededServletOptions.java
  
  Index: EmbededServletOptions.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/EmbededServletOptions.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- EmbededServletOptions.java2000/05/26 18:55:09 1.4
  +++ EmbededServletOptions.java2000/12/22 14:19:10 1.4.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/EmbededServletOptions.java,v 1.4 
2000/05/26 18:55:09 costin Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/05/26 18:55:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/EmbededServletOptions.java,v 
1.4.2.1 2000/12/22 14:19:10 pierred Exp $
  + * $Revision: 1.4.2.1 $
  + * $Date: 2000/12/22 14:19:10 $
*
* 
* 
  @@ -135,6 +135,11 @@
*/
   public String jspCompilerPath = null;
   
  +/**
  + * Java platform encoding to generate the JSP
  + * page servlet.
  + */
  +private String javaEncoding;
   
   /**
* Are we keeping generated code around?
  @@ -207,6 +212,10 @@
   return jspCompilerPath;
   }
   
  +public String getJavaEncoding() {
  + return javaEncoding;
  +}
  +
   /**
* Create an EmbededServletOptions object using data available from
* ServletConfig and ServletContext. 
  @@ -309,7 +318,8 @@
 Logger.FATAL);
   }
   }
  -  
  +
  +this.javaEncoding = config.getInitParameter("javaEncoding");
   }
   }
   
  
  
  
  1.15.2.2  +7 -3  jakarta-tomcat/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.15.2.1
  retrieving revision 1.15.2.2
  diff -u -r1.15.2.1 -r1.15.2.2
  --- JspC.java 2000/07/12 16:04:20 1.15.2.1
  +++ JspC.java 2000/12/22 14:19:10 1.15.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v 
1.15.2.1 2000/07/12 16:04:20 shemnon Exp $
  - * $Revision: 1.15.2.1 $
  - * $Date: 2000/07/12 16:04:20 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v 
1.15.2.2 2000/12/22 14:19:10 pierred Exp $
  + * $Revision: 1.15.2.2 $
  + * $Date: 2000/12/22 14:19:10 $
*
* 
* 
  @@ -198,6 +198,10 @@
   public String getJspCompilerPath() {
  // we don't compile, so this is meanlingless
   return null;
  +}
  +
  +public String getJavaEncoding() {
  + return "UTF-8";
   }
   
   public String getClassPath() {
  
  
  
  1.11.2.1  +9 -3  jakarta-tomcat/src/share/org/apache/jasper/Options.java
  
  Index: Options.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/Options.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- Options.ja

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java ParserController.java

2000-12-22 Thread pierred

pierred 00/12/22 10:37:40

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java ParserController.java
  Log:
  Fix for Bug #55.
  
 -
 Synopsis:
   Default for included files is 8859_1, with no option to set otherwise.
  
 Report Description:
   The default for reading an included file is ISO_8859_1. We can,
   of course, set pageConent to read UTF-8 (which is what we need it
   to be to support international
  code). Unfortunately, when there are two or more levels of
  encoding (or the pageContent type ins't set), the encoding that
  the JspReader gets set to a hard-coded
   "ISO_8859_1", and doesn't allow this to be set to anything else
   via the runtime system properties. In:
   org.apache.jasper.compiler.JspReader JspReader.java line
   158, encoding ALWAYS defaults to 8859_1, and the file.encoding,
   when set from the System properties. This is an easy fix, to set
   encoding to: encoding =
   System.getPropert("file.encoding","8859_1") ; The result,
   typically, is that the file will flake out and convert all of the
   non-UTF-8 characters to US-ASCII, @%, etc.
   -
  
  I'm not sure I fully understand what's described there,
  so here is what I believe should be done.
  
  The "encoding" for a JSP file is currently handled as follows:
  
  1. In Compiler.java, we create a JspReader for the top-level
 ("including") jsp file using the 8859_1 encoding.
  
  2. Using that JspReader, we check if there is a page directive
 with 'contentType' specified. If there is, then
 a new JspReader for the page is created with the encoding set to the
 "charset" specified in the contentType value of the page
 directive; otherwise we stick with the default 8859_1 encoding.
  
  3. When a page is included, JspReader.pushFile() is called,
 and the encoding passed as argument appears to always
 be null (since no encoding attribute can be specified in
 the "include" directive, reading 'encoding' off of the
 attributes appears to be a bug in JspParseEventListener).
 Because it is null, it always defaults to 8859_1.
  
  If I understand well the intent of the bug report, we'd need the
  following modifications:
  
  - In step 2, if contentType is not specified in the "including" page,
set the encoding to be:
  
   encoding = System.getProperty("file.encoding", "8859_1");
  
This means that the default encoding of all JSP files at a site could
be defined globally using system property "file.encoding".
I don't think this is spec-compliant, and would be reluctant
to make that change.
  
-- Change not done
  
Comments from Hans Bergsten
"I agree that using "file.encoding" as the ultimate default is not
 spec compliant. I suggest you stick to the current behavior, with
 "8859_1" if contentType doesn't specify a charset."
  
  - In step 3, use the encoding of the "including" page.
  
This would fix what I believe is a bug in the current implementation.
  
-- Change done
  
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.20  +4 -6  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JspParseEventListener.java2000/12/21 23:16:41 1.19
  +++ JspParseEventListener.java2000/12/22 18:37:39 1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.19 2000/12/21 23:16:41 pierred Exp $
  - * $Revision: 1.19 $
  - * $Date: 2000/12/21 23:16:41 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.20 2000/12/22 18:37:39 pierred Exp $
  + * $Revision: 1.20 $
  + * $Date: 2000/12/22 18:37:39 $
*
* 
*
  @@ -750,8 +750,6 @@
   
if (directive.equals("include")) {
String file = attrs.getValue("file");
  - String encoding = attrs.getValue("encoding");
  -
if (file == null)
throw new CompileException(start,
   
Constants.getString("jsp.error.include.missing.file"));
  @@ -766,7 +764,7 @@
   }
*/
try {
  - parserCtl.parse(file, encoding);
  +   

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler JspParseEventListener.java JspReader.java

2000-12-22 Thread pierred

pierred 00/12/22 11:33:08

  Modified:src/share/org/apache/jasper/compiler Tag: tomcat_32
JspParseEventListener.java JspReader.java
  Log:
Fix for Bug #55. (tomcat_32)
  
   -
   Synopsis:
 Default for included files is 8859_1, with no option to set otherwise.
  
   Report Description:
 The default for reading an included file is ISO_8859_1. We can,
 of course, set pageConent to read UTF-8 (which is what we need it
 to be to support international
code). Unfortunately, when there are two or more levels of
encoding (or the pageContent type ins't set), the encoding that
the JspReader gets set to a hard-coded
 "ISO_8859_1", and doesn't allow this to be set to anything else
 via the runtime system properties. In:
 org.apache.jasper.compiler.JspReader JspReader.java line
 158, encoding ALWAYS defaults to 8859_1, and the file.encoding,
 when set from the System properties. This is an easy fix, to set
 encoding to: encoding =
 System.getPropert("file.encoding","8859_1") ; The result,
 typically, is that the file will flake out and convert all of the
 non-UTF-8 characters to US-ASCII, @%, etc.
 -
  
I'm not sure I fully understand what's described there,
so here is what I believe should be done.
  
The "encoding" for a JSP file is currently handled as follows:
  
1. In Compiler.java, we create a JspReader for the top-level
   ("including") jsp file using the 8859_1 encoding.
  
2. Using that JspReader, we check if there is a page directive
   with 'contentType' specified. If there is, then
   a new JspReader for the page is created with the encoding set to the
   "charset" specified in the contentType value of the page
   directive; otherwise we stick with the default 8859_1 encoding.
  
3. When a page is included, JspReader.pushFile() is called,
   and the encoding passed as argument appears to always
   be null (since no encoding attribute can be specified in
   the "include" directive, reading 'encoding' off of the
   attributes appears to be a bug in JspParseEventListener).
   Because it is null, it always defaults to 8859_1.
  
If I understand well the intent of the bug report, we'd need the
following modifications:
  
- In step 2, if contentType is not specified in the "including" page,
  set the encoding to be:
  
 encoding = System.getProperty("file.encoding", "8859_1");
  
  This means that the default encoding of all JSP files at a site could
  be defined globally using system property "file.encoding".
  I don't think this is spec-compliant, and would be reluctant
  to make that change.
  
  -- Change not done
  
  Comments from Hans Bergsten
  "I agree that using "file.encoding" as the ultimate default is not
   spec compliant. I suggest you stick to the current behavior, with
   "8859_1" if contentType doesn't specify a charset."
  
- In step 3, use the encoding of the "including" page.
  
  This would fix what I believe is a bug in the current implementation.
  
  -- Change done
  
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.17.2.3  +4 -6  
jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.17.2.2
  retrieving revision 1.17.2.3
  diff -u -r1.17.2.2 -r1.17.2.3
  --- JspParseEventListener.java2000/12/21 23:25:27 1.17.2.2
  +++ JspParseEventListener.java2000/12/22 19:33:08 1.17.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17.2.2 2000/12/21 23:25:27 pierred Exp $
  - * $Revision: 1.17.2.2 $
  - * $Date: 2000/12/21 23:25:27 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17.2.3 2000/12/22 19:33:08 pierred Exp $
  + * $Revision: 1.17.2.3 $
  + * $Date: 2000/12/22 19:33:08 $
*
* 
*
  @@ -717,15 +717,13 @@
   
if (directive.equals("include")) {
String file = (String) attrs.get("file");
  - String encoding = (String) attrs.get("encoding");
  -
if (file == null)
throw new CompileException(start,
   

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler ParserXJspSaxHandler.java

2000-12-22 Thread pierred

pierred 00/12/22 12:34:56

  Modified:jasper/src/share/org/apache/jasper/compiler
ParserXJspSaxHandler.java
  Log:
  Removed debug statement.
  
  Revision  ChangesPath
  1.7   +1 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserXJspSaxHandler.java
  
  Index: ParserXJspSaxHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserXJspSaxHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ParserXJspSaxHandler.java 2000/12/10 05:56:43 1.6
  +++ ParserXJspSaxHandler.java 2000/12/22 20:34:56 1.7
  @@ -378,7 +378,7 @@
} else {
// this is a custom tag
node.validate(true, false);
  - System.out.println("node is: " + node);
  + //System.out.println("node is: " + node);
processCustomTagEnd((NodeTag)node, stop);
}
}
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler JspParseEventListener.java

2000-12-21 Thread pierred

pierred 00/12/21 15:25:28

  Modified:src/share/org/apache/jasper/compiler Tag: tomcat_32
JspParseEventListener.java
  Log:
  Check for null value before invoking method.
  
  From email sent by Brian Bucknam:
  
  It's a long story, but I'm working on a project where Jasper 3.x is embedded
  inside a servlet, which can then be deployed to the container of our
  customer's choice.  The servlet uses JSP files as templates, which is where
  Jasper comes in.
  
  In this type of environment, sometimes thing can go really wrong, and the
  compiled JSP might, in some cases, fail to get a JspFactory, PageContext, or
  JspWriter.
  
  If any of _jspxFactory, pageContext, or out fail to be created, the catch{}
  and finally{} clauses just throw NPE's.
  
  Submitted by:  "Bucknam, Brian" [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.17.2.2  +7 -7  
jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.17.2.1
  retrieving revision 1.17.2.2
  diff -u -r1.17.2.1 -r1.17.2.2
  --- JspParseEventListener.java2000/07/03 09:43:21 1.17.2.1
  +++ JspParseEventListener.java2000/12/21 23:25:27 1.17.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17.2.1 2000/07/03 09:43:21 bergsten Exp $
  - * $Revision: 1.17.2.1 $
  - * $Date: 2000/07/03 09:43:21 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17.2.2 2000/12/21 23:25:27 pierred Exp $
  + * $Revision: 1.17.2.2 $
  + * $Date: 2000/12/21 23:25:27 $
*
* 
*
  @@ -348,18 +348,18 @@
//writer.println("} catch (Throwable t) {");
writer.println("} catch (Exception ex) {");
writer.pushIndent();
  -writer.println("if (out.getBufferSize() != 0)");
  +writer.println("if (out != null  out.getBufferSize() != 0)");
   writer.pushIndent();
writer.println("out.clearBuffer();");
writer.popIndent();
  - writer.println("pageContext.handlePageException(ex);");
  + writer.println("if (pageContext != null) 
pageContext.handlePageException(ex);");
writer.popIndent();
writer.println("} finally {");
writer.pushIndent();
/* Do stuff here for finally actions... */
   //writer.println("out.close();");
  - writer.println("out.flush();");
  - writer.println("_jspxFactory.releasePageContext(pageContext);");
  + writer.println("if (out != null) out.flush();");
  + writer.println("if (_jspxFactory != null) 
_jspxFactory.releasePageContext(pageContext);");
writer.popIndent();
writer.println("}");
// Close the service method:
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties

2000-12-21 Thread pierred

pierred 00/12/21 17:27:39

  Modified:jasper/src/share/org/apache/jasper
EmbededServletOptions.java JspC.java Options.java
   jasper/src/share/org/apache/jasper/compiler Compiler.java
   jasper/src/share/org/apache/jasper/resources
messages.properties
  Log:
  Bug fix: bug report #269 -- java.io.UnsupportedEncodingException when processing JSP
  
  From the bug report:
  
  "A "java.io.UnsupportedEncodingException: UTF8" is thrown when generating
  the servlet for a JSP file when the Kaffe VM is used. The "UTF8" encoding
  name is hardcoded in the Compiler class as the encoding for the generated
  servlet source code file. I believe the reason for using "UTF8" as opposed
  to "UTF-8" (note the dash) is that this is the only name supported in
  JDK 1.1. I suggest adding an init parameter to JspServlet for setting
  the encoding name when "UTF8" doesn't work."
  
  Given that there are several possible representations of Unicode data
  (UTF-8, UTF-16, UTF-32), and given that the supported encodings vary
  between different implementations of the Java platform,
  the best way to tackle this is probably as suggested by Hans.
  
  Added new init parameter "javaEncoding" for JspServlet.
  Default value specified in web.xml is "UTF-8".
  
  Submitted by: Hans Bergsten ( [EMAIL PROTECTED] )
  
  Revision  ChangesPath
  1.5   +15 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EmbededServletOptions.java2000/11/06 20:52:18 1.4
  +++ EmbededServletOptions.java2000/12/22 01:27:37 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
 1.4 2000/11/06 20:52:18 pierred Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/11/06 20:52:18 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
 1.5 2000/12/22 01:27:37 pierred Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/12/22 01:27:37 $
*
* 
* 
  @@ -144,6 +144,12 @@
   private TldLocationsCache tldLocationsCache = null;
   
   /**
  + * Java platform encoding to generate the JSP
  + * page servlet.
  + */
  +private String javaEncoding;
  +
  +/**
* Are we keeping generated code around?
*/
   public boolean getKeepGenerated() {
  @@ -218,6 +224,10 @@
return tldLocationsCache;
   }
   
  +public String getJavaEncoding() {
  + return javaEncoding;
  +}
  +
   /**
* Create an EmbededServletOptions object using data available from
* ServletConfig and ServletContext. 
  @@ -320,6 +330,8 @@
 Logger.FATAL);
   }
   }
  +
  +this.javaEncoding = config.getInitParameter("javaEncoding");
   
// Setup the global Tag Libraries location cache for this
// web-application.
  
  
  
  1.7   +7 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JspC.java 2000/11/06 20:52:19 1.6
  +++ JspC.java 2000/12/22 01:27:37 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.6 
2000/11/06 20:52:19 pierred Exp $
  - * $Revision: 1.6 $
  - * $Date: 2000/11/06 20:52:19 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.7 
2000/12/22 01:27:37 pierred Exp $
  + * $Revision: 1.7 $
  + * $Date: 2000/12/22 01:27:37 $
*
* 
* 
  @@ -210,6 +210,10 @@
   
   public TldLocationsCache getTldLocationsCache() {
return tldLocationsCache;
  +}
  +
  +public String getJavaEncoding() {
  + return "UTF-8";
   }
   
   public String getClassPath() {
  
  
  
  1.5   +9 -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.4
  retrieving revision 1.5
  diff -u -r1.

cvs commit: jakarta-tomcat-4.0/catalina/src/conf web.xml

2000-12-21 Thread pierred

pierred 00/12/21 17:31:03

  Modified:catalina/src/conf web.xml
  Log:
  New JspServlet init parameter for alternate java encoding used when
  generating Jsp pages servlet source code. The default java
  encoding used is UTF8. This alternate is set by default
  to UTF-8.
  
  Revision  ChangesPath
  1.11  +5 -0  jakarta-tomcat-4.0/catalina/src/conf/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- web.xml   2000/10/31 22:54:07 1.10
  +++ web.xml   2000/12/22 01:31:03 1.11
  @@ -46,6 +46,11 @@
   /init-param
   --
   init-param
  +  !-- An alternate java encoding --
  +  param-namejavaEncoding/param-name
  +  param-valueUTF-8/param-value
  +/init-param
  +init-param
 !-- Levels: FATAL ERROR WARNING INFORMATION DEBUG --
 param-namelogVerbosityLevel/param-name
 param-valueWARNING/param-value
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler IncludeGenerator.java

2000-12-19 Thread pierred

pierred 00/12/19 15:44:41

  Modified:src/share/org/apache/jasper/compiler Tag: tomcat_32
IncludeGenerator.java
  Log:
  Bug fix for bug report #540.
  
  "If you have more than one set of tags with the same name, you get a compile error 
like this:
  Variable '_tmpS' is already defined in this method. String [] _tmpS = new String[3]; 
It doesn't look like the temp string is
  even needed, it isn't referenced anywhere but where it's declared."
  
  This statement was indeed superfluous. Removed it.
  
  Submitted by: Mark Wutka ( [EMAIL PROTECTED] )
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.2   +3 -4  
jakarta-tomcat/src/share/org/apache/jasper/compiler/IncludeGenerator.java
  
  Index: IncludeGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- IncludeGenerator.java 2000/09/14 03:09:46 1.4.2.1
  +++ IncludeGenerator.java 2000/12/19 23:44:40 1.4.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v 
1.4.2.1 2000/09/14 03:09:46 larryi Exp $
  - * $Revision: 1.4.2.1 $
  - * $Date: 2000/09/14 03:09:46 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v 
1.4.2.2 2000/12/19 23:44:40 pierred Exp $
  + * $Revision: 1.4.2.2 $
  + * $Date: 2000/12/19 23:44:40 $
*
* 
* 
  @@ -138,7 +138,6 @@
writer.println("_jspx_qStr = _jspx_qStr + \"" + sep +
   key + "=\" + \"" + value[0] + "\";");
} else {
  - writer.println("String [] _tmpS = new String[" + value.length 
+"];");
for (int i = 0; i  value.length; i++) {
if (!JspUtil.isExpression(value[i]))
writer.println("_jspx_qStr = _jspx_qStr + \"" + sep +
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler TagBeginGenerator.java

2000-12-14 Thread pierred

pierred 00/12/14 14:28:28

  Modified:src/share/org/apache/jasper/compiler Tag: tomcat_32
TagBeginGenerator.java
  Log:
  When the Jasper code gets the setter method for tag properties, it doesn't
  check to see whether the m variable is null until after attempting to use its
  getParameterTypes() method, which throws an uninformative NullPointerException.
  I simply moved the null check immediately after the variable m is set.
  
  [This was already fixed in tomcat-4.0; porting back to tomcat-3.2]
  
  Submitted by: Kief Morris [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.3  +5 -8  
jakarta-tomcat/src/share/org/apache/jasper/compiler/TagBeginGenerator.java
  
  Index: TagBeginGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagBeginGenerator.java,v
  retrieving revision 1.14.2.2
  retrieving revision 1.14.2.3
  diff -u -r1.14.2.2 -r1.14.2.3
  --- TagBeginGenerator.java2000/07/12 16:04:51 1.14.2.2
  +++ TagBeginGenerator.java2000/12/14 22:28:27 1.14.2.3
  @@ -193,6 +193,11 @@
   if (attrValue != null) {
String attrName = attributes[i].getName();
Method m = tc.getSetterMethod(attrName);
  + if (m == null)
  + throw new CompileException
  + (start, Constants.getString
  +  ("jsp.error.unable.to_find_method",
  +   new Object[] { attrName }));
   Class c[] = m.getParameterTypes();
   // assert(c.length  0)
   
  @@ -203,14 +208,6 @@
   attrValue = convertString(c[0], attrValue, writer, 
attrName);
} else
attrValue = convertString(c[0], attrValue, writer, attrName);
  -
  -
  - if (m == null)
  - throw new CompileException
  - (start, Constants.getString
  -  ("jsp.error.unable.to_find_method",
  -   new Object[] { attrName }));
  -
writer.println(thVarName+"."+m.getName()+"("+attrValue+");");
   }
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler BeanGenerator.java JspParseEventListener.java ParserXJspSaxHandler.java

2000-12-09 Thread pierred

pierred 00/12/09 21:56:44

  Modified:jasper/src/share/org/apache/jasper Constants.java
   jasper/src/share/org/apache/jasper/compiler
BeanGenerator.java JspParseEventListener.java
ParserXJspSaxHandler.java
  Log:
  Take 2 on the default list of imports for JSP generated classes.
  Removed java.io.IOException, java.beans.Beans, and org.apache.jasper.Exception.
  All that's left is org.apache.jasper.runtime.*.
  That will be in take 3 (eventually :-))
  [Thanks to Craig for "waking me up" on this...]
  
  Revision  ChangesPath
  1.6   +0 -3  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Constants.java2000/12/09 05:45:47 1.5
  +++ Constants.java2000/12/10 05:56:43 1.6
  @@ -95,10 +95,7 @@
"javax.servlet.http.*", 
"javax.servlet.jsp.*", 
   "javax.servlet.jsp.tagext.*",
  - "java.io.IOException", 
  - "java.beans.Beans",
"org.apache.jasper.runtime.*", 
  - "org.apache.jasper.JasperException"
   };
   
   /**
  
  
  
  1.4   +5 -5  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanGenerator.java
  
  Index: BeanGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BeanGenerator.java2000/11/30 21:47:47 1.3
  +++ BeanGenerator.java2000/12/10 05:56:43 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanGenerator.java,v
 1.3 2000/11/30 21:47:47 pierred Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/11/30 21:47:47 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanGenerator.java,v
 1.4 2000/12/10 05:56:43 pierred Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/12/10 05:56:43 $
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation.  All rights 
  @@ -350,11 +350,11 @@
writer.pushIndent ();
if (beanRT == false)
writer.println(varname+" = ("+ convert + 
  -") Beans.instantiate(this.getClass().getClassLoader(), "+
  +") 
java.beans.Beans.instantiate(this.getClass().getClassLoader(), "+
   writer.quoteString(clsname) +");");
else
writer.println(varname+" = ("+ convert + 
  -") Beans.instantiate(this.getClass().getClassLoader(), "+
  +") 
java.beans.Beans.instantiate(this.getClass().getClassLoader(), "+
   clsname +");");
writer.popIndent ();
writer.println ("} catch (Exception exc) {");
  
  
  
  1.18  +5 -5  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- JspParseEventListener.java2000/12/09 00:36:10 1.17
  +++ JspParseEventListener.java2000/12/10 05:56:43 1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17 2000/12/09 00:36:10 pierred Exp $
  - * $Revision: 1.17 $
  - * $Date: 2000/12/09 00:36:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.18 2000/12/10 05:56:43 pierred Exp $
  + * $Revision: 1.18 $
  + * $Date: 2000/12/10 05:56:43 $
*
* 
*
  @@ -297,7 +297,7 @@
   writer.println("private static boolean _jspx_inited = false;");
   writer.println();
   
  -writer.println("public final void _jspx_init() throws JasperException {");
  +writer.println("public final void _jspx_init() throws 
org.apache.jasper.JasperException {");
   writer.pushIndent();
generateAll(InitMethodPhase.class);
   writer.popIndent();
  @@ -309,7 +309,7 @@
   "HttpServletR

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources jsp12.dtd

2000-12-08 Thread pierred

pierred 00/12/08 12:26:10

  Modified:jasper/src/share/org/apache/jasper/resources jsp12.dtd
  Log:
  removed test line
  
  Revision  ChangesPath
  1.3   +1 -2  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/jsp12.dtd
  
  Index: jsp12.dtd
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/jsp12.dtd,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jsp12.dtd 2000/09/19 20:33:37 1.2
  +++ jsp12.dtd 2000/12/08 20:26:07 1.3
  @@ -96,5 +96,4 @@
   
   !ELEMENT jsp:root %jsp.body;
   !ATTLIST jsp:root
  -xmlns:jsp CDATA #FIXED "http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd"
  -xmlns:ttl CDATA #FIXED "http://java.sun.com/products/jsp/dtd/jsptests_1_0.dtd"
  +xmlns:jsp CDATA #FIXED "http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd"
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java TagLibraryInfoImpl.java XmlOutputter.java

2000-12-08 Thread pierred

pierred 00/12/08 12:45:19

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java TagLibraryInfoImpl.java
XmlOutputter.java
  Log:
  Misc bug fixes for XML syntax processing.
  
  Revision  ChangesPath
  1.16  +9 -6  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JspParseEventListener.java2000/12/05 12:23:46 1.15
  +++ JspParseEventListener.java2000/12/08 20:45:09 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.15 2000/12/05 12:23:46 pierred Exp $
  - * $Revision: 1.15 $
  - * $Date: 2000/12/05 12:23:46 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.16 2000/12/08 20:45:09 pierred Exp $
  + * $Revision: 1.16 $
  + * $Date: 2000/12/08 20:45:09 $
*
* 
*
  @@ -777,7 +777,9 @@
   ex.getMessage());
}
}
  - xo.append("jsp:directive." + directive, attrs);
  + if (!directive.equals("include")) {
  + xo.append("jsp:directive." + directive, attrs);
  + }
   }
   
   
  @@ -988,7 +990,6 @@
  start, stop);
   
addGenerator(gen);
  -xo.append(chars);
   }
   
   public void handleTagBegin(Mark start, Mark stop, 
  @@ -1034,7 +1035,7 @@
   }
   
   public void handleRootEnd() {
  - xo.append("jsp:root");
  + xo.rootEnd();
   }
   
   public void handleRootBegin(Attributes attrs) 
  @@ -1076,6 +1077,7 @@
   {
if (data != null) {
handleCharData(start, stop, data);
  +xo.append(data);
}
   UninterpretedTagEndGenerator gen = 
new UninterpretedTagEndGenerator(rawName);
  @@ -1088,6 +1090,7 @@
throws JasperException
   {
handleCharData(start, stop, data);
  +xo.append("jsp:cdata", null, data);
   }
   
   /**
  
  
  
  1.16  +7 -9  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- TagLibraryInfoImpl.java   2000/11/18 22:36:48 1.15
  +++ TagLibraryInfoImpl.java   2000/12/08 20:45:12 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.15 2000/11/18 22:36:48 pierred Exp $
  - * $Revision: 1.15 $
  - * $Date: 2000/11/18 22:36:48 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.16 2000/12/08 20:45:12 pierred Exp $
  + * $Revision: 1.16 $
  + * $Date: 2000/12/08 20:45:12 $
*
* The Apache Software License, Version 1.1
*
  @@ -180,8 +180,6 @@
   URL url = null;
   boolean relativeURL = false;
   
  - //p("prefix: " + prefix + "  uriIn: " + uriIn);
  - //if (location != null) p("location: " + location[0]);
if (location == null) {
// The URI points to the TLD itself or to a jar
// file where the TLD is located
  @@ -215,23 +213,19 @@
parseTLD(location[0], in);
} else {
// Location points to a jar file
  - // p("JAR FILE: " + location[0]);
// tag library in jar file
JarFile jarFile = null;
ZipEntry jarEntry = null;
InputStream stream = null;
try {
url = ctxt.getResource(location[0]);
  - // p("url = " + url);
if (url == null) return;
url = new URL("jar:" + url.toString() + "!/");
JarURLConnection conn =
(JarURLConnection) url.openConnection();
conn.connect(); //@@@ necessary???
jarFile = conn.getJarFile();
  - // p("jarFile: " + jarFile);
jarEntry = jarFile.getEntry(location[1]);
  - // p("jarEntry name: " + jarEntry.getName());
  

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties

2000-12-08 Thread pierred

pierred 00/12/08 12:46:28

  Modified:jasper/src/share/org/apache/jasper/resources
messages.properties
  Log:
  new error message
  
  Revision  ChangesPath
  1.12  +3 -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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- messages.properties   2000/12/08 20:31:30 1.11
  +++ messages.properties   2000/12/08 20:46:23 1.12
  @@ -1,4 +1,4 @@
  -# $Id: messages.properties,v 1.11 2000/12/08 20:31:30 pierred Exp $
  +# $Id: messages.properties,v 1.12 2000/12/08 20:46:23 pierred Exp $
   #
   # Default localized string information
   # Localized this the Default Locale as is en_US
  @@ -231,3 +231,5 @@
   jsp.error.taglibDirective.absUriCannotBeResolved=This absolute uri ({0}) cannot be 
resolved in either web.xml or the jar files deployed with this application
   jsp.error.unterminated.user.tag=Unterminated user-defined tag: ending tag {0} not 
found or incorrectly nested
   jspx.error.templateDataNotInJspCdata=Validation Error: Element lt;{0}gt; cannot 
have template data. Template data must be encapsulated within a lt;jsp:cdatagt; 
element. [JSP1.2 PFD section 5.1.9]\nTemplate data in error: {1}
  +#Error while processing taglib jar file {0}: {1}
  +jsp.error.taglib.jarFileException=
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java XmlOutputter.java

2000-12-08 Thread pierred

pierred 00/12/08 16:36:11

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java XmlOutputter.java
  Log:
  Added proper handling of jsp:include and jsp:forward
  tags when generating the XML stream for validation by tag
  libraries.
  
  Revision  ChangesPath
  1.17  +9 -5  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JspParseEventListener.java2000/12/08 20:45:09 1.16
  +++ JspParseEventListener.java2000/12/09 00:36:10 1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.16 2000/12/08 20:45:09 pierred Exp $
  - * $Revision: 1.16 $
  - * $Date: 2000/12/08 20:45:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17 2000/12/09 00:36:10 pierred Exp $
  + * $Revision: 1.17 $
  + * $Date: 2000/12/09 00:36:10 $
*
* 
*
  @@ -952,7 +952,9 @@
   new ForwardGenerator(start, attrs, param, isXml),
   start, stop);
addGenerator(gen);
  - //@@@ xo
  + xo.append("jsp:forward", attrs);
  + xo.append("jsp:param", param);
  + xo.append("jsp:forward");
   }
   
   public void handleInclude(Mark start, Mark stop, Attributes attrs, 
  @@ -971,7 +973,9 @@
   new IncludeGenerator(start, attrs, param, isXml),
   start, stop);
addGenerator(gen);
  - //@@@ xo
  + xo.append("jsp:include", attrs);
  + xo.append("jsp:param", param);
  + xo.append("jsp:include");
   }
   
   public void handleCharData(Mark start, Mark stop, char[] chars) throws 
JasperException {
  
  
  
  1.6   +20 -3 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java
  
  Index: XmlOutputter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XmlOutputter.java 2000/12/08 20:45:13 1.5
  +++ XmlOutputter.java 2000/12/09 00:36:10 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.5 2000/12/08 20:45:13 pierred Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/12/08 20:45:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.6 2000/12/09 00:36:10 pierred Exp $
  + * $Revision: 1.6 $
  + * $Date: 2000/12/09 00:36:10 $
*
* 
*
  @@ -153,6 +153,23 @@
*/
   void append(String tag, Attributes attrs) {
   append(tag, attrs, sb);
  +}
  +
  +/**
  + * Append the start tag along with its attributes 
  + * (name, value) to the XML stream.
  + */
  +void append(String tag, Hashtable table) {
  + Enumeration enum = table.keys();
  + while (enum.hasMoreElements()) {
  + String name = (String)enum.nextElement();
  + String value = ((String[])table.get(name))[0];
  + AttributesImpl attrs = new AttributesImpl();
  + attrs.addAttribute("", "name", "name", "CDATA", name);
  + attrs.addAttribute("", "value", "value", "CDATA", value);
  + append(tag, attrs, sb);
  + append(tag);
  + }
   }
   
   /**
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper Constants.java

2000-12-08 Thread pierred

pierred 00/12/08 21:45:48

  Modified:jasper/src/share/org/apache/jasper Constants.java
  Log:
  Cleaned up the default list of imports.
  Details (long) below.
  
  The list of "default" imports used in Jasper was as follows
  
1) default import list as defined in spec (section 2.10.1.1 p.47)
  
"javax.servlet.*",
"javax.servlet.jsp.*",
"javax.servlet.http.*",
  
2) Not in the default import list of the spec, but should be
   in it. [-- to be fixed in spec]
  
  "javax.servlet.jsp.tagext.*",
"java.io.IOException",
  
3) Jasper specific runtime environment
  
"org.apache.jasper.runtime.*",
"org.apache.jasper.JasperException"
  
4) beans import
  
"java.beans.*",
  
5) Imports we were doing but should not have been
  
"java.io.PrintWriter",
"java.io.FileInputStream",
  "java.io.ObjectInputStream",
"java.util.Vector",
"java.beans.*",
  
  I've cleaned it up by getting rid of the import list in 5).
  
  Regarding 4) (java.beans.*):
  In the JSP1.2 PFD, section 4.1 p. 65, it is said:
  
  "If the object is not found in the specified scope; and beanName is
  given, then the method instantiate() of java.beans.Beans will be
  invoked with the ClassLoader of the Servlet object and the beanName as
  arguments. If the method succeeds, the new object reference is
  associated the with the scripting variable and with the specified name
  in the specified scope using the appropriate scope dependent
  association mechanism (see PageContext). After this, step 7 is
  performed."
  
  Given this, the java.beans.Beans class is required. I therefore think
  that it should be in the default import list. (Jasper currently requires
  it).
  
  The new 'default' import list in Jasper therefore looks as follows
  (as of my last commit):
  
"javax.servlet.*",
"javax.servlet.jsp.*",
"javax.servlet.http.*",
  "javax.servlet.jsp.tagext.*",
"java.io.IOException",
"java.beans.Beans,"
"org.apache.jasper.runtime.*",
"org.apache.jasper.JasperException"
  
  I've run watchod (jsp tests) as well as all the examples
  in tomcat and all ran fine.
  
  Please let me know if I'm missing something, and if that default
  list should be modified.
  
  -- Pierre
  
  Revision  ChangesPath
  1.5   +6 -7  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Constants.java2000/10/04 05:10:45 1.4
  +++ Constants.java2000/12/09 05:45:47 1.5
  @@ -89,16 +89,15 @@
   /**
* These classes/packages are automatically imported by the
* generated code. 
  - *
  - * FIXME: Need to trim this to what is there in PR2 and verify
  - *with all our generators -akv.
*/
   public static final String[] STANDARD_IMPORTS = { 
  - "javax.servlet.*", "javax.servlet.http.*", "javax.servlet.jsp.*", 
  + "javax.servlet.*", 
  + "javax.servlet.http.*", 
  + "javax.servlet.jsp.*", 
   "javax.servlet.jsp.tagext.*",
  - "java.io.PrintWriter", "java.io.IOException", "java.io.FileInputStream",
  -"java.io.ObjectInputStream", "java.util.Vector",
  - "org.apache.jasper.runtime.*", "java.beans.*",
  + "java.io.IOException", 
  + "java.beans.Beans",
  + "org.apache.jasper.runtime.*", 
"org.apache.jasper.JasperException"
   };
   
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TldLocationsCache.java

2000-12-07 Thread pierred

pierred 00/12/07 11:33:09

  Modified:jasper/src/share/org/apache/jasper/compiler
TldLocationsCache.java
  Log:
  Was not handling a taglib-location specified as a jar file in
  web.xml properly.
  This takes care of the following watchdog test that was failing:
  /jsp-tests/jsp/tagext/tld_resource_path/positive_JAR_URI.jsp
  
  Revision  ChangesPath
  1.3   +99 -93
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TldLocationsCache.java
  
  Index: TldLocationsCache.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TldLocationsCache.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TldLocationsCache.java2000/11/18 22:36:49 1.2
  +++ TldLocationsCache.java2000/12/07 19:33:08 1.3
  @@ -124,7 +124,7 @@
* (resource path) of the TLD associated with that tag library.
* The location is returned as a String array:
*[0] The location
  - *[1] If the location is a jar file, this is the locatiop 
  + *[1] If the location is a jar file, this is the location
*of the tld.
*/
   private Hashtable mappings = new Hashtable();
  @@ -133,54 +133,60 @@
   // Constructor and Initilizations
   
   public TldLocationsCache(ServletContext ctxt) {
  - try {
  - processWebDotXml(ctxt);
  - processJars(ctxt);
  - } catch (JasperException ex) {
  - Constants.message(ex.getMessage(), Logger.ERROR);
  - }
  +try {
  +processWebDotXml(ctxt);
  +processJars(ctxt);
  +} catch (JasperException ex) {
  +Constants.message(ex.getMessage(), Logger.ERROR);
  +}
   }
   
   private void processWebDotXml(ServletContext ctxt)
  - throws JasperException
  +throws JasperException
   {
   // Parse web.xml
  - InputStream is = ctxt.getResourceAsStream(WEB_XML);
  +InputStream is = ctxt.getResourceAsStream(WEB_XML);
   
  - if (is == null) {
  - Constants.message("jsp.error.internal.filenotfound", 
  -   new Object[]{WEB_XML},
  -   Logger.WARNING);
  - return;
  - }
  - Document webtld =
  - JspUtil.parseXMLDoc(WEB_XML, is);
  - NodeList nList =  webtld.getElementsByTagName("taglib");
  - if (nList.getLength() != 0) {
  - for(int i=0; inList.getLength(); i++) {
  - String tagUri = null;
  - String tagLoc = null;
  - Element e =  (Element)nList.item(i);
  -
  - NodeList uriList = e.getElementsByTagName("taglib-uri");
  - Element uriElem = (Element)uriList.item(0);
  - tagUri = JspUtil.getElementChildTextData(uriElem);
  - if (tagUri == null) continue;
  -
  - NodeList locList = 
  - e.getElementsByTagName("taglib-location");
  - Element locElem = (Element)locList.item(0);
  - tagLoc = JspUtil.getElementChildTextData(locElem);
  - if (tagLoc == null) continue;
  -
  - if (uriType(tagLoc) == NOROOT_REL_URI) {
  - // relative to web.xml location
  - tagLoc = "/WEB-INF/" + tagLoc;
  - }
  -
  - mappings.put(tagUri, new String[] {tagLoc, null});
  - }
  - }
  +if (is == null) {
  +Constants.message("jsp.error.internal.filenotfound", 
  +  new Object[]{WEB_XML},
  +  Logger.WARNING);
  +return;
  +}
  +Document webtld =
  +JspUtil.parseXMLDoc(WEB_XML, is);
  +NodeList nList =  webtld.getElementsByTagName("taglib");
  +if (nList.getLength() != 0) {
  +for(int i=0; inList.getLength(); i++) {
  +String tagUri = null;
  +String tagLoc = null;
  +Element e =  (Element)nList.item(i);
  +
  +NodeList uriList = e.getElementsByTagName("taglib-uri");
  +Element uriElem = (Element)uriList.item(0);
  +tagUri = JspUtil.getElementChildTextData(uriElem);
  +if (tagUri == null) continue;
  +
  +NodeList locList = 
  +e.getElementsByTagName("taglib-location");
  +Element locElem = (Element)locList.item(0);
  +tagLoc = JspUtil.getElementChildTextData(locElem);
  +if (tagLoc == null) continue;
  +
  +if (uriType(tagLoc) == NOROOT_REL_URI) {
  +// relative to web.xml location
  +tagLoc = "/WEB-INF/" + tagLoc;
  + 

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler DelegatingListener.java JspParseEventListener.java ParseEventListener.java ParserXJspSax.java ParserXJspSaxHandler.java

2000-12-05 Thread pierred

pierred 00/12/05 03:05:30

  Modified:jasper/src/share/org/apache/jasper/compiler
DelegatingListener.java JspParseEventListener.java
ParseEventListener.java ParserXJspSax.java
ParserXJspSaxHandler.java
  Log:
  Changes from JSP1.2 PD1 to JSP1.2 PFD that were not explicitely flagged
  in the PFD changes section:
  - Template text not accepted anymore if it is not encapsultated within
the jsp:cdata element
  - Tag Libraries used by a JSP document in XML syntax are defined via
the jsp:root xmlns attributes (no jsp:directive.taglib anymore)
  
  Revision  ChangesPath
  1.6   +12 -8 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/DelegatingListener.java
  
  Index: DelegatingListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/DelegatingListener.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DelegatingListener.java   2000/11/30 21:47:48 1.5
  +++ DelegatingListener.java   2000/12/05 11:05:19 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/DelegatingListener.java,v
 1.5 2000/11/30 21:47:48 pierred Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/11/30 21:47:48 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/DelegatingListener.java,v
 1.6 2000/12/05 11:05:19 pierred Exp $
  + * $Revision: 1.6 $
  + * $Date: 2000/12/05 11:05:19 $
*
* 
* 
  @@ -227,13 +227,17 @@
   return delegate.getTagLibraries();
   }
   
  -public void handleRootBegin(Attributes attrs) {}
  +public void handleRootBegin(Attributes attrs) throws JasperException {}
   public void handleRootEnd() {}
   
  -public void handleUninterpretedTagBegin(Mark start,Mark stop,String 
rawName,Attributes attrs) throws JasperException {}
  -
  +public void handleUninterpretedTagBegin(Mark start, Mark stop,
  +String rawName,Attributes attrs) 
  +throws JasperException {}
   public void handleUninterpretedTagEnd(Mark start, Mark stop,
  -   String rawName)
  - throws JasperException {}
  +  String rawName, char[] data)
  +throws JasperException {}
  +
  +public void handleJspCdata(Mark start, Mark stop, char[] data)
  +throws JasperException {}
   }
   
  
  
  
  1.14  +40 -20
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JspParseEventListener.java2000/11/30 21:47:54 1.13
  +++ JspParseEventListener.java2000/12/05 11:05:19 1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.13 2000/11/30 21:47:54 pierred Exp $
  - * $Revision: 1.13 $
  - * $Date: 2000/11/30 21:47:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.14 2000/12/05 11:05:19 pierred Exp $
  + * $Revision: 1.14 $
  + * $Date: 2000/12/05 11:05:19 $
*
* 
*
  @@ -742,21 +742,6 @@
   throw new CompileException(start, Constants.getString(
"jsp.error.page.bad_b_and_a_combo"));
   
  - if (directive.equals("taglib")) {
  -String uri = attrs.getValue("uri");
  -String prefix = attrs.getValue("prefix");
  - TagLibraryInfo tl = null;
  -
  - String[] location = 
  - ctxt.getTldLocation(uri);
  - if (location == null) {
  - tl = new TagLibraryInfoImpl(ctxt, prefix, uri);
  - } else {
  - tl = new TagLibraryInfoImpl(ctxt, prefix, uri, location);
  - }
  - libraries.addTagLibrary(prefix, tl);
  - }
  -
if (directive.equals("include")) {
String file = attrs.getValue("file");
String encoding = attrs.getValue("encoding");
  @@ -1046,7 +1031,33 @@
xo.append("jsp:root");
   }
   
  -public void handleRootBegin(Attributes attrs) {
  +public void handleRootBegin(Attributes attrs) 
  + throws JasperException 
  +{
  +i

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java

2000-12-05 Thread pierred

pierred 00/12/05 04:23:53

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java
  Log:
  Ooops... last fix broke tag libraries handling (was only processed
  for XML syntax). Things now back to normal.
  
  Revision  ChangesPath
  1.15  +32 -14
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JspParseEventListener.java2000/12/05 11:05:19 1.14
  +++ JspParseEventListener.java2000/12/05 12:23:46 1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.14 2000/12/05 11:05:19 pierred Exp $
  - * $Revision: 1.14 $
  - * $Date: 2000/12/05 11:05:19 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.15 2000/12/05 12:23:46 pierred Exp $
  + * $Revision: 1.15 $
  + * $Date: 2000/12/05 12:23:46 $
*
* 
*
  @@ -742,6 +742,12 @@
   throw new CompileException(start, Constants.getString(
"jsp.error.page.bad_b_and_a_combo"));
   
  + if (directive.equals("taglib")) {
  + String uri = attrs.getValue("uri");
  + String prefix = attrs.getValue("prefix");
  +processTaglibDirective(uri, prefix);
  +}
  +
if (directive.equals("include")) {
String file = attrs.getValue("file");
String encoding = attrs.getValue("encoding");
  @@ -1041,20 +1047,12 @@
String prefix = qName.substring(6);
if (!prefix.equals("jsp")) {
String uri = attrs.getValue(i);
  - System.out.println("prefix: " + prefix);
  - System.out.println("uri: " + uri);
  + //System.out.println("prefix: " + prefix);
  + //System.out.println("uri: " + uri);
if (uri.startsWith("urn:jsptld:")) {
uri = uri.substring(11);
  - }
  - TagLibraryInfo tl = null;
  - String[] location = 
  - ctxt.getTldLocation(uri);
  - if (location == null) {
  - tl = new TagLibraryInfoImpl(ctxt, prefix, uri);
  - } else {
  - tl = new TagLibraryInfoImpl(ctxt, prefix, uri, location);
}
  - libraries.addTagLibrary(prefix, tl);
  + processTaglibDirective(uri, prefix);
}
}
   }
  @@ -1109,5 +1107,25 @@
new Object[]{tli.getShortName(), msg}));
   }
   }
  +}
  +
  +/**
  + * Process a taglib directive. This can happen either via the
  + * JSP taglib directive (in JSP syntax) or via xmlns in jsp:root
  + * (in XML syntax).
  + */
  +private void processTaglibDirective(String uri, String prefix)
  + throws JasperException
  +{
  + TagLibraryInfo tl = null;
  + 
  + String[] location = 
  + ctxt.getTldLocation(uri);
  + if (location == null) {
  + tl = new TagLibraryInfoImpl(ctxt, prefix, uri);
  + } else {
  + tl = new TagLibraryInfoImpl(ctxt, prefix, uri, location);
  + }
  + libraries.addTagLibrary(prefix, tl);
   }
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/examples/jsp/num numguess.html

2000-12-01 Thread pierred

pierred 00/12/01 16:42:11

  Modified:webapps/examples/jsp/num numguess.html
  Log:
  Fixed the link to the source file for numguess example.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/webapps/examples/jsp/num/numguess.html
  
  Index: numguess.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/examples/jsp/num/numguess.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- numguess.html 2000/08/17 00:58:15 1.1
  +++ numguess.html 2000/12/02 00:42:11 1.2
  @@ -15,7 +15,7 @@
   body bgcolor="#FF"
   pfont color="#FF"a href="numguess.jsp"img src="../../images/execute.gif" 
align="right" border="0"/aa href="../index.html"img 
src="../../images/return.gif" width="24" height="24" align="right" 
border="0"/a/font/p
   
  -h3a href="/examples/jsp/source.jsp?/jsp/num/numguess.jsp"Source Code for 
Numguess Examplefont color="#FF"/a
  +h3a href="numguess.txt"Source Code for Numguess Examplefont 
color="#FF"/a
 /font /h3
   
   /body
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime PageContextImpl.java

2000-11-26 Thread pierred

pierred 00/11/26 08:13:57

  Modified:jasper/src/share/org/apache/jasper/runtime
PageContextImpl.java
  Log:
  PageContext has two variations of handlePageException().
  Have the one with the Exception argument simply calls the
  one with the Throwable argument to avoid duplication of
  code (I had previously modified the first one without
  updating the second one). Sent message to spec lead inquiring
  why both variations are kept in 1.2. Backward compatibility
  is not a valid reason imho.
  
  Revision  ChangesPath
  1.7   +20 -36
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PageContextImpl.java  2000/11/21 00:02:23 1.6
  +++ PageContextImpl.java  2000/11/26 16:13:57 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
 1.6 2000/11/21 00:02:23 pierred Exp $
  - * $Revision: 1.6 $
  - * $Date: 2000/11/21 00:02:23 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
 1.7 2000/11/26 16:13:57 pierred Exp $
  + * $Revision: 1.7 $
  + * $Date: 2000/11/26 16:13:57 $
*
* 
*
  @@ -452,11 +452,19 @@
   return out;
   }
   
  -public void handlePageException(Exception e)
  -throws IOException, ServletException {
  +public void handlePageException(Exception ex)
  +throws IOException, ServletException 
  +{
  + // Should never be called since handleException() called with a
  + // Throwable in the generated servlet.
  + handlePageException((Throwable) ex);
  +}
   
  - // set the request attribute with the exception.
  - request.setAttribute("javax.servlet.jsp.jspException", e);
  +public void handlePageException(Throwable t)
  +throws IOException, ServletException 
  +{
  +// set the request attribute with the Throwable.
  + request.setAttribute("javax.servlet.jsp.jspException", t);
   
if (errorPageURL != null  !errorPageURL.equals("")) {
   try {
  @@ -464,38 +472,14 @@
   } catch (IllegalStateException ise) {
   include(errorPageURL);
   }
  - } // Otherwise throw the exception wrapped inside a ServletException.
  - else {
  + } else {
  +// Otherwise throw the exception wrapped inside a ServletException.
// Set the exception as the root cause in the ServletException
// to get a stack trace for the real problem
  - if( e instanceof IOException )
  - throw (IOException)e;
  - if( e instanceof ServletException )
  - throw (ServletException) e;
  - throw new ServletException(e);
  + if (t instanceof IOException) throw (IOException)t;
  + if (t instanceof ServletException) throw (ServletException)t;
  + throw new ServletException(t);
}
  -
  -}
  -
  -public void handlePageException(Throwable e)
  -throws IOException, ServletException {
  -
  - // set the request attribute with the exception.
  - request.setAttribute("javax.servlet.jsp.jspException", e);
  -
  - if (errorPageURL != null  !errorPageURL.equals("")) {
  - forward(errorPageURL);
  - } // Otherwise throw the exception wrapped inside a ServletException.
  - else {
  - // Set the exception as the root cause in the ServletException
  - // to get a stack trace for the real problem
  - if( e instanceof IOException )
  - throw (IOException)e;
  - if( e instanceof ServletException )
  - throw (ServletException) e;
  - throw new ServletException(e);
  - }
  -
   }
   
   protected JspWriter _createOut(int bufferSize, boolean autoFlush)
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java

2000-11-26 Thread pierred

pierred 00/11/26 08:17:35

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java
  Log:
  As per JSP1.2, generated servlet now catches Throwable instead
  of Exception, and calls PageContext.handlePageException(Throwable).
  Submitted by: "Rob Saccoccio" [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.12  +5 -6  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JspParseEventListener.java2000/11/06 20:52:26 1.11
  +++ JspParseEventListener.java2000/11/26 16:17:34 1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.11 2000/11/06 20:52:26 pierred Exp $
  - * $Revision: 1.11 $
  - * $Date: 2000/11/06 20:52:26 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.12 2000/11/26 16:17:34 pierred Exp $
  + * $Revision: 1.12 $
  + * $Date: 2000/11/26 16:17:34 $
*
* 
*
  @@ -356,14 +356,13 @@
   
   private void generateFooter() throws JasperException {
writer.popIndent();
  - //writer.println("} catch (Throwable t) {");
  - writer.println("} catch (Exception ex) {");
  + writer.println("} catch (Throwable t) {");
writer.pushIndent();
   writer.println("if (out.getBufferSize() != 0)");
   writer.pushIndent();
writer.println("out.clearBuffer();");
writer.popIndent();
  - writer.println("pageContext.handlePageException(ex);");
  + writer.println("pageContext.handlePageException(t);");
writer.popIndent();
writer.println("} finally {");
writer.pushIndent();
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JikesJavaCompiler.java

2000-11-24 Thread pierred

pierred 00/11/24 05:38:33

  Modified:jasper/src/share/org/apache/jasper/compiler
JikesJavaCompiler.java
  Log:
  Double quotes only in case of TC running under Windows.
  
  Submitted by:  "Schmitt, Christian" [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.3   +9 -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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JikesJavaCompiler.java2000/09/01 15:58:44 1.2
  +++ JikesJavaCompiler.java2000/11/24 13:38:33 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
 1.2 2000/09/01 15:58:44 pierred Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/01 15:58:44 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
 1.3 2000/11/24 13:38:33 pierred Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/11/24 13:38:33 $
*
* 
*
  @@ -134,12 +134,14 @@
   public boolean compile(String source) {
Process p;
int exitValue = -1;
  + String quote = "";
   
   // Used to dynamically load classpath if using Microsoft 
   // virtual machine
   if (MicrosoftClasspath==null) {
   MicrosoftClasspath = new StringBuffer(200);
   if (System.getProperty("java.vendor").startsWith("Microsoft")) {
  +quote = "\"";
   //Get Microsoft classpath
   String javaHome = System.getProperty("java.home") + 
 "\\Packages";
  @@ -152,12 +154,12 @@
   }
   
   String[] compilerCmd = new String[] {
  -  "\"" + compilerPath + "\"",
  +  quote + compilerPath + quote,
 //XXX - add encoding once Jikes supports it
  -  "-classpath", "\"" + classpath + MicrosoftClasspath + "\"",
  -  "-d", "\"" + outdir + "\"",
  +  "-classpath", quote + classpath + MicrosoftClasspath + quote,
  +  "-d", quote + outdir + quote,
 "-nowarn",
  -  "\"" + source + "\""
  +  quote + source + quote
   };
   
   ByteArrayOutputStream tmpErr = new 
ByteArrayOutputStream(OUTPUT_BUFFER_SIZE);
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime PageContextImpl.java

2000-11-20 Thread pierred

pierred 00/11/20 16:18:27

  Modified:src/share/org/apache/jasper/runtime Tag: tomcat_32
PageContextImpl.java
  Log:
  Fix for bug report #412:
public void removeAttribute(String name) does not work properly
  
  - removeAttribute now removes the attribute from the 4 scopes.
  - REQUEST_SCOPE now handled properly.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.13.2.3  +13 -7 
jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.13.2.2
  retrieving revision 1.13.2.3
  diff -u -r1.13.2.2 -r1.13.2.3
  --- PageContextImpl.java  2000/11/10 23:19:25 1.13.2.2
  +++ PageContextImpl.java  2000/11/21 00:18:25 1.13.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v 
1.13.2.2 2000/11/10 23:19:25 craigmcc Exp $
  - * $Revision: 1.13.2.2 $
  - * $Date: 2000/11/10 23:19:25 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v 
1.13.2.3 2000/11/21 00:18:25 pierred Exp $
  + * $Revision: 1.13.2.3 $
  + * $Date: 2000/11/21 00:18:25 $
*
* 
*
  @@ -92,8 +92,6 @@
   /**
* Implementation of the PageContext class from the JSP spec.
*
  - * The removeAttribute method does not work for request scope. Needs fixing.
  - *
* @author Anil K. Vijendran
* @author Larry Cable
* @author Hans Bergsten
  @@ -286,7 +284,7 @@
break;
   
case REQUEST_SCOPE:
  - throw new IllegalArgumentException("cant remove Attributes from 
request scope");
  + request.removeAttribute(name);
   
case SESSION_SCOPE:
if (session == null)
  @@ -367,7 +365,15 @@
   }
   
   public void removeAttribute(String name) {
  - attributes.remove(name);
  + try {
  + removeAttribute(name, PAGE_SCOPE);
  + removeAttribute(name, REQUEST_SCOPE);
  + removeAttribute(name, SESSION_SCOPE);
  + removeAttribute(name, APPLICATION_SCOPE);
  + } catch (Exception ex) {
  + // we remove as much as we can, and
  + // simply ignore possible exceptions
  + }
   }
   
   public JspWriter getOut() {
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspUtil.java TagLibraryInfoImpl.java TldLocationsCache.java

2000-11-18 Thread pierred

pierred 00/11/18 14:36:49

  Modified:jasper/src/share/org/apache/jasper/compiler JspUtil.java
TagLibraryInfoImpl.java TldLocationsCache.java
  Log:
  Cleanup of all code where "element child text data"
  is read from the DOM when we parse a TLD.
  Trim all text data read, and properly handle
  null values.
  
  Revision  ChangesPath
  1.6   +45 -3 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java
  
  Index: JspUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspUtil.java  2000/10/11 19:35:15 1.5
  +++ JspUtil.java  2000/11/18 22:36:48 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v
 1.5 2000/10/11 19:35:15 shemnon Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/10/11 19:35:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v
 1.6 2000/11/18 22:36:48 pierred Exp $
  + * $Revision: 1.6 $
  + * $Date: 2000/11/18 22:36:48 $
*
* 
* 
  @@ -345,6 +345,48 @@
   return table;
   }
   
  +/**
  + * Get the data for the first child associated with the
  + * Element provided as argument. It is assumed that this
  + * first child is of type Text.
  + *
  + * @param e the DOM Element to read from 
  + * @return the data associated with the first child of the DOM
  + *  element.
  + */
  +public static String getElementChildTextData(Element e) {
  + String s = null;
  + Text t = (Text)e.getFirstChild();
  + if (t != null) {
  + s = t.getData();
  + if (s != null) {
  + s = s.trim();
  + }
  + }
  + return s;
  +}
  +
  +/**
  + * Convert a String value to 'boolean'.
  + * Besides the standard conversions done by
  + * Boolean.valueOf(s).booleanValue(), the value "yes"
  + * (ignore case) is also converted to 'true'. 
  + * If 's' is null, then 'false' is returned.
  + *
  + * @param s the string to be converted
  + * @return the boolean value associated with the string s
  + */
  +public static boolean booleanValue(String s) {
  + boolean b = false;
  + if (s != null) {
  + if (s.equalsIgnoreCase("yes")) {
  + b = true;
  + } else {
  + b = Boolean.valueOf(s).booleanValue();
  + }
  + }
  + return b;
  +}
   }
   
   class MyEntityResolver implements EntityResolver {
  
  
  
  1.15  +41 -87
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TagLibraryInfoImpl.java   2000/11/17 22:39:23 1.14
  +++ TagLibraryInfoImpl.java   2000/11/18 22:36:48 1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.14 2000/11/17 22:39:23 pierred Exp $
  - * $Revision: 1.14 $
  - * $Date: 2000/11/17 22:39:23 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.15 2000/11/18 22:36:48 pierred Exp $
  + * $Revision: 1.15 $
  + * $Date: 2000/11/18 22:36:48 $
*
* The Apache Software License, Version 1.1
*
  @@ -282,25 +282,15 @@
   Element e = (Element) tmp;
   String tname = e.getTagName();
   if (tname.equals("tlibversion") || tname.equals("tlib-version")) {
  -Text t = (Text) e.getFirstChild();
  -if (t != null)
  -this.tlibversion = t.getData().trim();
  + this.tlibversion = JspUtil.getElementChildTextData(e);
   } else if (tname.equals("jspversion") || tname.equals("jsp-version")) {
  -Text t = (Text) e.getFirstChild();
  -if (t != null)
  -this.jspversion = t.getData().trim();
  + this.jspversion = JspUtil.getElementChildTextData(e);
   } else if (tname.equals("shortname") || tname.equals("short-name")) {
  -Text t = (Text) e.getFirstChild();
  -if (t != null)
  -this.shortname = t.getData().trim();
  + this.shortname = JspUtil.getElementChildTextD

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java

2000-11-17 Thread pierred

pierred 00/11/17 13:59:08

  Modified:src/share/org/apache/jasper/compiler Tag: tomcat_32
TagLibraryInfoImpl.java
  Log:
  trim the tag values. (see bug report #349).
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.22.2.7  +17 -17
jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.22.2.6
  retrieving revision 1.22.2.7
  diff -u -r1.22.2.6 -r1.22.2.7
  --- TagLibraryInfoImpl.java   2000/11/16 15:57:38 1.22.2.6
  +++ TagLibraryInfoImpl.java   2000/11/17 21:59:08 1.22.2.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.22.2.6 2000/11/16 15:57:38 pierred Exp $
  - * $Revision: 1.22.2.6 $
  - * $Date: 2000/11/16 15:57:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.22.2.7 2000/11/17 21:59:08 pierred Exp $
  + * $Revision: 1.22.2.7 $
  + * $Date: 2000/11/17 21:59:08 $
*
* The Apache Software License, Version 1.1
*
  @@ -364,23 +364,23 @@
   if (tname.equals("tlibversion")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.tlibversion = t.getData();
  +this.tlibversion = t.getData().trim();
   } else if (tname.equals("jspversion")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.jspversion = t.getData();
  +this.jspversion = t.getData().trim();
   } else if (tname.equals("shortname")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.shortname = t.getData();
  +this.shortname = t.getData().trim();
   } else if (tname.equals("uri")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.urn = t.getData();
  +this.urn = t.getData().trim();
   } else if (tname.equals("info")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.info = t.getData();
  +this.info = t.getData().trim();
   } else if (tname.equals("tag"))
   tagVector.addElement(createTagInfo(e));
   else
  @@ -411,23 +411,23 @@
   if (tname.equals("name")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -name = t.getData();
  +name = t.getData().trim();
   } else if (tname.equals("tagclass")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -tagclass = t.getData();
  +tagclass = t.getData().trim();
   } else if (tname.equals("teiclass")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -teiclass = t.getData();
  +teiclass = t.getData().trim();
   } else if (tname.equals("bodycontent")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -bodycontent = t.getData();
  +bodycontent = t.getData().trim();
   } else if (tname.equals("info")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -info = t.getData();
  +info = t.getData().trim();
   } else if (tname.equals("attribute"))
   attributeVector.addElement(createAttribute(e));
   else 
  @@ -492,25 +492,25 @@
   if (tname.equals("name"))  {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -name = t.getData();
  +name = t.getData().trim();
   } else if (tname.equals("required"))  {
   Text t = (Text) e.getFirstChild();
   if (t != null) {
  -required = Boolean.valueOf(t.getData()).booleanValue();
  +required = Boolean.valueOf(t.getData().trim()).booleanValue();
   if( t.getData().equalsIgnoreCase("yes") )
   required = true;
   }
   } else if (tname.equals("rtexprvalue&qu

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java

2000-11-17 Thread pierred

pierred 00/11/17 14:39:23

  Modified:jasper/src/share/org/apache/jasper/compiler
TagLibraryInfoImpl.java
  Log:
  trim the tag values. (see bug report #349).
  
  Revision  ChangesPath
  1.14  +31 -31
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TagLibraryInfoImpl.java   2000/11/06 20:52:28 1.13
  +++ TagLibraryInfoImpl.java   2000/11/17 22:39:23 1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.13 2000/11/06 20:52:28 pierred Exp $
  - * $Revision: 1.13 $
  - * $Date: 2000/11/06 20:52:28 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.14 2000/11/17 22:39:23 pierred Exp $
  + * $Revision: 1.14 $
  + * $Date: 2000/11/17 22:39:23 $
*
* The Apache Software License, Version 1.1
*
  @@ -284,23 +284,23 @@
   if (tname.equals("tlibversion") || tname.equals("tlib-version")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.tlibversion = t.getData();
  +this.tlibversion = t.getData().trim();
   } else if (tname.equals("jspversion") || tname.equals("jsp-version")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.jspversion = t.getData();
  +this.jspversion = t.getData().trim();
   } else if (tname.equals("shortname") || tname.equals("short-name")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.shortname = t.getData();
  +this.shortname = t.getData().trim();
   } else if (tname.equals("uri")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.urn = t.getData();
  +this.urn = t.getData().trim();
   } else if (tname.equals("info")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -this.info = t.getData();
  +this.info = t.getData().trim();
   } else if (tname.equals("validator")) {
this.tagLibraryValidator = createValidator(e);
   } else if (tname.equals("tag"))
  @@ -341,23 +341,23 @@
   if (tname.equals("name")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -name = t.getData();
  +name = t.getData().trim();
   } else if (tname.equals("tagclass") || tname.equals("tag-class")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -tagclass = t.getData();
  +tagclass = t.getData().trim();
   } else if (tname.equals("teiclass") || tname.equals("tei-class")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -teiclass = t.getData();
  +teiclass = t.getData().trim();
   } else if (tname.equals("bodycontent") || tname.equals("body-content")) 
{
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -bodycontent = t.getData();
  +bodycontent = t.getData().trim();
   } else if (tname.equals("info") || tname.equals("tlib-description")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -info = t.getData();
  +info = t.getData().trim();
   } else if (tname.equals("attribute")) {
   attributeVector.addElement(createAttribute(e));
   
  @@ -366,15 +366,15 @@
} else if (tname.equals("display-name")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -displayName = t.getData();
  +displayName = t.getData().trim();
} else if (tname.equals("small-icon")) {
   Text t = (Text) e.getFirstChild();
   if (t != null)
  -smallIcon = t.getData();
  + 

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java

2000-11-16 Thread pierred

pierred 00/11/16 07:57:38

  Modified:src/share/org/apache/jasper/compiler Tag: tomcat_32
TagLibraryInfoImpl.java
  Log:
  Do not copy taglib jar file to the work directory
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.22.2.6  +7 -5  
jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.22.2.5
  retrieving revision 1.22.2.6
  diff -u -r1.22.2.5 -r1.22.2.6
  --- TagLibraryInfoImpl.java   2000/10/06 11:09:38 1.22.2.5
  +++ TagLibraryInfoImpl.java   2000/11/16 15:57:38 1.22.2.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.22.2.5 2000/10/06 11:09:38 larryi Exp $
  - * $Revision: 1.22.2.5 $
  - * $Date: 2000/10/06 11:09:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.22.2.6 2000/11/16 15:57:38 pierred Exp $
  + * $Revision: 1.22.2.6 $
  + * $Date: 2000/11/16 15:57:38 $
*
* The Apache Software License, Version 1.1
*
  @@ -234,6 +234,8 @@
}

// FIXME Take this stuff out when taglib changes are thoroughly tested.
  +// 2000.11.15 commented out the 'copy to work dir' section,
  +// which I believe is what this FIXME comment referred to. (pierred)
if (uri.endsWith("jar")) {

if (!isRelativeURI(uri)) {
  @@ -248,6 +250,7 @@
this.jarEntries = new Hashtable();
this.ctxt = ctxt;

  +/* NOT COMPILED
// First copy this file into our work directory! 
{
File jspFile = new File(ctxt.getJspFile());
  @@ -278,8 +281,7 @@

ctxt.addJar(jarFileName);
}
  - 
  - 
  +*/ // END NOT COMPILED
boolean tldFound = false;
ZipEntry entry;
while ((entry = zin.getNextEntry()) != null) {
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime JspRuntimeLibrary.java

2000-11-14 Thread pierred

pierred 00/11/14 14:06:22

  Modified:jasper/src/share/org/apache/jasper/runtime
JspRuntimeLibrary.java
  Log:
  Bug fix: conversion of String to boolean was erroneous
  Submitted by: Gareth Morgan [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.3   +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JspRuntimeLibrary.java2000/09/26 00:47:56 1.2
  +++ JspRuntimeLibrary.java2000/11/14 22:06:22 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
 1.2 2000/09/26 00:47:56 pierred Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/26 00:47:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
 1.3 2000/11/14 22:06:22 pierred Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/11/14 22:06:22 $
*
* 
* 
  @@ -343,7 +343,7 @@
} else if (t.equals(boolean.class)) {
boolean[] tmpval = new boolean[values.length];
for (int i = 0 ; i  values.length; i++)
  - tmpval[i] = Boolean.getBoolean (values[i]);
  + tmpval[i] = (Boolean.valueOf(values[i])).booleanValue();
method.invoke (bean, new Object[] {tmpval});
} else if (t.equals(short.class)) {
short[] tmpval = new short[values.length];
  
  
  

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




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JspServlet.java

2000-11-06 Thread pierred

pierred 00/11/06 12:52:31

  Modified:jasper/src/share/org/apache/jasper CommandLineContext.java
EmbededServletOptions.java JspC.java
JspCompilationContext.java JspEngineContext.java
Options.java
   jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java TagLibraryInfoImpl.java
   jasper/src/share/org/apache/jasper/servlet JspServlet.java
  Removed: jasper/src/share/org/apache/jasper/compiler
TagLibrariesGlobal.java
  Log:
  Bug fix: TagLibrariesGlobal was shared by all web-apps while
   it is meant to be unique within each web-app.
  
  Took the opportunity to rename TagLibrariesGlobal to TldLocationsCache
  which represents better what it is meant for.
  
  Revision  ChangesPath
  1.4   +10 -4 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/CommandLineContext.java
  
  Index: CommandLineContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/CommandLineContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CommandLineContext.java   2000/10/31 22:54:09 1.3
  +++ CommandLineContext.java   2000/11/06 20:52:18 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/CommandLineContext.java,v
 1.3 2000/10/31 22:54:09 pierred Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/31 22:54:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/CommandLineContext.java,v
 1.4 2000/11/06 20:52:18 pierred Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/11/06 20:52:18 $
*
* 
* 
  @@ -84,7 +84,8 @@
* over to other pages being compiled.  Things like the taglib classloaders
* and directives.
*
  - *@author Danno Ferrin
  + * @author Danno Ferrin
  + * @author Pierre Delisle
*/
   public class CommandLineContext implements JspCompilationContext {
   
  @@ -391,5 +392,10 @@
   return f.getAbsolutePath();
   }
   
  +public String[] getTldLocation(String uri) throws JasperException {
  + String[] location = 
  + options.getTldLocationsCache().getLocation(uri);
  + return location;
  +}
   }
   
  
  
  
  1.4   +19 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EmbededServletOptions.java2000/10/12 23:34:11 1.3
  +++ EmbededServletOptions.java2000/11/06 20:52:18 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
 1.3 2000/10/12 23:34:11 pierred Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/12 23:34:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/EmbededServletOptions.java,v
 1.4 2000/11/06 20:52:18 pierred Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/11/06 20:52:18 $
*
* 
* 
  @@ -68,11 +68,14 @@
   
   import org.apache.jasper.logging.Logger;
   
  +import org.apache.jasper.compiler.TldLocationsCache;
  +
   /**
* A class to hold all init parameters specific to the JSP engine. 
*
* @author Anil K. Vijendran
* @author Hans Bergsten
  + * @author Pierre Delisle
*/
   public final class EmbededServletOptions implements Options {
   /**
  @@ -136,6 +139,11 @@
   public String jspCompilerPath = null;
   
   /**
  + * Cache for the TLD locations
  + */
  +private TldLocationsCache tldLocationsCache = null;
  +
  +/**
* Are we keeping generated code around?
*/
   public boolean getKeepGenerated() {
  @@ -206,6 +214,10 @@
   return jspCompilerPath;
   }
   
  +public TldLocationsCache getTldLocationsCache() {
  + return tldLocationsCache;
  +}
  +
   /**
* Create an EmbededServletOptions object using data available from
* ServletConfig and ServletContext. 
  @@ -308,6 +320,10 @@
 Logger.FATAL);
   }
   }
  +
  + // Setup the global Tag Libraries location cache for this
  + // web-application.
  + tldLocationsCache = new TldLocationsCache(context);
   }
   }
   
  
  
  
  1.6   +15 -3 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TldLocationsCache.java

2000-11-06 Thread pierred

pierred 00/11/06 12:53:32

  Added:   jasper/src/share/org/apache/jasper/compiler
TldLocationsCache.java
  Log:
  New class that replaces TagLibrariesGlobal.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TldLocationsCache.java
  
  Index: TldLocationsCache.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   */ 
  package org.apache.jasper.compiler;
  
  import java.io.InputStream;
  import java.io.FileNotFoundException;
  import java.io.File;
  import java.io.IOException;
  import java.util.Hashtable;
  import java.util.Enumeration;
  import java.util.jar.*;
  import java.net.JarURLConnection;
  import java.net.*;
  
  import javax.servlet.ServletContext;
  import javax.servlet.jsp.tagext.TagLibraryInfo;
  import javax.servlet.jsp.tagext.TagInfo;
  import javax.servlet.jsp.tagext.Tag;
  
  import org.w3c.dom.*;
  import org.xml.sax.*;
  
  import org.apache.jasper.Constants;
  import org.apache.jasper.JasperException;
  import org.apache.jasper.logging.Logger;
  
  /**
   * A container for all tag libraries that are defined "globally"
   * for the web application.
   * 
   * Tag Libraries can be defined globally in one of two ways:
   *   1. Via taglib elements in web.xml:
   *  the uri and location of the tag-library are specified in
   *  the taglib element.
   *   2. Via packaged jar files that contain .tld files
   *  within the META-INF directory, or some subdirectory
   *  of it. The taglib is 'global' if it has the uri
   *  element defined.
   *
   * A mapping between the taglib URI and its associated TaglibraryInfoImpl
   * is maintained in this container.
   * Actually, that's what we'd like to do. However, because of the
   * way the classes TagLibraryInfo and TagInfo have been defined,
   * it is not currently possible to share an instance of TagLibraryInfo
   * across page invocations. A bug has been submitted to the spec lead.
   * In the mean time, all we do is save the 'location' where the
   * TLD associated with a taglib URI can be found.
   *
   * When a JSP page has a taglib directive, the mappings in this container
   * are

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties messages_es.properties

2000-11-06 Thread pierred

pierred 00/11/06 13:05:03

  Modified:jasper/src/share/org/apache/jasper/compiler Parser.java
   jasper/src/share/org/apache/jasper/resources
messages.properties messages_es.properties
  Log:
  Port Larry Isaacs' improvement to the error message for
  unterminated user-defined tag. Thanks Larry.
  
   I found that the error is simply an unterminated custom tag, i.e.
   a typo in the ending tag achieves the same thing as a nesting error.
   As a result, I broadened the error message a bit from what you
   originally committed.  It uses:
  
   Unterminated user-defined tag: ending tag {0} not found or incorrectly nested
  
  Revision  ChangesPath
  1.6   +1 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Parser.java   2000/10/28 03:20:21 1.5
  +++ Parser.java   2000/11/06 21:04:56 1.6
  @@ -864,7 +864,7 @@
} catch (ParseException ex) {
throw new ParseException(
   start,
  - Constants.getString("jsp.error.incorrect.nesting", 
  + 
Constants.getString("jsp.error.unterminated.user.tag", 
 new Object[]{JspUtil.escapeXml(tagEnd)}));
}
listener.setTemplateInfo(parser.tmplStart, 
parser.tmplStop);
  
  
  
  1.10  +2 -2  
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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- messages.properties   2000/11/02 01:12:16 1.9
  +++ messages.properties   2000/11/06 21:04:59 1.10
  @@ -1,4 +1,4 @@
  -# $Id: messages.properties,v 1.9 2000/11/02 01:12:16 pierred Exp $
  +# $Id: messages.properties,v 1.10 2000/11/06 21:04:59 pierred Exp $
   #
   # Default localized string information
   # Localized this the Default Locale as is en_US
  @@ -218,7 +218,6 @@
   jsp.parser.sax.featurenotsupported=SAX feature not supported: {0}
   jsp.parser.sax.featurenotrecognized=SAX feature not recognized: {0}
   jsp.error.no.more.content=End of content reached while more parsing required: tag 
nesting error?
  -jsp.error.incorrect.nesting=Incorrect nesting involving {0}
   jsp.error.parse.xml=XML parsing error on file {0}: {1}
   jsp.error.parse.xml.line=XML parsing error on file {0}: (line {1}, col {2}): {3}
   jsp.error.internal.filenotfound=Internal Error: File {0} not found
  @@ -230,3 +229,4 @@
   tld.error.variableNotAllowed=It is an error for a tag that has one or more variable 
subelements to have a TagExtraInfo class that returns a non-null object.
   jsp.error.tldInWebDotXmlNotFound=Could not locate TLD {1} for URI {0} specified in 
web.xml
   jsp.error.taglibDirective.absUriCannotBeResolved=This absolute uri ({0}) cannot be 
resolved in either web.xml or the jar files deployed with this application
  +jsp.error.unterminated.user.tag=Unterminated user-defined tag: ending tag {0} not 
found or incorrectly nested
  
  
  
  1.6   +1 -2  
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- messages_es.properties2000/11/02 01:12:16 1.5
  +++ messages_es.properties2000/11/06 21:05:01 1.6
  @@ -1,4 +1,4 @@
  -# $Id: messages_es.properties,v 1.5 2000/11/02 01:12:16 pierred Exp $
  +# $Id: messages_es.properties,v 1.6 2000/11/06 21:05:01 pierred Exp $
   #
   # Default localized string information
   # Localized para Locale es_ES
  @@ -208,7 +208,6 @@
   jsp.parser.sax.featurenotsupported=
   jsp.parser.sax.featurenotrecognized=
   jsp.error.no.more.content=
  -jsp.error.incorrect.nesting=
   jsp.error.parse.xml=
   jsp.error.parse.xml.line=
   jsp.error.internal.filenotfound=
  
  
  

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




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagLibrariesGlobal.java

2000-11-01 Thread pierred

pierred 00/11/01 16:43:20

  Modified:jasper/src/share/org/apache/jasper/compiler
TagLibrariesGlobal.java
  Log:
  Bug fix: use proper key for error message
  'jsp.error.internal.filenotfound'
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibrariesGlobal.java
  
  Index: TagLibrariesGlobal.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibrariesGlobal.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TagLibrariesGlobal.java   2000/10/31 23:01:50 1.1
  +++ TagLibrariesGlobal.java   2000/11/02 00:43:20 1.2
  @@ -144,7 +144,7 @@
InputStream is = ctxt.getResourceAsStream(WEB_XML);
if (is == null) {
throw new JasperException(
  - Constants.getString("jsp.error.internal.file.not.found", 
  + Constants.getString("jsp.error.internal.filenotfound", 
new Object[]{WEB_XML}));
}
Document webtld =
  
  
  

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




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagLibrariesGlobal.java TagLibraryInfoImpl.java

2000-11-01 Thread pierred

pierred 00/11/01 17:08:42

  Modified:jasper/src/share/org/apache/jasper/compiler
TagLibrariesGlobal.java TagLibraryInfoImpl.java
  Log:
  Simply log an error instead of throwing an exception
  when problem processing a TLD.
  Also give the name of the TLD in the error message.
  
  Revision  ChangesPath
  1.3   +12 -6 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibrariesGlobal.java
  
  Index: TagLibrariesGlobal.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibrariesGlobal.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TagLibrariesGlobal.java   2000/11/02 00:43:20 1.2
  +++ TagLibrariesGlobal.java   2000/11/02 01:08:41 1.3
  @@ -74,8 +74,8 @@
   
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
  +import org.apache.jasper.logging.Logger;
   
  -
   /**
* A container for all tag libraries that are defined "globally"
* for the web application.
  @@ -142,10 +142,12 @@
   {
   // Parse web.xml
InputStream is = ctxt.getResourceAsStream(WEB_XML);
  +
if (is == null) {
  - throw new JasperException(
  - Constants.getString("jsp.error.internal.filenotfound", 
  - new Object[]{WEB_XML}));
  + Constants.message("jsp.error.internal.filenotfound", 
  +   new Object[]{WEB_XML},
  +   Logger.WARNING);
  + return;
}
Document webtld =
JspUtil.parseXMLDoc(WEB_XML, is);
  @@ -271,8 +273,12 @@
   {
Document tld = JspUtil.parseXMLDoc(resourcePath, in);
   NodeList list = tld.getElementsByTagName("taglib");
  -if (list.getLength() != 1)
  -throw new 
JasperException(Constants.getString("jsp.error.more.than.one.taglib"));
  +if (list.getLength() != 1) {
  + Constants.message("jsp.error.more.than.one.taglib",
  +   new Object[]{resourcePath},
  +   Logger.ERROR);
  + return null;
  + }
   
   Element elem = (Element)list.item(0);
   list = elem.getChildNodes();
  
  
  
  1.12  +6 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TagLibraryInfoImpl.java   2000/11/01 20:25:09 1.11
  +++ TagLibraryInfoImpl.java   2000/11/02 01:08:41 1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.11 2000/11/01 20:25:09 pierred Exp $
  - * $Revision: 1.11 $
  - * $Date: 2000/11/01 20:25:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.12 2000/11/02 01:08:41 pierred Exp $
  + * $Revision: 1.12 $
  + * $Date: 2000/11/02 01:08:41 $
*
* The Apache Software License, Version 1.1
*
  @@ -267,7 +267,9 @@
   NodeList list = tld.getElementsByTagName("taglib");
   
   if (list.getLength() != 1)
  -throw new 
JasperException(Constants.getString("jsp.error.more.than.one.taglib"));
  +throw new JasperException(
  +Constants.getString("jsp.error.more.than.one.taglib",
  +new Object[]{uri}));
   
   Element elem = (Element) list.item(0);
   list = elem.getChildNodes();
  
  
  

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




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources web_23.dtd

2000-10-30 Thread pierred

pierred 00/10/30 06:35:52

  Modified:jasper/src/share/org/apache/jasper/resources web_23.dtd
  Log:
  Latest web.dtd in sync with catalina.
  
  Revision  ChangesPath
  1.2   +83 -25
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/web_23.dtd
  
  Index: web_23.dtd
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/web_23.dtd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- web_23.dtd2000/10/04 05:10:58 1.1
  +++ web_23.dtd2000/10/30 14:35:51 1.2
  @@ -11,8 +11,8 @@
   context-param*, filter*, filter-mapping*, listener*,
   servlet*, servlet-mapping*, session-config?,
   mime-mapping*, welcome-file-list?, error-page*, taglib*,
  -resource-ref*, security-constraint*, login-config?, security-role*,
  -env-entry*, ejb-ref*)
  +resource-env-ref*, resource-ref*, security-constraint*,
  +login-config?, security-role*, env-entry*, ejb-ref*)
   
   !-- Declares a filter in the web application deployment descriptor.
   The filter is mapped to either a servlet or a URL pattern in the
  @@ -33,7 +33,7 @@
   !ELEMENT filter-class (#PCDATA)
   
   !-- Declaration of the filter mappings in this web application.
  -The conatiner used the filter-mapping declarations to decide which
  +The conatiner uses the filter-mapping declarations to decide which
   filters to apply to a request, and in what order.  The container
   matches the request URI to a Servlet in the normal way.  To determine
   which filters to apply it matches filter-mapping declarations either
  @@ -109,7 +109,8 @@
   servlet. If a jsp-file is specified and the load-on-startup element is
   present, then the JSP should be precompiled and loaded. --
   
  -!ELEMENT servlet (icon?, servlet-name, display-name?, description?, 
(servlet-class|jsp-file), init-param*, load-on-startup?, security-role-ref*)
  +!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
  +(servlet-class|jsp-file), init-param*, load-on-startup?, security-role-ref*)
   
   !-- The servlet-name element contains the canonical name of the
   servlet. --
  @@ -122,7 +123,7 @@
   !ELEMENT servlet-class (#PCDATA)
   
   !-- The jsp-file element contains the full path to a JSP file within
  -the web application. --
  +the web application beginning with a '/'. --
   
   !ELEMENT jsp-file (#PCDATA)
   
  @@ -147,7 +148,7 @@
   !ELEMENT servlet-mapping (servlet-name, url-pattern)
   
   !-- The url-pattern element contains the url pattern of the
  -mapping. Must follow the rules specified in Section 10 of the Servlet
  +mapping. Must follow the rules specified in Section 11.2 of the Servlet
   API Specification. --
   
   !ELEMENT url-pattern (#PCDATA)
  @@ -169,12 +170,12 @@
   !ELEMENT mime-mapping (extension, mime-type)
   
   !-- The extension element contains a string describing an
  -extension. example: txt --
  +extension. example: "txt" --
   
   !ELEMENT extension (#PCDATA)
   
   !-- The mime-type element contains a defined mime type. example:
  -text/plain --
  +"text/plain" --
   
   !ELEMENT mime-type (#PCDATA)
   
  @@ -223,10 +224,37 @@
   
   !ELEMENT location (#PCDATA)
   
  +!-- The resource-env-ref element contains a declaration of a component's
  +reference to an administered object associated with a resource in the
  +component's environment.  It consists of an optional description, the
  +resource environment reference name, and an indication of the resource
  +environment reference type expected by the component's code.  Examples:
  +  resource-env-ref
  +resource-env-ref-namejms/StockQueue/resource-env-ref-name
  +resource-env-ref-typejavax.jms.Queue/resource-env-ref-type
  +  /resource-env-ref
  +--
  +
  +!ELEMENT resource-env-ref (description?, resource-env-ref-name,
  +resource-env-ref-type)
  +
  +!-- The resource-env-ref-name element specifies the name of a
  +resource environment reference; its value is the environment entry
  +name used in code. --
  +
  +!ELEMENT resource-env-ref-name (#PCDATA)
  +
  +!-- The resource-env-ref-type element specifies the type of a
  +resource environment reference.  Web containers in J2EE are requird
  +to support javax.jms.Topic and javax.jms.Queue. --
  +
  +!ELEMENT resource-env-ref-type (#PCDATA)
  +
   !-- The resource-ref element contains a declaration of a Web
   Application's reference to an external resource. --
   
  -!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth)
  +!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,
  +res-sharing-scope?)
   
   !-- The res-ref-name element specifies the name of the resource
   factory reference name. --
  @@ -241,14 +269,27 @@
   !-- The res-auth element indicates whether the application component
   code performs resource signon programmatically or whether the
   container signs onto the resource based on t

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler PageDataImpl.java JspParseEventListener.java TagLibraryInfoImpl.java XmlOutputter.java PageInfoImpl.java

2000-10-27 Thread pierred

pierred 00/10/27 14:23:37

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java TagLibraryInfoImpl.java
XmlOutputter.java
  Added:   jasper/src/share/org/apache/jasper/compiler
PageDataImpl.java
  Removed: jasper/src/share/org/apache/jasper/compiler
PageInfoImpl.java
  Log:
  Now compiles with 1.2PFD api.
- PageInfo - PageData
- new signature for TagLibraryValidator.validate()
  
  Revision  ChangesPath
  1.8   +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JspParseEventListener.java2000/10/23 21:19:56 1.7
  +++ JspParseEventListener.java2000/10/27 21:23:33 1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.7 2000/10/23 21:19:56 pierred Exp $
  - * $Revision: 1.7 $
  - * $Date: 2000/10/23 21:19:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.8 2000/10/27 21:23:33 pierred Exp $
  + * $Revision: 1.8 $
  + * $Date: 2000/10/27 21:23:33 $
*
* 
*
  @@ -998,7 +998,7 @@
   while (enum.hasMoreElements()) {
   TagLibraryInfo tli = (TagLibraryInfo)enum.nextElement();
//@@@ remove cast when TagLibraryInfo is fixed in spec
  -String msg = ((TagLibraryInfoImpl)tli).validate(xo.getPageInfo());
  +String msg = ((TagLibraryInfoImpl)tli).validate(xo.getPageData());
   if (msg != null) {
   throw new JasperException(
Constants.getString(
  
  
  
  1.5   +7 -7  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TagLibraryInfoImpl.java   2000/10/05 16:48:01 1.4
  +++ TagLibraryInfoImpl.java   2000/10/27 21:23:34 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.4 2000/10/05 16:48:01 pierred Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/10/05 16:48:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.5 2000/10/27 21:23:34 pierred Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/10/27 21:23:34 $
*
* The Apache Software License, Version 1.1
*
  @@ -80,7 +80,7 @@
   import javax.servlet.jsp.tagext.TagAttributeInfo;
   import javax.servlet.jsp.tagext.TagExtraInfo;
   import javax.servlet.jsp.tagext.TagLibraryValidator;
  -import javax.servlet.jsp.tagext.PageInfo;
  +import javax.servlet.jsp.tagext.PageData;
   
   import org.w3c.dom.*;
   import org.xml.sax.*;
  @@ -412,7 +412,7 @@
   Class tlvClass = 
ctxt.getClassLoader().loadClass(validatorclass);
   tlv = (TagLibraryValidator) tlvClass.newInstance();
  -tlv.setTagLibraryInfo(this);
  +//@@@ removed in 1.2PFD tlv.setTagLibraryInfo(this);
   this.tagLibraryValidator = tlv;
   } catch (Exception ex) {
   Constants.message("jsp.warning.tlvclass.is.null",
  @@ -588,10 +588,10 @@
* @param thePage The JSP page object
* @return A string indicating whether the page is valid or not.
*/
  -public String validate(PageInfo thePage) {
  +public String validate(PageData thePage) {
TagLibraryValidator tlv = getTagLibraryValidator();
if (tlv == null) return null;
  - return tlv.validate(thePage);
  + return tlv.validate(getPrefixString(), getURI(), thePage);
   }
   
   protected TagLibraryValidator tagLibraryValidator; 
  
  
  
  1.4   +7 -7  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java
  
  Index: XmlOutputter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XmlOutputter.java 2000/10/11 19:35:19 1.3
  +++ XmlOutputter.java 2000/10/2

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties

2000-10-27 Thread pierred

pierred 00/10/27 20:20:23

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java Parser.java
ParserController.java
   jasper/src/share/org/apache/jasper/resources
messages.properties
  Log:
  Support for new JSP1.2 feature (new in PFD)
  "Added pageEncoding attribute to page directive"
  
  ParserController
  - Inspects the document for 'pageEncoding' and 'contentType' page
attributes to set the proper encoding of the page
  
  JspParseEventListener
  - Supports new 'pageEncoding' attribute in 'page' directive
  
  Parser
  - Added 'pageEncoding' as valid attribute for the page directive
  
  messages.properties
  - New error messages for page encoding
  
  Revision  ChangesPath
  1.9   +26 -6 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JspParseEventListener.java2000/10/27 21:23:33 1.8
  +++ JspParseEventListener.java2000/10/28 03:20:19 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.8 2000/10/27 21:23:33 pierred Exp $
  - * $Revision: 1.8 $
  - * $Date: 2000/10/27 21:23:33 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.9 2000/10/28 03:20:19 pierred Exp $
  + * $Revision: 1.9 $
  + * $Date: 2000/10/28 03:20:19 $
*
* 
*
  @@ -417,6 +417,7 @@
   static final String errorPageStr = "errorPage";
   static final String isErrorPageStr = "isErrorPage";
   static final String contentTypeStr = "contentType";
  +static final String pageEncodingStr = "pageEncoding";
   
   
   PageDirectiveHandlerInfo[] pdhis = new PageDirectiveHandlerInfo[] {
  @@ -430,6 +431,7 @@
   new PageDirectiveHandlerInfo(infoStr, new InfoHandler()),
   new PageDirectiveHandlerInfo(isErrorPageStr, new IsErrorPageHandler()),
   new PageDirectiveHandlerInfo(contentTypeStr, new ContentTypeHandler()),
  +new PageDirectiveHandlerInfo(pageEncodingStr, new PageEncodingHandler()),
   new PageDirectiveHandlerInfo(errorPageStr, new ErrorPageHandler())
   };
   
  @@ -453,6 +455,25 @@
   }
   }
   
  +static final class PageEncodingHandler implements PageDirectiveHandler {
  +public void handlePageDirectiveAttribute(JspParseEventListener listener,
  + String pageEncoding,
  + Mark start, Mark stop)
  +throws JasperException
  +{
  +if (pageEncoding == null)
  +throw new CompileException(start,
  +
Constants.getString("jsp.error.page.invalid.pageencoding"));
  + // We do nothing with pageEncoding.
  + // This is handled by the parser
  + // to set the encoding type on the reader before we even
  + // start parsing the page.
  + // No restriction on one such attribute per translation unit.
  + // We can have one per page.
  + // FIXME: we do not track multiple occurrences per page 
  +}
  +}
  +
   static final class SessionHandler implements PageDirectiveHandler {
   public void handlePageDirectiveAttribute(JspParseEventListener listener,
String session,
  @@ -744,9 +765,8 @@
   
Constants.getString("jsp.error.file.not.found",
   new Object[]{file}));
} catch (Exception ex) {
  - throw new CompileException(
  -start,
  -
Constants.getString("jsp.error.include.bad.file"));
  + throw new CompileException(start,
  +ex.getMessage());
}
}
xo.append("jsp:directive." + directive, attrs);
  
  
  
  1.5   +2 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
 

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler ForwardGenerator.java IncludeGenerator.java

2000-10-23 Thread pierred

pierred 00/10/23 17:38:00

  Modified:jasper/src/share/org/apache/jasper/compiler
ForwardGenerator.java IncludeGenerator.java
  Log:
  Bug fix: make sure params is not null before checking its size
  
  Revision  ChangesPath
  1.3   +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java
  
  Index: ForwardGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ForwardGenerator.java 2000/10/11 19:35:12 1.2
  +++ ForwardGenerator.java 2000/10/24 00:37:57 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v
 1.2 2000/10/11 19:35:12 shemnon Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/10/11 19:35:12 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v
 1.3 2000/10/24 00:37:57 pierred Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/10/24 00:37:57 $
*
* 
* 
  @@ -105,7 +105,7 @@
   writer.println("out.clear();");
writer.println("String _jspx_qfStr = \"\";");

  - if (params.size()  0) {
  + if (params != null  params.size()  0) {
Enumeration en = params.keys();
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
  
  
  
  1.5   +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/IncludeGenerator.java
  
  Index: IncludeGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IncludeGenerator.java 2000/10/11 19:35:14 1.4
  +++ IncludeGenerator.java 2000/10/24 00:37:58 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v
 1.4 2000/10/11 19:35:14 shemnon Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/10/11 19:35:14 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/IncludeGenerator.java,v
 1.5 2000/10/24 00:37:58 pierred Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/10/24 00:37:58 $
*
* 
* 
  @@ -132,7 +132,7 @@
if (flush) {
writer.println("out.flush();");
}
  - if (params.size()  0) {
  + if (params != null  params.size()  0) {
Enumeration en = params.keys();
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
  
  
  

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