Question

I have a piece of code in my html which prints the output

<div> <c:out value="${cart.headline}"> Your page is here </c:out>

I know that in the above case, the value of cart.headline will be printed. But when will the content between c:out tags be printed or used.

Can someone please explain ?

Was it helpful?

Solution

The <c:out> tag displays the result of an expression, similar to the way <%= %> works with a difference that <c:out> tag lets you use the simpler "." notation to access properties. For example, to access cart.headline just use tag is <c:out value="cart.headline"/>.

The <c:out> tag can automatically escape XML tags so they aren't evaluated as actual tags.

something useful here.

Hope this helps!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top