Question: What is an Expression tag in JSP?

By: Guru Singh Printer Friendly Format    

Question: What is an Expression tag in JSP?

Answer: An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. Because the value of an expression is converted to a String, you can use an expression within text in a JSP file. 

<%= someexpression %>

<%= (new java.util.Date()).toLocaleString() %>

You cannot use a semicolon to end an expression





Ask a Question

Most Viewed Articles (in Interview )

What is similarities/difference between an Abstract class and Interface?

Explain the Polymorphism principle.

What is JSP Scriptlet?

What is the difference between Session Bean and Entity Bean?

What is the difference between JTS and JTA?

Interview Question: How is the MVC design pattern used in Struts framework?

Interview Question: What is Action Class?

Interview Question: Why are some of the class and element names counter-intuitive?

Interview Question: What is EJB container?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Question: What is the directory structure of a web application?

Why J2EE is suitable for the development distributed multi-tiered enterprise applications?

Is Iterator a Class or Interface? What is its use?

What is the difference between jsp:include page and @ include file?

What types of comments are available in the JSP?

Latest Articles (in Interview)

Comment on this tutorial