JSTL cout Core Tag

The JSTL <c:out> Core Tag is used to display the value of an expression to the client’s browser. It works the same as of <%= %> (expression tag) or out an implicit object or expression language but the difference is that it automatically escapes XML tags while others don’t escape XML tags.



<c:out value=”value/expression” />


c:out tag attributes:

Attribute Description Required
value Information to output Yes
default Fallback information to output No
escapeXml True if the tag should escape special XML characters No





<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <title>c:out JSTL core tag example</title>
    <c:out value="This is a c:out JSTL core tag example."/><br/>
    Sum of 10 and 20 = <c:out value="${10+20}"/><br/><br/>
    <c:out value="${'<h6>This is a <c:out> escape XML test </h6>'}"/>