luehe       2002/12/09 14:17:32

  Modified:    jasper2/src/share/org/apache/jasper/compiler Parser.java
               jasper2/src/share/org/apache/jasper/resources
                        messages.properties messages_fr.properties
  Log:
  Fixed Bugzilla 15189: Error message provided when jsp:param element is
  not used properly is misleading
  
  Revision  Changes    Path
  1.43      +9 -7      
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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Parser.java       9 Dec 2002 21:51:56 -0000       1.42
  +++ Parser.java       9 Dec 2002 22:17:32 -0000       1.43
  @@ -1165,7 +1165,7 @@
        *                    | 'plugin'        StdActionContent
        *                    | 'element'       StdActionContent
        */
  -    private void parseAction(Node parent) throws JasperException {
  +    private void parseStandardAction(Node parent) throws JasperException {
        Mark start = reader.mark();
   
        if (reader.matches("include")) {
  @@ -1196,8 +1196,10 @@
            parsePlugin(parent);
        } else if (reader.matches("element")) {
            parseElement(parent);
  +     } else if (reader.matches("param")) {
  +         err.jspError(start, "jsp.error.param.invalidUse");
        } else {
  -         err.jspError(start, "jsp.error.badaction");
  +         err.jspError(start, "jsp.error.badStandardAction");
        }
       }
   
  @@ -1447,7 +1449,7 @@
           } else if (reader.matches("${")) {
               parseELExpression(parent);
        } else if (reader.matches("<jsp:")) {
  -         parseAction(parent);
  +         parseStandardAction(parent);
        } else if (!parseCustomTag(parent)) {
            parseTemplateText(parent);
        }
  @@ -1501,7 +1503,7 @@
        } else if (reader.matches("${")) {
            parseELExpression(parent);
        } else if (reader.matches("<jsp:")) {
  -         parseAction(parent);
  +         parseStandardAction(parent);
        } else if (!parseCustomTag(parent)) {
            parseTemplateText(parent);
        }
  
  
  
  1.65      +4 -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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- messages.properties       6 Dec 2002 19:11:53 -0000       1.64
  +++ messages.properties       9 Dec 2002 22:17:32 -0000       1.65
  @@ -103,6 +103,7 @@
   jsp.error.attempt_to_clear_flushed_buffer=Error: Attempt to clear a buffer that's 
already been flushed
   jsp.error.overflow=Error: JSP Buffer overflow
   jsp.error.paramexpected=Expected \"param\" tag with \"name\" and \"value\" 
attributes
  +jsp.error.param.invalidUse=The jsp:param action must not be used outside the 
jsp:include, jsp:forward, or jsp:params elements
   jsp.error.closeindividualparam=param tag needs to be closed with \"/>\"
   jsp.error.closeparams=param tag needs to be closed with /params
   jsp.error.plugin.notype=type not declared in jsp:plugin
  @@ -291,7 +292,7 @@
   jsp.error.could.not.add.taglibraries=Could not add tag one or more libraries.
   jsp.error.duplicate.name.jspattribute=The attribute {0} specified in the standard 
or custom action also appears as the value of the name attribute in the enclosed 
jsp:attribute
   jsp.error.not.in.template={0} not allowed in a template text body.
  -jsp.error.badaction=The action is not a recognizable standard action.
  +jsp.error.badStandardAction=The action is not a recognizable standard action.
   jsp.error.tagdirective.badbodycontent=Invalid body-content ({0}) in tag directive
   jsp.error.page.config_pagedir_encoding_conflict=Page-encoding specified in 
jsp-property-group ({0}) is different from that specified in page directive ({1})
   jsp.error.page.prolog_pagedir_encoding_conflict=Page-encoding specified in XML 
prolog ({0}) is different from that specified in page directive ({1})
  @@ -339,3 +340,4 @@
   jsp.error.tagfile.badSuffix=Missing \".tag\" suffix in tag file path {0}
   jsp.error.tagfile.illegalPath=Missing \"/WEB-INF/tags\" or \"/META-INF/tags\" in 
tag file path {0}
   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
  
  
  
  1.7       +2 -2      
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- messages_fr.properties    2 Dec 2002 11:21:00 -0000       1.6
  +++ messages_fr.properties    9 Dec 2002 22:17:32 -0000       1.7
  @@ -287,7 +287,7 @@
   jsp.error.could.not.add.taglibraries=Impossible d''ajouter une ou plusieurs 
librairies de tag.
   jsp.error.duplicate.name.jspattribute=L''attribut {0} indiqué dans l''action 
standard ou spécifique (custom) apparait aussi comme valeur de l''attribut de nom dans 
le jsp:attribute inclus
   jsp.error.not.in.template={0} n''est pas autorisé dans le corps de texte de 
template.
  -jsp.error.badaction=L''action n''est pas reconnue comme une action standard.
  +jsp.error.badStandardAction=L''action n''est pas reconnue comme une action standard.
   jsp.error.tagdirective.badbodycontent=Contenu de corps (body-content) ({0}) 
invalide dans la directive tag
   jsp.error.page.config_pagedir_encoding_conflict=L''encode de page (Page-encoding) 
indiqué dans le jsp-property-group ({0}) est différent de celui indiqué dans la 
directive de page ({1})
   jsp.error.page.prolog_pagedir_encoding_conflict=
  
  
  

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

Reply via email to