JSTL request attribute in c:if

Posted by JNPW on Stack Overflow See other posts from Stack Overflow or by JNPW
Published on 2012-11-27T05:02:55Z Indexed on 2012/11/27 5:03 UTC
Read the original article Hit count: 107

Filed under:
|
|
|
|

I set an request attribute in my action class as follows:

request.setAttribute("xFg",Boolean.TRUE);

I want to retrive this in my JSP. I want to retrive them using JSTL tags. I tried this :

<c:if test="${requestScope.xFg}">
                                  <c:set var="showlist" value="true" />
                                </c:if>

But c:if didnt work, i mean it didnt goto c:set I tried to print the sameusing c:out but nothing got displayed. What is wrong or How should i test request attribute value. I havent used requestScope so far. Is requestScope the option to get the request value? pls help.Thanks in advance.

© Stack Overflow or respective owner

Related posts about java

Related posts about JavaScript