Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 82896 invoked from network); 30 Jul 2010 08:58:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 08:58:37 -0000 Received: (qmail 86816 invoked by uid 500); 30 Jul 2010 08:58:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 86417 invoked by uid 500); 30 Jul 2010 08:58:30 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 86408 invoked by uid 99); 30 Jul 2010 08:58:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 08:58:29 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 08:58:23 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OelPn-0004Bk-Dt for users@tomcat.apache.org; Fri, 30 Jul 2010 01:58:03 -0700 Message-ID: <29304084.post@talk.nabble.com> Date: Fri, 30 Jul 2010 01:58:03 -0700 (PDT) From: =?UTF-8?Q?LiuYan_=E5=88=98=E7=A0=94?= To: users@tomcat.apache.org Subject: Re: use of default-content-type In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: lovetide@21cn.com References: Just a guess, does page1.jsp include another page2.jsp and page2.jsp does not specify content-type(which will be default-content-type)? Ivan Xu wrote: > > Hi, if default-content-type is configured in the web.xml, and in the jsp > file, a differernt content-type is configured, then an exception below is > thrown. > From the description of the default-content-type, it should take effect > while no content-type is configured in the jsp file, and it should be > allowed to define a different content-type. > Any comment ? > > 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:314) > > 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:722) > > > -- > Ivan > > -- View this message in context: http://old.nabble.com/use-of-default-content-type-tp29303906p29304084.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org