tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties
Date Wed, 18 Dec 2002 17:37:51 GMT
luehe       2002/12/18 09:37:50

  Modified:    jasper2/src/share/org/apache/jasper/compiler Parser.java
                        Validator.java
               jasper2/src/share/org/apache/jasper/resources
                        messages.properties
  Log:
  Fixed 15411: A translation error does not occur if jsp:attribute is used to provide an attribute
value for an XML element that should be conisdered template text.
  
  Revision  Changes    Path
  1.51      +9 -8      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Parser.java	16 Dec 2002 23:02:39 -0000	1.50
  +++ Parser.java	18 Dec 2002 17:37:50 -0000	1.51
  @@ -1190,7 +1190,7 @@
   	} else if (reader.matches("element")) {
   	    parseElement(parent);
   	} else if (reader.matches("attribute")) {
  -	    err.jspError(start, "jsp.error.attribute.invalidUse");
  +	    err.jspError(start, "jsp.error.namedAttribute.invalidUse");
   	} else if (reader.matches("fallback")) {
   	    err.jspError(start, "jsp.error.fallback.invalidUse");
   	} else if (reader.matches("params")) {
  @@ -1317,12 +1317,13 @@
   	// Note except for the beginning of a page, the current char is '<'.
   	// Quoting in template text is handled here.
   	// JSP2.6 "A literal <% is quoted by <\%"
  +	String templateText = null;
   	if (reader.matches("<\\%")) {
  -	    String content = reader.nextContent();
  -	    new Node.TemplateText("<%" + content, start, parent);
  -	} else {
  -	    new Node.TemplateText(reader.nextContent(), start, parent);
  +	    templateText = "<%";
   	}
  +	String content = reader.nextContent();
  +	templateText = (templateText == null) ? content : templateText+content;
  +	new Node.TemplateText(templateText, start, parent);
       }
       
       /*
  
  
  
  1.63      +9 -3      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.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- Validator.java	16 Dec 2002 17:34:32 -0000	1.62
  +++ Validator.java	18 Dec 2002 17:37:50 -0000	1.63
  @@ -656,6 +656,12 @@
               }
           }
   
  +	public void visit(Node.UninterpretedTag n) throws JasperException {
  +            if (n.getNamedAttributeNodes() != null) {
  +		err.jspError(n, "jsp.error.namedAttribute.invalidUse");
  +            }
  +        }
  +
   	public void visit(Node.CustomTag n) throws JasperException {
   	    TagInfo tagInfo = n.getTagInfo();
   	    if (tagInfo == null) {
  
  
  
  1.75      +2 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- messages.properties	16 Dec 2002 22:21:16 -0000	1.74
  +++ messages.properties	18 Dec 2002 17:37:50 -0000	1.75
  @@ -106,7 +106,7 @@
   jsp.error.param.invalidUse=The jsp:param action must not be used outside the jsp:include,
jsp:forward, or jsp:params elements
   jsp.error.params.invalidUse=jsp:params must be a direct child of jsp:plugin
   jsp.error.fallback.invalidUse=jsp:fallback must be a direct child of jsp:plugin
  -jsp.error.attribute.invalidUse=jsp:attribute must be a sublement of a standard or custom
action
  +jsp.error.namedAttribute.invalidUse=jsp:attribute must be a sublement of a standard or
custom action
   jsp.error.closeindividualparam=param tag needs to be closed with \"/>\"
   jsp.error.closeparams=param tag needs to be closed with /params
   jsp.error.params.emptyBody=jsp:params must contain at least one nested jsp:param
  
  
  

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


Mime
View raw message