luehe 2003/03/03 10:19:59 Modified: jasper2/src/share/org/apache/jasper/compiler Validator.java jasper2/src/share/org/apache/jasper/resources messages.properties Log: Fixed 17611: Translation error is not raised if an invalid value is provided to the version attribute of the jsp:root element Revision Changes Path 1.88 +7 -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.87 retrieving revision 1.88 diff -u -r1.87 -r1.88 --- Validator.java 1 Mar 2003 03:23:03 -0000 1.87 +++ Validator.java 3 Mar 2003 18:19:59 -0000 1.88 @@ -454,6 +454,10 @@ public void visit(Node.JspRoot n) throws JasperException { JspUtil.checkAttributes("Jsp:root", n, jspRootAttrs, err); + String version = n.getTextAttribute("version"); + if (!version.equals("1.2") && !version.equals("2.0")) { + err.jspError(n, "jsp.error.jsproot.version.invalid", version); + } visitBody(n); } 1.103 +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.102 retrieving revision 1.103 diff -u -r1.102 -r1.103 --- messages.properties 28 Feb 2003 00:12:41 -0000 1.102 +++ messages.properties 3 Mar 2003 18:19:59 -0000 1.103 @@ -371,3 +371,4 @@ jsp.error.coda.xml=The JSP document {0} has a coda ({1}) associated with it jsp.error.attribute.null_name=Null attribute name jsp.error.jsptext.badcontent=\'<\', when appears in the body of <jsp:text>, must be encapsulated within a CDATA +jsp.error.jsproot.version.invalid=Invalid version number: \"{0}\", must be \"1.2\" or \"2.0\"
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]