tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_fr.properties messages_ja.properties
Date Mon, 13 Jan 2003 23:50:48 GMT
kinman      2003/01/13 15:50:48

  Modified:    jasper2/src/share/org/apache/jasper/compiler Parser.java
               jasper2/src/share/org/apache/jasper/resources
                        messages.properties messages_es.properties
                        messages_fr.properties messages_ja.properties
  Log:
  - Fix 15851, 16027, and 1600: output appropiate message when a jsp:attribute
    or jsp:body is nested in another jsp:attribute or jsp:body.
  
  Revision  Changes    Path
  1.56      +14 -9     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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- Parser.java	11 Jan 2003 00:51:36 -0000	1.55
  +++ Parser.java	13 Jan 2003 23:50:48 -0000	1.56
  @@ -1568,10 +1568,6 @@
               err.jspError( reader.mark(), "jsp.error.not.in.template",
   		"Expression language" );
           } else if (reader.matches("<jsp:")) {
  -            if ((parent instanceof Node.NamedAttribute) &&
  -                    reader.matches("attribute")) {
  -                err.jspError(reader.mark(), "jsp.error.nested.jspattribute");
  -            }
               err.jspError( reader.mark(), "jsp.error.not.in.template",
   		"Standard actions" );
   	} else if (parseCustomTag(parent)) {
  @@ -1651,6 +1647,16 @@
                       return;
                   }
                   
  +                // Check for nested jsp:body or jsp:attribute
  +                if (tag.equals("jsp:body") || tag.equals("jsp:attribute")) {
  +                    if (reader.matches("<jsp:attribute")) {
  +                        err.jspError(reader.mark(), "jsp.error.nested.jspattribute");
  +                    }
  +                    else if (reader.matches("<jsp:body")) {
  +                        err.jspError(reader.mark(), "jsp.error.nested.jspbody");
  +                    }
  +                }
  +
                   if( bodyType.equalsIgnoreCase( TagInfo.BODY_CONTENT_JSP ) ) {
                       parseElements( parent );
                   }
  @@ -1696,8 +1702,7 @@
                       reader.skipSpaces();
                   }
                   parseBody(namedAttributeNode, "jsp:attribute", 
  -			  getAttributeBodyType(parent,
  -					       attrs.getValue("name")));
  +			  TagInfo.BODY_CONTENT_JSP);
                   if (namedAttributeNode.isTrim()) {
                       Node.Nodes subElems = namedAttributeNode.getBody();
   		    if (subElems != null) {
  
  
  
  1.79      +2 -1      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.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- messages.properties	11 Jan 2003 00:11:06 -0000	1.78
  +++ messages.properties	13 Jan 2003 23:50:48 -0000	1.79
  @@ -351,3 +351,4 @@
   jsp.error.plugin.wrongRootElement=Name of root element in {0} different from {1}
   jsp.error.attribute.invalidPrefix=The attribute prefix {0} does not correspond to any imported
tag library
   jsp.error.nested.jspattribute=a jsp:attribute standard action cannot be nested within another
jsp:attribute standard action
  +jsp.error.nested.jspbody=a jsp:body standard action cannot be nested within another jsp:body
or jsp:attribute standard action
  
  
  
  1.28      +2 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties
  
  Index: messages_es.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- messages_es.properties	11 Jan 2003 00:11:06 -0000	1.27
  +++ messages_es.properties	13 Jan 2003 23:50:48 -0000	1.28
  @@ -259,3 +259,4 @@
   jsp.error.xml.invalidHighSurrogate=
   jsp.error.attributes.not.allowed=
   jsp.error.nested.jspattribute=
  +jsp.error.nested.jspbody=
  
  
  
  1.11      +2 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties
  
  Index: messages_fr.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- messages_fr.properties	11 Jan 2003 00:11:06 -0000	1.10
  +++ messages_fr.properties	13 Jan 2003 23:50:48 -0000	1.11
  @@ -298,3 +298,4 @@
   jsp.error.useBean.noSession=Il est illégal pour useBean d''utiliser une portée de session
(session scope) quand la page JSP indique (via la directive de page) qu''elle ne participe
pas aux sessions
   jsp.error.attributes.not.allowed = {0} ne doit avoir aucun attribut
   jsp.error.nested.jspattribute=
  +jsp.error.nested.jspbody=
  
  
  
  1.28      +2 -1      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties
  
  Index: messages_ja.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_ja.properties,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- messages_ja.properties	11 Jan 2003 00:11:06 -0000	1.27
  +++ messages_ja.properties	13 Jan 2003 23:50:48 -0000	1.28
  @@ -290,3 +290,4 @@
   jsp.error.xml.invalidHighSurrogate=
   jsp.error.attributes.not.allowed=
   jsp.error.nested.jspattribute=
  +jsp.error.nested.jspbody=
  
  
  

--
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