<!--
* @author Abhijeet Kulkarni
* @version 1.0
*
* Development Environment : Oracle9i JDeveloper
* Name of the Application : JSP XML Tutorial
* Creation/Modification History :
*
* Abhijeet Kulkarni 06-Jan-2003 Created
*
* Overview : This page is part of JSP XML tutorial. This page describes the
* features and sytax of jsp:declaration tag.
-->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
<p>
<span class="about">
<![CDATA[ <jsp:declaration> Tag
</span>
<br/>
<br/>
<span class="paragraph"> A declaration tag declares one or more variables or
methods that you can use in Java code later in the JSP page. You must declare
the variable or method before you use it in the JSP page. You can declare any
number of variables or methods within one declaration element, as long as you
end each declaration with a semicolon. The declaration must be valid in the
Java programming language.</span>
<br/>
<br/>
<span class="about">JSP 1.2 XML syntax</span> <br/>
<table width="100%">
<tr>
<td bgcolor="#EEEEEE">
<pre>
<![CDATA[
<jsp:declaration>
declaration; [ declaration; ]+ ...
</jsp:declaration>
</pre>
</td>
</tr>
</table>
<p/> <span class="about">Example using JSP 1.2 XML syntax</span> <br/>
<table width="100%">
<tr>
<td bgcolor="#EEEEEE">
<pre>
<![CDATA[
<jsp:declaration> int i = 0; </jsp:declaration>
<jsp:declaration> int a, b, c; </jsp:declaration>
<jsp:declaration> Circle a = new Circle(2.0); </jsp:declaration>
</pre>
</td>
</tr>
</table>
<br/>
<span class="about">Conventional JSP syntax</span>
<br/>
<table width="100%">
<tr>
<td bgcolor="#EEEEEE">
<pre>
<![CDATA[
<%! declaration; [ declaration; ]+ ... %>
</pre>
</td>
</tr>
</table>
<br/>
<span class="about">An example using conventional JSP syntax</span>
<br/>
<table width="100%">
<tr>
<td bgcolor="#EEEEEE">
<pre>
<![CDATA[
<%! int i = 0; %>
<%! int a, b, c; %>
<%! Circle a = new Circle(2.0); %>
</pre>
</td>
</tr>
</table>
</p>
</jsp:root>