Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
in JSTL 
 

One of the general purpose core library tag is . The main function of the this tag is to display the output to the user.

 

<c: out> in JSTL

                          

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 one attribute i.e. value. It is a must attribute in the tag. We are just calculating the multiplication of two numbers by using the <c: out> core action tag.

The code of the example is given below:

 

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<head>
<title>Simple Calculation by using c: out</title>
</head>
<body bgcolor="#FFFFCC">
<h1>Simple Calculation by using c: out</h1>

<%-- Multiplying the numbers 2 * 3 dynamically --%>
2 * 3 = <c:out value="${2 * 3}" />

</body>
</html>

The output of the program is given below:

Download this example.

 

                          

» View all related tutorials
Related Tags: c jsp ide variables script object io methods scope method variable print ip page tag ole instance int ria this

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.