attribute default

One of the general purpose core library tag is . The main function of the this tag is to display the output to the user. It works like expression tag in jsp <%= ---%>.


 
Ads

<c: out> attribute default

        

One of the general purpose core library tag is <c: out>. The main function of the this tag is to display the output to the user. It works like expression tag in jsp <%= ---%>. 

Attributes of the <c: out> core action tag. 

  1. value: It specify the expression which needs to be evaluated. 
  2. default: We can use this attribute if the resulting value is null.
  3. escapeXml: It checks whether there is any need to convert the &, <, > etc to their character encoding codes. 

In this example we have used only two attributes of <c: out>. First is attribute value which is a must attribute in the tag and the second one is default which is used if the resulting value is null. We are just printing the value of the default attribute on the browser.

The code of the example is given below:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Out Default Examples</title>
</head>

<body>default = 
<c:out value="${default}" default="Welcome to roseindia.net"/>
</body>
</html>

The output of the program is given below:

Download this example.

Advertisements

Share on Google+Share on Google+

attribute default

Posted on: April 3, 2006 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: attribute default  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads