luehe 2003/02/27 12:10:13 Modified: jasper2/src/share/org/apache/jasper/compiler Generator.java Log: Fixed 17492: If the omit-xml-declaration attribute of jsp:output is 'true' or 'yes' in the context of a JSP document, the xml declaration is still generated. Revision Changes Path 1.170 +8 -7 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.169 retrieving revision 1.170 diff -u -r1.169 -r1.170 --- Generator.java 26 Feb 2003 22:58:15 -0000 1.169 +++ Generator.java 27 Feb 2003 20:10:13 -0000 1.170 @@ -601,10 +601,11 @@ * - JSP document without a <jsp:root> */ private void generateXmlDeclaration(Node.Nodes page) { - if (pageInfo.getOmitXmlDecl() != null - && !JspUtil.booleanValue(pageInfo.getOmitXmlDecl()) - || (page.getRoot().isXmlSyntax() && !pageInfo.hasJspRoot() - && !ctxt.isTagFile())) { + + String omitXmlDecl = pageInfo.getOmitXmlDecl(); + if ((omitXmlDecl != null && !JspUtil.booleanValue(omitXmlDecl)) + || (omitXmlDecl == null && page.getRoot().isXmlSyntax() + && !pageInfo.hasJspRoot() && !ctxt.isTagFile())) { String cType = pageInfo.getContentType(); String charSet = cType.substring(cType.indexOf("charset=")+8); out.printil("out.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"" +
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]