title: Redirecting using jstl core Redirect
body: <p>I want user to be redirected if the value I am checking in <code>c:if</code> is evaluated to true. For redirecting, I am using <code>c:redirect url="url"</code>. But it is not redirecting me to the page. Here is the code:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;f:view&gt;
  &lt;c:if test="#{user.loggedIn}"&gt;
      #{user.loggedIn}
      &lt;c:redirect url="index.xhtml"&gt;&lt;/c:redirect&gt;
  &lt;/c:if&gt;
  
      Hello #{user.name}
  
      &lt;h:form&gt;
      &lt;h:commandButton value="Logout" action="#{user.logout}" /&gt;
      &lt;/h:form&gt;
  &lt;/f:view&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here, <code>h</code> represents JSF Html Taglib, <code>c</code> is JSTL core taglib, <code>f</code> is JSF core taglib.</p>