<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Source Allies Blog &#187; tomcat</title>
	<atom:link href="http://blogs.sourceallies.com/tag/tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.sourceallies.com</link>
	<description>Technical and process thinking from Source Allies employees</description>
	<lastBuildDate>Thu, 19 Aug 2010 18:35:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Strict Quote Escaping in Tomcat</title>
		<link>http://blogs.sourceallies.com/2009/10/strict-quote-escaping-in-tomcat/</link>
		<comments>http://blogs.sourceallies.com/2009/10/strict-quote-escaping-in-tomcat/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 18:05:54 +0000</pubDate>
		<dc:creator>Zach  Cox</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://blogs.sourceallies.com/?p=219</guid>
		<description><![CDATA[I just started here at Source Allies (loving it here so far, btw!) and inherited an aging code base to resurrect.  It was originally deployed on Tomcat 5 and one of the issues I encountered upgrading to Tomcat 6 was strict quote escaping.  The code base has lots of JSPs with elements like this:
&#60;some:tag title=&#8221;&#60;%=(String)request.getAttribute(&#8221;title&#8221;)%&#62;&#8221;&#62;
Apparently [...]]]></description>
			<content:encoded><![CDATA[<p>I just started here at Source Allies (loving it here so far, btw!) and inherited an aging code base to resurrect.  It was originally deployed on Tomcat 5 and one of the issues I encountered upgrading to Tomcat 6 was strict quote escaping.  The code base has lots of JSPs with elements like this:</p>
<p>&lt;some:tag title=&#8221;&lt;%=(String)request.getAttribute(&#8221;title&#8221;)%&gt;&#8221;&gt;</p>
<p>Apparently this used to fly under the radar up until Tomcat 5.5.26, but Tomcat 5.5.27+ <a href="http://old.nabble.com/TC-5.5.27-upgrade-JSP-tag-attribute-quoting-td19986031.html">enforces the quoting requirements of the JSP spec</a>.  Running this app with Tomcat 6 produced lots of exceptions like this one:</p>
<blockquote><p>javax.servlet.jsp.JspException: ServletException in &#8216;/WEB-INF/content/admin/editUser.jsp&#8217;: /WEB-INF/content/admin/editUser.jsp(6,23) Attribute value (String)request.getAttribute(&#8221;title&#8221;) is quoted with &#8221; which must be escaped when used within the value</p></blockquote>
<p>Now, we all know that double-quotes within double-quotes is a no-no and should be fixed by either using single quotes to enclose the attribute value:</p>
<p>&lt;some:tag title=&#8217;&lt;%=(String)request.getAttribute(&#8221;title&#8221;)%&gt;&#8217;&gt;</p>
<p>or by escaping the inner double-quotes:</p>
<p>&lt;some:tag title=&#8221;&lt;%=(String)request.getAttribute(\&#8221;title\&#8221;)%&gt;&#8221;&gt;</p>
<p>However in this case we just needed to get the app up &amp; running quickly so I found a quick, temporary workaround instead of fixing all of the improperly formatted quotes.  Setting org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false in $TOMCAT_HOME/conf/catalina.properties allows the double-quotes within double-quotes, and no more exceptions!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sourceallies.com/2009/10/strict-quote-escaping-in-tomcat/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
