JSP 2.2 new configuration element <default-content-type> under <jsp-property-group> works incorrectly on tomcat-assembly server. ---------------------------------------------------------------------------------------------------------------------------------
Key: GERONIMO-5478 URL: https://issues.apache.org/jira/browse/GERONIMO-5478 Project: Geronimo Issue Type: Bug Security Level: public (Regular issues) Components: Tomcat Affects Versions: 3.0 Reporter: Guang Zhe Wang Fix For: 3.0 <default-content-type> is said to specify the default response contentType if the page directive does not include a contentType attribute in the JSP 2.2 spec documentation. So does it mean if the page directive have included a contentType attribute, the configuration in <default-content-type> will take no effect? In jetty-assembly, it does like this. But in tomcat-assembly, it sends out an exception: org.apache.jasper.JasperException: /defaultCtype/page1.jsp(17,1) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/xml, new: text/html) org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236) org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:133) org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) org.apache.jasper.compiler.Node$Root.accept(Node.java:475) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) org.apache.jasper.compiler.Validator.validateDirectives(Validator.java:1733) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195) org.apache.jasper.compiler.Compiler.compile(Compiler.java:360) org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:668) The test case -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.