<?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>Shaun Abram &#187; j2ee</title>
	<atom:link href="http://www.shaunabram.com/tag/j2ee/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shaunabram.com</link>
	<description>Java and Technology weblog</description>
	<lastBuildDate>Wed, 18 Jan 2012 00:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>JSP EL statements not being evaluated</title>
		<link>http://www.shaunabram.com/jsp-el-not-evaluated/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jsp-el-not-evaluated</link>
		<comments>http://www.shaunabram.com/jsp-el-not-evaluated/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 21:38:38 +0000</pubDate>
		<dc:creator>sabram</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[el]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[jstl]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=1347</guid>
		<description><![CDATA[On several occasions I have had problems with EL (Expression Language) statements not being evaluated. As an example, you add a statement to a JSP like $(2+2), expecting the JSP to simply display 4, when it in fact displays the raw statement, i.e. $(2+2). After digging around the web, I found a number of points [...]]]></description>
			<content:encoded><![CDATA[<p>On several occasions I have had problems with EL (Expression Language) statements not being evaluated.<br />
As an example, you add a statement to a JSP like<br />
$(2+2), expecting the JSP to simply display 4, when it in fact displays the raw statement, i.e. $(2+2).</p>
<p>After digging around the web, I found a number of points to check&#8230;</p>
<p><span id="more-1347"></span> </p>
<ul>
<li>Check you application server supports JSP 2.0 or above (Tomcat 5.0 and higher does)</li>
<li>Check your web.xml descriptor file is using at least version 2.4 of the Servlet deployment descriptor (I have been using 2.5). If it is using Servlet 2.3 spec or earlier, EL will be disabled by default.</li>
<li>Even if you are using version 2.5 of the Servlet deployment descriptor, make sure that the schemaLocation is correct. For example, I copied this from somewhere on the web and it failed to work:
<pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/<strong>j2ee</strong>
            http://java.sun.com/xml/ns/<strong>j2ee</strong>/web-app_2_5.xsd"
         Version="2.5"&gt;</code></pre>
<p>I then found this version, which does work correctly. Note the subtle difference in the schema location of j2ee vs javaee.</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
         &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/<strong>javaee</strong>
             http://java.sun.com/xml/ns/<strong>javaee</strong>/web-app_2_5.xsd"
         version="2.5"&gt;  </code></pre>
<p>I found the above <a href="http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/web_xml.html">here</a> at Oracle.</p>
<li>As a last resort, you can use <code>&lt;%@ page isELIgnored="false" %&gt;</code> in your JSP, but having to do this is usually a sign that something else may be wrong (as described above).</li>
</ul>
<p>Related posts:</p>
<ul>
<li><a href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">XML Schema for the Servlet 2.5 deployment descriptor</a>[java.sun.com]</li>
<li><a href="http://download.oracle.com/javaee/5/tutorial/doc/bnahq.html">Java EE 5 &#8211; Unified Expression Language</a>[oracle.com]</li>
<li><a href="http://www.coderanch.com/how-to/java/ElOrJstlNotWorkingAsExpected">JSP, JSTL, Servlet and Tomcat version matching</a>[coderanch.com]</li>
<li>Stack Overflow related problem postings:</li>
<ul>
<li><a href="http://stackoverflow.com/questions/504071/el-in-a-jsp-stopped-evaluating">EL in a JSP stopped evaluating</a>[stackoverflow.com]</li>
<li><a href="http://stackoverflow.com/questions/793983/jsp-el-expression-is-not-evaluated">JSP: EL expression is not evaluated</a>[stackoverflow.com]</li>
<li><a href="http://stackoverflow.com/questions/472500/javascript-string-replace-str-works-weirdly-in-jsp-file/472573#472573">Javascript String.replace works weirdly in jsp file</a>[stackoverflow.com]</li>
</ul>
</ul>
<ul>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/jsp-el-not-evaluated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JEE</title>
		<link>http://www.shaunabram.com/jee/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jee</link>
		<comments>http://www.shaunabram.com/jee/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 21:05:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[jee]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=14</guid>
		<description><![CDATA[So what exactly is Java Enterprise Edition? Although I am a Sun Certified Enterprise Architect, and have worked with much of the J2EE family, I thought that with all the recent changes introduced in the latest version, JEE 5, it was worth writing a short article giving an overview of JEE to remind me of [...]]]></description>
			<content:encoded><![CDATA[<p>So what exactly is Java Enterprise Edition?</p>
<p>Although I am a Sun Certified Enterprise Architect, and have worked with much of the J2EE family, I thought that with all the recent changes introduced in the latest version, JEE 5, it was worth writing a short article giving an overview of JEE to remind me of where it all stands.</p>
<p>See <a title="JEE" href="http://www.shaunabram.com/?page_id=15">JEE</a>.</p>
<p>Update: I just saw <a href="http://www.theserverside.com/news/thread.tss?thread_id=50291">this posting</a> on TheServerSide related to the upcoming JEE 6 release&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/jee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

