tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <tomcat-...@list-post.mks-mail.de>
Subject Re: svn commit: r656839 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jasper/compiler/Validator.java webapps/docs/changelog.xml
Date Fri, 16 May 2008 12:35:14 GMT
markt@apache.org wrote:

> Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
> URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=656839&r1=656838&r2=656839&view=diff
> ==============================================================================
> --- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java (original)
> +++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Thu May 15 14:08:47
2008
> @@ -323,11 +323,12 @@
>           * 
>           * @throws JasperException in case of page encoding mismatch
>           */
> -        private String comparePageEncodings(String pageDirEnc,
> +        private String comparePageEncodings(String thePageDirEnc,
>                  Node.PageDirective pageDir) throws JasperException {
>  
>              Node.Root root = pageDir.getRoot();
> -            String configEnc = root.getJspConfigPageEncoding();
> +            String configEnc = root.getJspConfigPageEncoding().toUpperCase();
> +            String pageDirEnc = thePageDirEnc.toUpperCase();
>  
>              /*
>               * Compare the 'pageEncoding' attribute of the page directive with
> @@ -355,7 +356,7 @@
>               * identical.
>               */
>              if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) ||
root.isBomPresent()) {
> -                String pageEnc = root.getPageEncoding();
> +                String pageEnc = root.getPageEncoding().toUpperCase();
>                  if (!pageDirEnc.equals(pageEnc)
>                          && (!pageDirEnc.startsWith("UTF-16") || !pageEnc
>                                  .startsWith("UTF-16"))) {

While a build yesterday - without this change - works fine, a build with
the above patch applied fails to compile JSPs for me:

> java.lang.NullPointerException
> 	at org.apache.jasper.compiler.Validator$DirectiveVisitor.comparePageEncodings(Validator.java:330)
> 	at org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:197)
> 	at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
> 	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
> 	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
> 	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
> 	at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
> 	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
> 	at org.apache.jasper.compiler.Validator.validate(Validator.java:1701)
> 	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
> 	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:183)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:619)

Regards
  mks

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message