Take the 2-minute tour ×

I am trying to check a request attribute in a jsp to show/hide certain html.

request.setAttribute("submitted", "true");


<c:if test="${submitted == 'false'}">
  // some html

But no matter what value I set in the attribute, the condition always evaluates to false. Is the attribute not visible inside the condition?


share|improve this question

1 Answer 1

up vote 3 down vote accepted

Try this instead:

request.setAttribute("submitted", true);

and in your JSP:

<c:if test="${submitted}">
    // some html
share|improve this answer

Your Answer


