View RSS Feed


Expressions in JSP

Rate this Entry
, 07-07-2012 at 08:09 PM (1582 Views)
The expression elements are supported by the JSP Page which:

Are based on scripting language
These expressions are evaluated.
These expressions are coverted to a String format
These are replaced with the expression elements in the JSP Page.

The expression elements in a JSP page are finally converted to a string so you can use it anywhere in your JSP Page. These expression elements must be valid and follow the Java Language. There is only one restriction that you can terminate a line with seimicolon as we usually do in a Java statement.

Following is an example of your JSP Expression Element:
Java Code:
<%= your expression %>
Also you can write the above expression element in following XML supported format:
Java Code:
	Your expression
The below code represents and example of JSP Expression.
Java Code:
   Date: <%= (new java.util.Date()).toLocaleString()%>

Submit "Expressions in JSP" to Facebook Submit "Expressions in JSP" to Digg Submit "Expressions in JSP" to Submit "Expressions in JSP" to StumbleUpon Submit "Expressions in JSP" to Google