scriptlets contain Java code. <c:set>
is not valid Java code. What <c:set>
does is
request.setAttribute("showPackstab", "display");
So this is the code you should have in your scriptlet.
But more importantly, you should not use scriptlets at all. Stick to the EL, the JSTL, and other custom tags. If the logic is too complex to be expressed using these, then it's a sign that it doesn't belong to the view (the JSP), but to the controller (a servlet or action written in Java, invoked before the JSP, which prepares the data for the JSP, and forwards to the JSP once the data is ready).
This is not the case here, since all of the above could be rewritten as:
<c:if test="${cookie.DisabledPackagesTab == 'true'}">
<b>Tab</b><img src="/tabImage.gif" align="left" />
</c:if>