title: jstl <c:if> tags not working in jsp file, getting error in tomcat 7
body: <p>I have problem using jstl tag <code>&lt;c:if&gt;</code> in jsp file. Basically I should make this as 2 questions although they are related.</p>
  
  <h3>The first question:</h3>
  
  <p>In my WEB-INF/lib, I put a jstl 1.2.jar</p>
  
  <p>In my jsp file, I put this <code>&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;</code>. </p>
  
  <p>In my jsp file, I use the <code>&lt;c:if&gt;</code> to do something. If the condition is true, it will shows some special message</p>
  
  <p>Basically the contents inside <code>&lt;c:if&gt;</code> is not working, because the message is not shown even the condition is true.</p>
  
  <p>But if I changed to use the older namespace, <code>&lt;%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%&gt;</code>. Others are not changed, then the if tag is working, because the message inside the if tag is shown.</p>
  
  <p>My first question is why I have to use /jstl instead of /jsp/jstl in namespace. I am using jstl1.2.jar. so I am supposed to use the newer uri for 1.2. however, older uri works but not newer uir. </p>
  
  <h3>The second question:</h3>
  
  <p>I ignore the first question I have, and just use /jstl as my namespace just because it makes my web app work the way I want. However, when I deploy my web app into tomcat 7.X, it shows exceptions as the following:</p>
  
  <blockquote>
    <p>org.apache.jasper.JasperException: /mywebapp.jsp (line: 35, column: 10)
    According to TLD or attribute directive in tag file, attribute test
    does not accept any expressions 
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)</p>
  </blockquote>
  
  <p>in /mywebapp.jsp line:35, column:10, that is &lt; c:if> tag.</p>
  
  <p>If I change the namespace from  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> to  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>, it can deploy in tomcat successfully but the functionality inside of &lt; c:if> tag is not useful. other codes outside of <code>&lt;c:if&gt;</code> tag work though.</p>
  
  <p>So I am very confused and really want to know how to fix this.</p>
  
  <p>By the way, I am using servlet 2.5, jsp 2.0, jstl 1.2. I did try to upgrade the jsp2.0 to jsp2.1 in order to see if I can fix the first problem, but I have no idea how to upgrade jsp version. </p>