How we use an expression in JSP?

Sharad Jaiswal
Sharad Jaiswal

Posted On: Feb 22, 2018

 

Expressions in the JSP can be used in the expression tag to be evaluated. The expression tag converts the expression into a value of a string object and inserts it into the implicit output object to be displayed in the client browser. The semicolon is also no need to signal the end of the statement in the expression tag.

Syntax

<%= expression %> 

Example

<%= "Expression Statement" %>  //no need for output statement as the expression tag converts the string into output object and the “Expression Statement” is displayed. 

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    JSP Interview Questions

    Explain What is JSP?

    JSP, expanded as Java Server Pages is a Java-based technology to create dynamic web pages. Released in 1999 by Sun Microsystems, JSP is based on technologies such as HTML, SOAP, XML, etc...

    JSP Interview Questions

    What is the el in JSP?

    The EL (Expression Language) in the JSP is used to access the data stored in the JavaBeans along with implicit objects like requests, sessions, etc...