How to print result of a java expression in JSP?

The tag displays the result of an expression. This is almost similar to the way works. The difference here is that tag lets you use the simpler "." notation to access properties. For example, to access customer.address.street, use the tag  .

The tag can automatically escape XML tags so they aren't evaluated as actual tags.

Attribute

The tag has the following attributes −

Attribute Description Required Default
Value Information to output Yes None
default Fallback information to output No body
escapeXml True if the tag should escape special XML characters No true

Example


   
       <out> Tag Example</out>

   
   
      
   

The above code will generate the following result −

 , &
Updated on: 2019-07-30T22:30:25+05:30

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements