Out in JSP Core Tag Library

What is "out" tag in JSP Core Tag Library?


The out tag of the core tag library is used to display the result of an expression. This tag always converts the values into a string.


<c:out value=" " />

In the above syntax the "value" attribute stores the expression or a variable.

Example :

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<p>Simple Example for C:out</p>
Multiply 5 and 2::<c:out value="${5*2}" />
Result :

Simple Example for C:out
Multiply 5 and 2::10

In the above example we have used the "<c:out" tag to output the value of the expression to find the product of "5", "2".

Ask Questions

Ask Question