Reputation: 231
I'm very inexperienced with JSP, and have come across a section of what I assume is JS (or some variant of it at least?) it goes as such:
<c:forEach items="${errorsMap}" var="messages" varStatus="status">
and another example of what I assume is a different function:
<c:set var="errorsArePresent" value="true" />
I assume that that the forEach one is to provide a loop through every element in a list (in this case errorsMap, and that 'set' sets a variable to the variable, what I am seeking clarification on is why these lines have c: in front of them? What does it mean?
If it helps, this script is contained in a JSP and is in amongst a container.
Upvotes: 0
Views: 409
Reputation: 233
It is JSTL Core tags(JSP Standard Tag Library). You can check documentation http://docs.oracle.com/javaee/5/tutorial/doc/bnakc.html
Upvotes: 1
Reputation: 7053
It is the prefix that has been used when including the JSTL Core library, likely something like this:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
...so when referencing functions from that library, you prefix it with the c:
to distinguish it from other potential function name conflicts.
See here
Upvotes: 1
Reputation: 48827
It's the JSTL core library (documentation).
Nothing to do with JavaScript, JSTL means "JavaServer Pages Standard Tag Library", i.e. a taglib extending the JSP specification (more info on Wikipedia).
Upvotes: 3