Question: What is an Expression tag in JSP?

By: Guru Singh Viewed: 169 times  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. 

Like
<%= someexpression %>

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

You cannot use a semicolon to end an expression

 

 

 

 


Most Viewed Articles (in Interview )

What is the difference between JTS and JTA?

Interview Question: What is Action Class?

Interview Question: What is the difference between EAR, JAR and WAR file?

Tell me something about J2EE component?

What is Deployment Descriptor?

Explain garbage collection?

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

Interview Question: What is ActionForm?

Interview Question: What about JSTL and JavaServer Faces ?

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

Interview Question: What is the difference between ejbCreate() and ejbPostCreate?

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

What are the services provided by a container?

What is Collection API?

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

Latest Articles (in Interview)

Comment on this tutorial