title: JSF 2.0: Empty operator doesn't work with param
body: <p>In the file <code>aPage.xhtml</code>, I have the following lines:</p>
  
  <pre><code>&lt;ui:include rendered="#{not empty param.target}" src="#{param.target}.html" /&gt;
  &lt;ui:include rendered="#{empty param.target}" src="About.html" /&gt;
  </code></pre>
  
  <p>With the above lines, I expected that when I go to <code>http://localhost:8080/beta/aPage.xhtml</code>, the page <code>About.html</code> would be included since the <code>param.target</code> is <code>null</code>. However, GlassFish threw me the following exception: </p>
  
  <pre><code>java.io.FileNotFoundException: http://localhost:8080/beta/.html
  </code></pre>
  
  <p>Somehow, <code>param.target</code> was not considered to be <code>null</code>. </p>
  
  <p>Besides, I did try to use <code>==</code> and <code>!=</code> operators as following:</p>
  
  <pre><code>&lt;ui:include rendered="#{param.target != null}" src="#{param.target}.html" /&gt;
  &lt;ui:include rendered="#{param.target == null}" src="About.html" /&gt;
  </code></pre>
  
  <p>Interestingly, this time, on the console of GlassFish, I didn't see any exception thrown. However, on the browser, an error page still appears with the exception <code>java.io.FileNotFoundException</code>.</p>
  
  <p>I'd be very grateful if you could tell me why this happened and what I should do to avoid it.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Thanks to the hint from Joop Eggen, I finally solved the problem with the following  lines:</p>
  
  <pre><code>&lt;ui:param name="noTarget"  value="About.html" /&gt;
  &lt;ui:param name="hasTarget" value="#{param.target}.html" /&gt;
  &lt;ui:include src="#{empty param.target? noTarget : hasTarget}" /&gt;
  </code></pre>
  
  <p>Best regards</p>