One of the general purpose core library tag is <c: out>. The main function of the this tag is to display the output to the user. It works like expression tag in jsp <%= ---%>.
Attributes of the <c: out> core action tag.
In this example we have used only one attribute i.e. value. It is a must attribute in the tag. We are just calculating the multiplication of two numbers by using the <c: out> core action tag.
The code of the example is given below:
| <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <html> <head> <title>Simple Calculation by using c: out</title> </head> <body bgcolor="#FFFFCC"> <h1>Simple Calculation by using c: out</h1> <%-- Multiplying the numbers 2 * 3 dynamically --%> 2 * 3 = <c:out value="${2 * 3}" /> </body> </html> |
The output of the program is given below:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: in JSTL
Post your Comment