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

2005-01-11 Thread kinman
kinman  2005/01/11 14:14:55

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - Fix 29771: page encoding in a page directive inside a comment should be 
ignored.
  
  Revision  ChangesPath
  1.56  +19 -52
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- ParserController.java 23 Sep 2004 06:59:09 -  1.55
  +++ ParserController.java 11 Jan 2005 22:14:55 -  1.56
  @@ -401,40 +401,31 @@
   jspReader.reset(startMark);
   
/*
  -  * Determine page encoding from directive of the form %@ page % or
  -  * %@ tag %
  +  * Determine page encoding from directive of the form %@ page %,
  +  * %@ tag %, jsp:directive.page  or jsp:directive.tag .
 */
   while (true) {
  -Mark current = jspReader.mark();
  -
  -Mark beginDirective = jspReader.skipUntil(%@);
  -if (beginDirective == null) {
  +if (jspReader.skipUntil() == null) {
   break;
   }
  -// Move past the '%@' delimiter
  -Mark beginDirectiveBody = jspReader.mark();
  -
  -// Check to see if directive is nested inside comment
  -jspReader.reset(current);
  -Mark beginComment = jspReader.skipUntil(%--);
  -if (beginComment != null) {
  -Mark endComment = jspReader.skipUntil(--%);
  -if (endComment == null) {
  -err.jspError(beginComment, jsp.error.unterminated,
  - lt;%--);
  -}
  -  
  -if (beginDirective.isGreater(beginComment)
  - endComment.isGreater(beginDirective)) {
  -// Directive is nested inside comment, skip until end of 
  -// comment
  -jspReader.reset(endComment);
  -continue;
  +// If this is a comment, skip until its end
  +if (jspReader.matches(%--)) {
  +if (jspReader.skipUntil(--%) == null) {
  +// error will be caught in Parser
  +break;
   }
  +continue;
  +}
  +boolean isDirective = jspReader.matches(%@);
  +if (isDirective) {
  + jspReader.skipSpaces();
  +}
  +else {
  +isDirective = jspReader.matches(jsp:directive.);
  +}
  +if (!isDirective) {
  +continue;
   }
  -
  -jspReader.reset(beginDirectiveBody);
  - jspReader.skipSpaces();
   
// compare for tag , so we don't match taglib
if (jspReader.matches(tag ) || jspReader.matches(page)) {
  @@ -455,30 +446,6 @@
   if (encoding == null) {
   encoding = saveEncoding;
   }
  -
  - if (encoding == null) {
  - /*
  -  * Determine page encoding from page directive of the form
  -  * jsp:directive.page
  -  */
  - jspReader.reset(startMark);
  - while (jspReader.skipUntil(jsp:directive.page) != null) {
  - jspReader.skipSpaces();
  -Attributes attrs = Parser.parseAttributes(this, jspReader);
  -
  - encoding = getPageEncodingFromDirective(attrs, pageEncoding);
  -if (encoding != null) {
  -break;
  -}
  - encoding = getPageEncodingFromDirective(attrs, contentType);
  -if (encoding != null) {
  -saveEncoding = encoding;
  -}
  - }
  -if (encoding == null) {
  -encoding = saveEncoding;
  -}
  - }
   
return encoding;
   }
  
  
  

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



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

2004-11-28 Thread markt
markt   2004/11/28 13:59:29

  Modified:jasper2/src/share/org/apache/jasper/compiler Tag:
tomcat_4_branch ParserController.java
  Log:
  Fix bug 25899 - Encoding for included page is now correctly determined
when the included page contains a page import directive.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.4.2.6   +5 -7  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.4.2.5
  retrieving revision 1.4.2.6
  diff -u -r1.4.2.5 -r1.4.2.6
  --- ParserController.java 4 Oct 2004 20:10:14 -   1.4.2.5
  +++ ParserController.java 28 Nov 2004 21:59:29 -  1.4.2.6
  @@ -208,7 +208,8 @@
   }
   
   newEncoding = null;
  -
  +String pageEncoding = null;
  +
   // Figure out the encoding of the page
   // xml parser will take care of encoding for
   // page in XML syntax since we pass it a stream
  @@ -219,20 +220,17 @@
   if (jspReader.matches(page)) {
   jspReader.skipSpaces();
   Attributes attrs = Parser.parseAttributes(this, 
jspReader);
  -String attribute = pageEncoding;
  -newEncoding = attrs.getValue(pageEncoding);
  -if (newEncoding == null) {
  +pageEncoding = attrs.getValue(pageEncoding);
  +if (pageEncoding == null) {
   String contentType = attrs.getValue(contentType);
   if (contentType != null) {
   int loc = contentType.indexOf(charset=);
   if (loc != -1) {
   newEncoding = contentType.substring(loc+8);
  -return;
   }
   }
  -if (newEncoding == null)
  -newEncoding = ISO-8859-1;
   } else {
  +newEncoding = pageEncoding;
   return;
   }
   }
  
  
  

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



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

2004-08-10 Thread luehe
luehe   2004/08/10 16:16:09

  Modified:jasper2/src/share/org/apache/jasper/compiler Tag: TOMCAT_5_0
ParserController.java Mark.java
  Log:
  Ported fix for Bugzilla 29971 (Commented out page directive is parsed)
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.52.2.1  +34 -2 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.52
  retrieving revision 1.52.2.1
  diff -u -r1.52 -r1.52.2.1
  --- ParserController.java 17 Mar 2004 19:23:03 -  1.52
  +++ ParserController.java 10 Aug 2004 23:16:08 -  1.52.2.1
  @@ -407,13 +407,44 @@
String encoding = null;
   String saveEncoding = null;
   
  +jspReader.reset(startMark);
  +
/*
 * Determine page encoding from directive of the form %@ page % or
 * %@ tag %
 */
  - jspReader.reset(startMark);
  - while (jspReader.skipUntil(%@) != null) {
  +while (true) {
  +Mark current = jspReader.mark();
  +
  +Mark beginDirective = jspReader.skipUntil(%@);
  +if (beginDirective == null) {
  +break;
  +}
  +// Move past the '%@' delimiter
  +Mark beginDirectiveBody = jspReader.mark();
  +
  +// Check to see if directive is nested inside comment
  +jspReader.reset(current);
  +Mark beginComment = jspReader.skipUntil(%--);
  +if (beginComment != null) {
  +Mark endComment = jspReader.skipUntil(--%);
  +if (endComment == null) {
  +err.jspError(beginComment, jsp.error.unterminated,
  + lt;%--);
  +}
  +  
  +if (beginDirective.isGreater(beginComment)
  + endComment.isGreater(beginDirective)) {
  +// Directive is nested inside comment, skip until end of 
  +// comment
  +jspReader.reset(endComment);
  +continue;
  +}
  +}
  +
  +jspReader.reset(beginDirectiveBody);
jspReader.skipSpaces();
  +
// compare for tag , so we don't match taglib
if (jspReader.matches(tag ) || jspReader.matches(page)) {
   
  @@ -429,6 +460,7 @@
   }
}
}
  +
   if (encoding == null) {
   encoding = saveEncoding;
   }
  
  
  
  1.7.2.1   +16 -0 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Mark.java
  
  Index: Mark.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Mark.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- Mark.java 12 May 2004 17:45:37 -  1.7
  +++ Mark.java 10 Aug 2004 23:16:08 -  1.7.2.1
  @@ -227,6 +227,22 @@
return false;
   }
   
  +/**
  + * @return true if this Mark is greather than the codeother/code
  + * Mark, false otherwise.
  + */
  +public boolean isGreater(Mark other) {
  +
  +boolean greater = false;
  +
  +if (this.line  other.line) {
  +greater = true;
  +} else if (this.line == other.line  this.col  other.col) {
  +greater = true;
  +}
  +
  +return greater;
  +}
   
   /**
* Keep track of parser before parsing an included file.
  
  
  

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



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

2004-07-12 Thread luehe
luehe   2004/07/12 15:54:33

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java Mark.java
  Log:
  Fixed Bugzilla 29971 (Commented out page directive is parsed)
  
  Revision  ChangesPath
  1.53  +34 -2 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- ParserController.java 17 Mar 2004 19:23:03 -  1.52
  +++ ParserController.java 12 Jul 2004 22:54:33 -  1.53
  @@ -407,13 +407,44 @@
String encoding = null;
   String saveEncoding = null;
   
  +jspReader.reset(startMark);
  +
/*
 * Determine page encoding from directive of the form %@ page % or
 * %@ tag %
 */
  - jspReader.reset(startMark);
  - while (jspReader.skipUntil(%@) != null) {
  +while (true) {
  +Mark current = jspReader.mark();
  +
  +Mark beginDirective = jspReader.skipUntil(%@);
  +if (beginDirective == null) {
  +break;
  +}
  +// Move past the '%@' delimiter
  +Mark beginDirectiveBody = jspReader.mark();
  +
  +// Check to see if directive is nested inside comment
  +jspReader.reset(current);
  +Mark beginComment = jspReader.skipUntil(%--);
  +if (beginComment != null) {
  +Mark endComment = jspReader.skipUntil(--%);
  +if (endComment == null) {
  +err.jspError(beginComment, jsp.error.unterminated,
  + lt;%--);
  +}
  +  
  +if (beginDirective.isGreater(beginComment)
  + endComment.isGreater(beginDirective)) {
  +// Directive is nested inside comment, skip until end of 
  +// comment
  +jspReader.reset(endComment);
  +continue;
  +}
  +}
  +
  +jspReader.reset(beginDirectiveBody);
jspReader.skipSpaces();
  +
// compare for tag , so we don't match taglib
if (jspReader.matches(tag ) || jspReader.matches(page)) {
   
  @@ -429,6 +460,7 @@
   }
}
}
  +
   if (encoding == null) {
   encoding = saveEncoding;
   }
  
  
  
  1.8   +16 -0 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Mark.java
  
  Index: Mark.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Mark.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Mark.java 12 May 2004 17:45:37 -  1.7
  +++ Mark.java 12 Jul 2004 22:54:33 -  1.8
  @@ -227,6 +227,22 @@
return false;
   }
   
  +/**
  + * @return true if this Mark is greather than the codeother/code
  + * Mark, false otherwise.
  + */
  +public boolean isGreater(Mark other) {
  +
  +boolean greater = false;
  +
  +if (this.line  other.line) {
  +greater = true;
  +} else if (this.line == other.line  this.col  other.col) {
  +greater = true;
  +}
  +
  +return greater;
  +}
   
   /**
* Keep track of parser before parsing an included file.
  
  
  

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



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

2004-03-08 Thread luehe
luehe   2004/03/08 12:50:47

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  Fixed Bugzilla 27517 (The pageEncoding attribute is not used, when charset value is 
set.)
  
  Revision  ChangesPath
  1.51  +56 -23
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- ParserController.java 9 Feb 2004 23:12:57 -   1.50
  +++ ParserController.java 8 Mar 2004 20:50:47 -   1.51
  @@ -431,15 +431,19 @@
   }
   
   /*
  - * Determines page source encoding for page or tag file in JSP syntax
  + * Determines page source encoding for page or tag file in JSP syntax,
  + * by reading (in this order) the value of the 'pageEncoding' page
  + * directive attribute, or the charset value of the 'contentType' page
  + * directive attribute.
*
* @return The page encoding, or null if not found
*/
   private String getPageEncodingForJspSyntax(JspReader jspReader,
  -  Mark startMark)
  +Mark startMark)
throws JasperException {
   
String encoding = null;
  +String saveEncoding = null;
   
/*
 * Determine page encoding from directive of the form %@ page % or
  @@ -450,12 +454,22 @@
jspReader.skipSpaces();
// compare for tag , so we don't match taglib
if (jspReader.matches(tag ) || jspReader.matches(page)) {
  +
jspReader.skipSpaces();
  - encoding = getPageEncodingFromDirective(
  -Parser.parseAttributes(this, jspReader));
  - if (encoding != null) break;
  +Attributes attrs = Parser.parseAttributes(this, jspReader);
  + encoding = getPageEncodingFromDirective(attrs, pageEncoding);
  +if (encoding != null) {
  +break;
  +}
  + encoding = getPageEncodingFromDirective(attrs, contentType);
  +if (encoding != null) {
  +saveEncoding = encoding;
  +}
}
}
  +if (encoding == null) {
  +encoding = saveEncoding;
  +}
   
if (encoding == null) {
/*
  @@ -465,34 +479,53 @@
jspReader.reset(startMark);
while (jspReader.skipUntil(jsp:directive.page) != null) {
jspReader.skipSpaces();
  - encoding = getPageEncodingFromDirective(
  -Parser.parseAttributes(this, jspReader));
  - if (encoding != null) break;
  +Attributes attrs = Parser.parseAttributes(this, jspReader);
  +
  + encoding = getPageEncodingFromDirective(attrs, pageEncoding);
  +if (encoding != null) {
  +break;
  +}
  + encoding = getPageEncodingFromDirective(attrs, contentType);
  +if (encoding != null) {
  +saveEncoding = encoding;
  +}
}
  +if (encoding == null) {
  +encoding = saveEncoding;
  +}
}
   
return encoding;
   }
   
   /*
  - * Scans the given attributes for the 'pageEncoding' attribute, if present,
  - * or the 'contentType' attribute, and gets the page encoding from them.
  + * Scans the given attributes for the attribute with the given name,
  + * which is either 'pageEncoding' or 'contentType', and returns the
  + * specified page encoding.
  + *
  + * In the case of 'contentType', the page encoding is taken from the
  + * content type's 'charset' component.
*
  - * In the case of the 'contentType' attribute, the page encoding is taken
  - * from its 'charset' component.
  + * @param attrs The page directive attributes
  + * @param attrName The name of the attribute to search for (either
  + * 'pageEncoding' or 'contentType')
*
  - * @param attrs The attributes from which to determine the page encoding
  - * @return The page encoding
  + * @return The page encoding, or null
*/
  -private String getPageEncodingFromDirective(Attributes attrs) {
  - String encoding = attrs.getValue(pageEncoding);
  - if (encoding == null) {
  - String contentType = attrs.getValue(contentType);
  - if (contentType != null) {
  - int loc = contentType.indexOf(CHARSET);
  - if (loc != -1) {
  - 

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

2004-02-09 Thread kinman
kinman  2004/02/09 15:12:57

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - Fix bugzilla 26796: %@ include % fails when tag files are referenced in
a tag directives.
  
  Revision  ChangesPath
  1.50  +20 -15
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- ParserController.java 3 Jan 2004 12:12:21 -   1.49
  +++ ParserController.java 9 Feb 2004 23:12:57 -   1.50
  @@ -134,8 +134,9 @@
// (using an include directive), ctxt.getTagFileJar() returns the 
// JAR file from which to read the tag file or included resource,
// respectively.
  - return parse(inFileName, null, ctxt.isTagFile(), false,
  - ctxt.getTagFileJarUrl());
  +isTagFile = ctxt.isTagFile();
  +directiveOnly = false;
  +return doParse(inFileName, null, ctxt.getTagFileJarUrl());
   }
   
   /**
  @@ -149,8 +150,9 @@
   public Node.Nodes parse(String inFileName, Node parent,
URL jarFileUrl)
throws FileNotFoundException, JasperException, IOException {
  -// For files statically included, keep isTagfile and directiveOnly
  - return parse(inFileName, parent, isTagFile, directiveOnly, jarFileUrl);
  +// For files that are statically included, isTagfile and directiveOnly
  +// remain unchanged.
  +return doParse(inFileName, parent, jarFileUrl);
   }
   
   /**
  @@ -163,8 +165,15 @@
*/
   public Node.Nodes parseTagFileDirectives(String inFileName)
throws FileNotFoundException, JasperException, IOException {
  - return parse(inFileName, null, true, true,
  -  (URL) ctxt.getTagFileJarUrls().get(inFileName));
  +boolean isTagFileSave = isTagFile;
  +boolean directiveOnlySave = directiveOnly;
  +isTagFile = true;
  +directiveOnly = true;
  +Node.Nodes page = doParse(inFileName, null,
  + (URL) ctxt.getTagFileJarUrls().get(inFileName));
  +directiveOnly = directiveOnlySave;
  +isTagFile = isTagFileSave;
  +return page;
   }
   
   /**
  @@ -181,18 +190,14 @@
* @param jarFile The JAR file from which to read the JSP page or tag file,
* or null if the JSP page or tag file is to be read from the filesystem
*/
  -private Node.Nodes parse(String inFileName,
  -  Node parent,
  -  boolean isTagFile,
  -  boolean directivesOnly,
  -  URL jarFileUrl)
  +private Node.Nodes doParse(String inFileName,
  +   Node parent,
  +   URL jarFileUrl)
throws FileNotFoundException, JasperException, IOException {
   
Node.Nodes parsedPage = null;
isEncodingSpecifiedInProlog = false;
isDefaultPageEncoding = false;
  -this.isTagFile = isTagFile;
  -this.directiveOnly = directivesOnly;
   
JarFile jarFile = getJarFile(jarFileUrl);
String absFileName = resolveFileName(inFileName);
  @@ -229,7 +234,7 @@
try {
parsedPage = JspDocumentParser.parse(this, absFileName,
 jarFile, parent,
  -  isTagFile, directivesOnly,
  +  isTagFile, directiveOnly,
 sourceEnc,
 jspConfigPageEnc,
 isEncodingSpecifiedInProlog);
  @@ -251,7 +256,7 @@
sourceEnc, inStreamReader,
err);
   parsedPage = Parser.parse(this, jspReader, parent, isTagFile,
  -   directivesOnly, jarFileUrl,
  +   directiveOnly, jarFileUrl,
  sourceEnc, jspConfigPageEnc,
  isDefaultPageEncoding);
   } finally {
  
  
  

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



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

2004-01-03 Thread markt
markt   2004/01/03 04:12:21

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - Small typo in previous commit highlighted by Eclipse. The previous version of this 
line had no effect.
  
  Revision  ChangesPath
  1.49  +1 -1  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- ParserController.java 4 Dec 2003 22:57:45 -   1.48
  +++ ParserController.java 3 Jan 2004 12:12:21 -   1.49
  @@ -192,7 +192,7 @@
isEncodingSpecifiedInProlog = false;
isDefaultPageEncoding = false;
   this.isTagFile = isTagFile;
  -this.directiveOnly = directiveOnly;
  +this.directiveOnly = directivesOnly;
   
JarFile jarFile = getJarFile(jarFileUrl);
String absFileName = resolveFileName(inFileName);
  
  
  

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



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

2003-12-04 Thread kinman
kinman  2003/12/04 14:57:45

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - When a tag file include a file, make sure the included file environment
maintains the isTag and directiveOnly properties.
  
  Revision  ChangesPath
  1.48  +8 -2  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ParserController.java 1 Dec 2003 19:31:37 -   1.47
  +++ ParserController.java 4 Dec 2003 22:57:45 -   1.48
  @@ -103,6 +103,8 @@
   private String sourceEnc;
   
   private boolean isDefaultPageEncoding;
  +private boolean isTagFile;
  +private boolean directiveOnly;
   
   /*
* Constructor
  @@ -132,7 +134,8 @@
// (using an include directive), ctxt.getTagFileJar() returns the 
// JAR file from which to read the tag file or included resource,
// respectively.
  - return parse(inFileName, null, ctxt.getTagFileJarUrl());
  + return parse(inFileName, null, ctxt.isTagFile(), false,
  + ctxt.getTagFileJarUrl());
   }
   
   /**
  @@ -146,7 +149,8 @@
   public Node.Nodes parse(String inFileName, Node parent,
URL jarFileUrl)
throws FileNotFoundException, JasperException, IOException {
  - return parse(inFileName, parent, ctxt.isTagFile(), false, jarFileUrl);
  +// For files statically included, keep isTagfile and directiveOnly
  + return parse(inFileName, parent, isTagFile, directiveOnly, jarFileUrl);
   }
   
   /**
  @@ -187,6 +191,8 @@
Node.Nodes parsedPage = null;
isEncodingSpecifiedInProlog = false;
isDefaultPageEncoding = false;
  +this.isTagFile = isTagFile;
  +this.directiveOnly = directiveOnly;
   
JarFile jarFile = getJarFile(jarFileUrl);
String absFileName = resolveFileName(inFileName);
  
  
  

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



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

2003-12-01 Thread kinman
kinman  2003/12/01 11:31:37

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  -Avoid using deprecated method.
  
  Revision  ChangesPath
  1.47  +2 -2  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- ParserController.java 2 Sep 2003 21:39:59 -   1.46
  +++ ParserController.java 1 Dec 2003 19:31:37 -   1.47
  @@ -551,13 +551,13 @@
}
index += xmlnsDecl.length();
while (index  root.length()
  - Character.isSpace(root.charAt(index))) {
  + Character.isWhitespace(root.charAt(index))) {
index++;
}
if (index  root.length()  root.charAt(index) == '=') {
index++;
while (index  root.length()
  - Character.isSpace(root.charAt(index))) {
  + Character.isWhitespace(root.charAt(index))) {
index++;
}
if (index  root.length()  root.charAt(index++) == ''
  
  
  

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



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

2003-08-06 Thread luehe
luehe   2003/08/05 14:17:48

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  Removed unused constant
  
  Revision  ChangesPath
  1.44  +0 -6  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- ParserController.java 28 Jul 2003 18:47:30 -  1.43
  +++ ParserController.java 5 Aug 2003 21:17:48 -   1.44
  @@ -95,12 +95,6 @@
*/
   private Stack baseDirStack = new Stack();
   
  -/*
  - * Static information used in the process of figuring out
  - * the kind of document we're dealing with.
  - */
  -private static final String JSP_ROOT_TAG = jsp:root;
  -
   private boolean isEncodingSpecifiedInProlog;
   
   private String sourceEnc;
  
  
  

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



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

2003-04-01 Thread luehe
luehe   2003/04/01 19:45:08

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  A file included via the include directive is assumed to use the same
  syntax as the including file (that is, the standard and XML syntaxes
  cannot be mixed and matched)
  
  Revision  ChangesPath
  1.37  +40 -41
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ParserController.java 25 Mar 2003 00:57:46 -  1.36
  +++ ParserController.java 2 Apr 2003 03:45:08 -   1.37
  @@ -85,8 +85,7 @@
   private ErrorDispatcher err;
   
   /*
  - * Document information which tells us what
  - * kind of document we are dealing with.
  + * Indicates the syntax (XML or standard) of the file being processed
*/
   private boolean isXml;
   
  @@ -102,12 +101,6 @@
*/
   private static final String JSP_ROOT_TAG = jsp:root;
   
  -/*
  - * Tells if the file being processed is the top file in the translation
  - * unit.
  - */
  -private boolean isTopFile = true;
  -
   private boolean isEncodingSpecifiedInProlog;
   
   private String sourceEnc;
  @@ -167,7 +160,6 @@
*/
   public Node.Nodes parseTagFileDirectives(String inFileName)
throws FileNotFoundException, JasperException, IOException {
  - isTopFile = true;
return parse(inFileName, null, true, true,
 (JarFile) ctxt.getTagFileJars().get(inFileName));
   }
  @@ -200,7 +192,13 @@
   
// Figure out what type of JSP document and encoding type we are
// dealing with
  - determineSyntaxAndEncoding(absFileName, jarFile, jspConfigPageEnc);
  + determineSyntaxAndEncoding(absFileName, jarFile, jspConfigPageEnc,
  +parent);
  +
  + if (parent != null) {
  + // Included resource, add to dependent list
  + compiler.getPageInfo().addDependant(absFileName);
  + }
   
if (isXml  isEncodingSpecifiedInProlog) {
/*
  @@ -217,12 +215,6 @@
}
}
   
  - if (isTopFile) {
  - isTopFile = false;
  - } else {
  - compiler.getPageInfo().addDependant(absFileName);
  - }
  -
// Dispatch to the appropriate parser
if (isXml) {
// JSP document (XML syntax)
  @@ -291,31 +283,28 @@
   }
   
   /**
  - * Determines the properties of the given page or tag file.
  - * The properties to be determined are:
  - *
  - *   - Syntax (JSP or XML).
  - * This information is supplied by setting the 'isXml' instance
  - * variable.
  + * Determines the syntax (standard or XML) and page encoding properties
  + * for the given file, and stores them in the 'isXml' and 'sourceEnc'
  + * instance variables, respectively.
*
  - *   - Source Encoding.
  - * This information is supplied by setting the 'sourceEnc' instance
  - * variable.
  - *
  - * If these properties are already specified in the jsp-config element
  - * in web.xml, then they are used.
  + * The properties may already be specified in a JSP property group: notice
  + * that while the 'isXml' property applies to an entire translation unit
  + * (and therefore needs to be checked only for the top-level file), the
  + * 'page-encoding' property must be checked separately for the top-level
  + * and each of its included files, unless they're in XML syntax.
*/
   private void determineSyntaxAndEncoding(String absFileName,
JarFile jarFile,
  - String jspConfigPageEnc)
  + String jspConfigPageEnc,
  + Node parent)
throws JasperException, IOException {
   
isXml = false;
   
/*
  -  * 'true' if the syntax of the page (XML or standard) is identified by
  -  * external information: either via a JSP configuration element or
  -  * the .jspx suffix
  +  * 'true' if the syntax (XML or standard) of the file is given
  +  * from external information: either via a JSP configuration element,
  +  * the .jspx suffix, or the enclosing file (for included resources)
 */
boolean isExternal = false;
   
  @@ -325,13 +314,24 @@
 */
boolean revert = false;
   
  - if (pageInfo.isXmlConfigSpecified()) {
  - // If is-xml is specified in a jsp-property-group, it is used.
  - 

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

2003-02-19 Thread luehe
luehe   2003/02/19 11:01:02

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java PageInfo.java
  Log:
  Fixed NPE in encoding determination logic
  
  Revision  ChangesPath
  1.33  +9 -12 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- ParserController.java 12 Feb 2003 23:44:23 -  1.32
  +++ ParserController.java 19 Feb 2003 19:00:59 -  1.33
  @@ -222,7 +222,7 @@
compiler.getPageInfo().addDependant(absFileName);
}
   
  - // Dispatch to the proper parser
  + // Dispatch to the appropriate parser
if (isXml) {
// JSP document (XML syntax)
InputStream inStream = null;
  @@ -325,16 +325,14 @@
}

if (isExternal  !isXml) {
  - // JSP (standard) syntax
  - if (pageInfo.getConfigEncoding() != null) {
  - // Encoding specified in jsp-config (used by standard syntax
  - // only)
  - sourceEnc = pageInfo.getPageEncoding();
  + // JSP (standard) syntax. Use encoding specified in jsp-config
  + // if provided.
  + sourceEnc = pageInfo.getConfigEncoding();
  + if (sourceEnc != null) {
return;
  - } else {
  - // We don't know the encoding
  - sourceEnc = ISO-8859-1;
}
  + // We don't know the encoding
  + sourceEnc = ISO-8859-1;
} else {
// XML syntax or unknown, (auto)detect encoding ...
Object[] ret = XMLEncodingDetector.getEncoding(fname, jarFile,
  @@ -409,9 +407,8 @@
 * Determine the page encoding from the page directive, unless it's
 * specified via JSP config.
 */
  - if (pageInfo.getPageEncoding() != null) {
  - sourceEnc = pageInfo.getPageEncoding();
  - } else {
  + sourceEnc = pageInfo.getConfigEncoding();
  + if (sourceEnc == null) {
sourceEnc = getSourceEncodingForJspSyntax(jspReader, startMark);
}
   
  
  
  
  1.21  +11 -3 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/PageInfo.java
  
  Index: PageInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/PageInfo.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- PageInfo.java 13 Feb 2003 19:46:11 -  1.20
  +++ PageInfo.java 19 Feb 2003 19:00:59 -  1.21
  @@ -263,10 +263,18 @@
return this.isEncodingSpecifiedInProlog;
   }
   
  +/*
  + * Sets the encoding specified in the JSP config element whose URL pattern
  + * matches this page.
  + */
   public void setConfigEncoding(String enc) {
this.configEncoding = enc;
   }
   
  +/*
  + * Gets the encoding specified in the JSP config element whose URL pattern
  + * matches this page.
  + */
   public String getConfigEncoding() {
return this.configEncoding;
   }
  
  
  

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




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

2003-01-27 Thread luehe
luehe   2003/01/27 15:15:34

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java Validator.java
  Log:
  Treat UTF-16, UTF-16BE, and UTF-16LE as identical when comparing
  - the detected XML encoding of a JSP document
(as per section 4.3.3 of the XML specification),
  - the encoding specified in the 'pageEncoding' attribute of the page
directive of the JSP document, and
  - the encoding specified in a JSP configuration
element whose URL pattern matches the document.
  
  This fixes JSP 2.0 TCK test i18nXmlPageResponseEncodingTest.
  
  Revision  ChangesPath
  1.31  +5 -2  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ParserController.java 27 Jan 2003 18:10:47 -  1.30
  +++ ParserController.java 27 Jan 2003 23:15:33 -  1.31
  @@ -201,10 +201,13 @@
if (isTopFile) {
if (isXml) {
// Make sure the encoding determined from the XML prolog
  - // matches that in the JSP config element, if present
  + // matches that in the JSP config element, if present.
  + // Treat UTF-16, UTF-16BE, and UTF-16LE as identical.
String jspConfigPageEnc = pageInfo.getPageEncoding();
if (jspConfigPageEnc != null
  -  !jspConfigPageEnc.equals(sourceEnc)) {
  +  !jspConfigPageEnc.equals(sourceEnc)
  +  (!jspConfigPageEnc.startsWith(UTF-16)
  + || !sourceEnc.startsWith(UTF-16))) {
err.jspError(jsp.error.prolog_config_encoding_mismatch,
 sourceEnc, jspConfigPageEnc);
}
  
  
  
  1.70  +9 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java
  
  Index: Validator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Validator.java27 Jan 2003 18:10:47 -  1.69
  +++ Validator.java27 Jan 2003 23:15:34 -  1.70
  @@ -257,13 +257,18 @@
 * attribute of the page directive of the JSP page, and in
 * a JSP configuration element (whose URL pattern matches
 * the page).
  +  *
 * At this point, we've already verified (in 
 * ParserController.parse()) that the page character
 * encodings specified in a JSP config element and XML
 * prolog match.
  +  *
  +  * Treat UTF-16, UTF-16BE, and UTF-16LE as identical.
 */
String compareEnc = pageInfo.getPageEncoding();
  - if (!value.equals(compareEnc)) {
  + if (!value.equals(compareEnc) 
  +  (!value.startsWith(UTF-16)
  + || !compareEnc.startsWith(UTF-16))) {
if (pageInfo.isXml()) {
err.jspError(n,
 jsp.error.prolog_pagedir_encoding_mismatch,
  
  
  

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




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

2002-11-06 Thread luehe
luehe   2002/11/06 16:50:52

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  If autodetection yields UTF-8 as the source encoding, use ISO-8859-1
  in the absence of an XML prolog.
  
  Revision  ChangesPath
  1.25  +18 -0 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ParserController.java 6 Nov 2002 20:14:19 -   1.24
  +++ ParserController.java 7 Nov 2002 00:50:52 -   1.25
   -280,6 +280,24 
if (isEncodingSetInProlog) {
// Prolog present only in XML syntax
isXml = true;
  + } else if (sourceEnc.equals(UTF-8)) {
  + /*
  +  * We don't know if we're dealing with an XML document
  +  * unless isXml is true, but even if isXml is true, we don't
  +  * know if we're dealing with a JSP document that satisfies
  +  * the encoding auto-detection rules (the JSP document may not
  +  * have an XML prolog and start with jsp:root ...). 
  +  * We need to be careful, because the page may be encoded in
  +  * ISO-8859-1 (or something entirely different), and may
  +  * contain byte sequences that will cause a UTF-8 converter to
  +  * throw exceptions. 
  +  * It is safe to use a source encoding of ISO-8859-1 in this
  +  * case, as there are no invalid byte sequences in ISO-8859-1,
  +  * and the byte/character sequences we're looking for are
  +  * identical in either encoding (both UTF-8 and ISO-8859-1 are
  +  * extensions of ASCII).
  +  */
  + sourceEnc = ISO-8859-1;
}
}
   
  
  
  

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




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

2002-10-07 Thread luehe

luehe   2002/10/07 12:36:18

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  Improved error reporting for missing tag file in jar
  
  Revision  ChangesPath
  1.21  +22 -27
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ParserController.java 15 Sep 2002 23:12:30 -  1.20
  +++ ParserController.java 7 Oct 2002 19:36:18 -   1.21
  @@ -77,15 +77,10 @@
* @author Pierre Delisle
*/
   public class ParserController {
  -/*
  - * The compilation context
  - */
  -private JspCompilationContext ctxt;
   
  -/*
  - * The Compiler
  - */
  +private JspCompilationContext ctxt;
   private Compiler compiler;
  +private ErrorDispatcher err;
   
   /*
* A stack to keep track of the 'current base directory'
  @@ -124,12 +119,13 @@
   private String newEncoding;
   
   
  -//*
  -// Constructor
  -
  +/*
  + * Constructor
  + */
   public ParserController(JspCompilationContext ctxt, Compiler compiler) {
   this.ctxt = ctxt; // @@@ can we assert that ctxt is not null?
this.compiler = compiler;
  + this.err = compiler.getErrorDispatcher();
   }
   
   public JspCompilationContext getJspCompilationContext () {
  @@ -140,9 +136,6 @@
return compiler;
   }
   
  -//*
  -// Parse
  -
   /**
* Parses a jsp file.  This is invoked by the compiler.
*
  @@ -228,8 +221,7 @@
 isTagFile);
   } else {
JspReader r = new JspReader(ctxt, absFileName, encoding,
  - reader,
  - compiler.getErrorDispatcher());
  + reader, err);
   parsedPage = Parser.parse(this, r, parent, isTagFile,
  directivesOnly);
   }
  @@ -281,8 +273,7 @@
   
JspReader jspReader;
try {
  - jspReader = new JspReader(ctxt, file, encoding, reader,
  -   compiler.getErrorDispatcher());
  + jspReader = new JspReader(ctxt, file, encoding, reader, err);
} catch (FileNotFoundException ex) {
throw new JasperException(ex);
}
  @@ -362,28 +353,32 @@
   
   private InputStreamReader getReader(String file, String encoding,
JarFile jarFile)
  - throws FileNotFoundException, JasperException, IOException {
  + throws JasperException, IOException {
   
  -InputStream in;
  -InputStreamReader reader;
  +InputStream in = null;
  +InputStreamReader reader = null;
   
if (jarFile != null) {
  - ZipEntry jarEntry =
  - jarFile.getEntry(file.substring(1, file.length()));
  + String jarEntryName = file.substring(1, file.length());
  + ZipEntry jarEntry = jarFile.getEntry(jarEntryName);
  + if (jarEntry == null) {
  + err.jspError(jsp.error.file.not.found, file);
  + }
in = jarFile.getInputStream(jarEntry);
} else {
in = ctxt.getResourceAsStream(file);
}
  +
if (in == null) {
  - throw new FileNotFoundException(file);
  + err.jspError(jsp.error.file.not.found, file);
}
   
try {
  -return new InputStreamReader(in, encoding);
  +reader = new InputStreamReader(in, encoding);
} catch (UnsupportedEncodingException ex) {
  - throw new JasperException(
  -Constants.getString(jsp.error.unsupported.encoding,
  - new Object[]{encoding}));
  + err.jspError(jsp.error.unsupported.encoding, encoding);
}
  +
  + return reader;
   }
   }
  
  
  

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




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

2002-08-20 Thread kinman

kinman  2002/08/20 17:45:00

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - Minor treak to get isTagFile and Encoding right.
  
  Revision  ChangesPath
  1.14  +10 -12
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ParserController.java 20 Aug 2002 23:35:30 -  1.13
  +++ ParserController.java 21 Aug 2002 00:45:00 -  1.14
  @@ -236,6 +236,13 @@
  InputStreamReader reader)
 throws JasperException
   {
  + newEncoding = null;
  +
  + // FIXME: Actually we should know that we are compiling a tag file
  + // if we begin the compilation from either the tag file
  + // element in a tld OR tagdir attribute in a tag directive.
  +isTagFile = file.startsWith( /WEB-INF/tags ) ||
  +file.startsWith( /META-INF/tags );
   
PageInfo pageInfo = compiler.getPageInfo();
if (pageInfo.isXmlSpecified()) {
  @@ -244,7 +251,7 @@
if (pageInfo.getPageEncoding() != null) {
newEncoding = pageInfo.getPageEncoding();
}
  - if (pageInfo.isXmlSpecified()  pageInfo.getPageEncoding() != null)
  + if (pageInfo.isXmlSpecified()  newEncoding != null)
return;
   
JspReader jspReader;
  @@ -270,24 +277,15 @@
}
}
   
  - if (pageInfo.getPageEncoding() != null) {
  - // XXX isTagFile is not correctly set, but it will be determined
  - // elsewhere, and not here anyway.
  + if (newEncoding != null) {
  + // encoding specified in jsp-config
return;
}
   
  - newEncoding = null;
  - isTagFile = false;
  -
// Figure out the encoding of the page
// FIXME: We assume xml parser will take care of
   // encoding for page in XML syntax. Correct?
if (!isXml) {
  -// Note: this currently assumes there is no XML syntax for tag 
  -// files (as of PFD of the JSP 2.0 spec there is an XML view, 
  -// but no XML syntax).
  -isTagFile = file.startsWith( /WEB-INF/tags ) ||
  -file.startsWith( /META-INF/tags );
jspReader.reset(startMark);
while (jspReader.skipUntil(%@) != null) {
jspReader.skipSpaces();
  
  
  

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




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

2002-07-18 Thread kinman

kinman  2002/07/18 11:03:49

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - Fix 10896.  Patch by [EMAIL PROTECTED] (Shao Xiaotang)
  
  Revision  ChangesPath
  1.5   +0 -1  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParserController.java 7 Jun 2002 20:04:27 -   1.4
  +++ ParserController.java 18 Jul 2002 18:03:49 -  1.5
  @@ -250,7 +250,6 @@
while (jspReader.skipUntil(%@) != null) {
jspReader.skipSpaces();
if (jspReader.matches(page)) {
  - jspReader.advance(4);
jspReader.skipSpaces();
Attributes attrs = Parser.parseAttributes(this, jspReader);
String attribute = pageEncoding;
  
  
  

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




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

2002-07-18 Thread kinman

kinman  2002/07/18 11:04:24

  Modified:jasper2/src/share/org/apache/jasper/compiler Tag:
tomcat_4_branch ParserController.java
  Log:
  - Fix 10896.  Patch by [EMAIL PROTECTED] (Shao Xiaotang)
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +0 -1  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- ParserController.java 7 Jun 2002 20:04:27 -   1.4
  +++ ParserController.java 18 Jul 2002 18:04:24 -  1.4.2.1
  @@ -250,7 +250,6 @@
while (jspReader.skipUntil(%@) != null) {
jspReader.skipSpaces();
if (jspReader.matches(page)) {
  - jspReader.advance(4);
jspReader.skipSpaces();
Attributes attrs = Parser.parseAttributes(this, jspReader);
String attribute = pageEncoding;
  
  
  

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