luehe 2003/08/25 15:25:55 Modified: jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java jasper2/src/share/org/apache/jasper/resources messages.properties Log: Ensure that <jsp:root> is root element in JSP document Revision Changes Path 1.67 +9 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Index: JspDocumentParser.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- JspDocumentParser.java 21 Aug 2003 23:10:49 -0000 1.66 +++ JspDocumentParser.java 25 Aug 2003 22:25:54 -0000 1.67 @@ -605,7 +605,12 @@ Node node = null; if (localName.equals(ROOT_ACTION)) { - node = new Node.JspRoot(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, + if (!(current instanceof Node.Root)) { + throw new SAXParseException( + Localizer.getMessage("jsp.error.nested_jsproot"), + locator); + } + node = new Node.JspRoot(qName, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs, start, current); if (isTop) { pageInfo.setHasJspRoot(true); 1.132 +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.131 retrieving revision 1.132 diff -u -r1.131 -r1.132 --- messages.properties 15 Aug 2003 00:06:09 -0000 1.131 +++ messages.properties 25 Aug 2003 22:25:55 -0000 1.132 @@ -399,3 +399,4 @@ jsp.error.text.has_subelement=<jsp:text> must not have any subelements jsp.error.data.file.read=Error reading file \"{0}\" jsp.error.prefix.refined=Attempt to redefine the prefix {0} to {1}, when it was already defined as {2} in the current scope. +jsp.error.nested_jsproot=Nested <jsp:root>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]