What is expression in JSP?

By: Karthik Printer Friendly Format    

Answer: Expression tag is used to insert Java values directly into the output. Syntax for the Expression tag is: 
<%= expression %>
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. The following expression tag displays time on the output:
<%=new java.util.Date()%>

Ask a Question



Most Viewed Articles (in Interview )

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

Explain garbage collection?

Interview Question: What is deployment descriptor?

Can Entity Beans have no create() methods?

Explain the new Features of JDBC 2.0 Core API?

What types of comments are available in the JSP?

Interview Question: What is Struts?

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

Interview Question: What is ActionForm?

Interview Question: Is Struts compatible with other Java technologies?

Interview Question: Does Struts include its own unit tests?

Interview Question: If the framework doesn't do what I want, can I request that a feature be added?

Interview Question: Do ActionForms have to be true JavaBeans?

Interview Question: What is difference between EJB 1.1 and EJB 2.0?

Interview Question: What is the difference between sessioncontext and entitycontext?

Latest Articles (in Interview)

Comment on this tutorial