title: How to use if, else condition in jsf to display image
body: <p>I have a condition where I have an enrollment form in which if userid is 0 it should show the dummy image and when I edit user from any update, I check for if userid which is not equal to 0 then display the image corresponding to userid.</p>
  
  <p>I used JSTL inside jsf page. But always it tries to go to else loop for showing image. The functionality is working fine. The only thing is I can't display the dummy image when I visit the page first. Here s my code.:</p>
  
  <pre><code>&lt;c:if test="${'#{user.userId}' == '0'}"&gt;
    &lt;a href="Images/thumb_02.jpg" target="_blank" &gt;&lt;/a&gt;
    &lt;img src="Images/thumb_02.jpg" /&gt;
  &lt;/c:if&gt;
  &lt;c:otherwise&gt;
    &lt;a href="/DisplayBlobExample?userId=#{user.userId}" target="_blank"&lt;/a&gt;
    &lt;img src="/DisplayBlobExample?userId=#{user.userId}" /&gt;
  &lt;/c:otherwise&gt;
  </code></pre>
  
  <p>Can I use this JSTL tag or can I do it using jsf? </p>