Tuesday, August 21, 2012

Problem using c:set of jstl

The problem was that i was not able to set the value of a variable defined in a scriptlet.
<c:set var="test" value="yogesh"/>

Root cause: The tag lib i was using was perhaps of an older version.

Older version:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

Newer version:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/jsp/core" %>

Please do post more information if you have more knowledge about this problem.