geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: Possible user code changes required when we upgrade to Tomcat 6.0.18
Date Mon, 18 Aug 2008 19:12:07 GMT
For the new spec compliant escape quoting behavior, users can enable the 
prior support in Tomcat by setting -
    org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

http://www.nabble.com/svn-commit%3A-r685823---in--tomcat%3A-container-tc5.5.x-webapps-docs-config-systemprops.xml-current-tc5.5.x-STATUS.txt-jasper-tc5.5.x-src-share-org-apache-jasper-compiler-Parser.java-jasper-tc5.5.x-src-share-org-apache-jasper-resources-LocalStrings.properties-tt18978132.html


-Donald


Donald Woods wrote:
> This is a notice to developers and users -
> 
> I've run into several JSP files in our build (mainly the monitor webapp) 
> that require code changes to work with Tomcat 6.0.18, due to tightened 
> code around the JSP 2.0 spec in Jasper during the Tomcat 6.0.17 release.
> 
> The build errors look something like -
> org.apache.jasper.JasperException: 
> file:/Users/drwoods/geronimo/server-trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp(168,168)

> Attribute value rs.getString("server_id") is quoted with " which must be 
> escaped when used within the value
>     at 
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)

> 
> 
> 
> There are several places in the portlet code where we have -
>      value="<%=rs.getString("server_id")%>"
> which had to be changed to
>      value='<%=rs.getString("server_id")%>'
> 
> 
> The full text of the Tomcat Jasper change can be found at -
> https://issues.apache.org/bugzilla/show_bug.cgi?id=45015
> with the basic explanation being -
> 
> According to JSP 2.0 specification (chapter 1.7 page 72,73)
> 
> This code is illegal:
> <mytags:tag value="<%= "hi!" %>" />
> 
> Instead the correct sentence would be:
> <mytags:tag value='<%= "hi!" %>' />
> <mytags:tag value="<%= \"hi!\" %>" />
> <mytags:tag value='<%= \"name\" %>' />
> ...
> 
> 
> -Donald

Mime
View raw message