This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
You shouldn't mix tags and scriptlets and expect them to work - they get executed at different stages in the JSP - to - HTML conversion. Instead, use the core JSTL <c:if > tag (see this documentation which may be out of date...) instead.