expression Tag

You looked at two of the tag types available in the JSP specification. In order to use Java values or variables directly in the JSP, you can use the expression tag.

Structure of the expression Tag

The JSP expression tag can be written in either JSP tag format or XML format:

<%= expression %> 

or

<jsp:expression> 
// your java expression
</jsp:expression>

The Java code within the expression tag is converted into a java.lang.String since the data within the final generated HTML file is text data. JSP expression tags provide great flexibility in mixing HTML tags and values generated by Java code. The expression tag enables dynamic content to be mixed with static content, enabling the separation of the content from the look and feel ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.