blob: a0cadb64ac03c93867cd8b27b9708be30eaba056 [file] [log] [blame]
<html><!-- #BeginTemplate "/Templates/ExamplesTemplate.dwt" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>JSTL: General-Purpose Tags Examples</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../global.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellpadding="5">
<tr>
<td height="0"><font color="#000099"><b>standard taglib &#149; implementation
of the JSP Standard Tag Library</b></font></td>
</tr>
<tr>
<td bgcolor="#CCCCFF"><font size="-1">Examples &nbsp;&nbsp;&nbsp;&nbsp;<a href="../index.html">Introduction</a>
&#149; <a href="index.html">General Purpose</a>
&#149; <a href="../conditionals/index.html">Conditionals</a>
&#149; <a href="../iterators/index.html">Iterators</a> &#149;
<a href="../import/index.jsp">Import</a> &#149; <a href="../format/index.html">I18N
& Formatting</a> &#149; <a href="../xml/index.html">XML</a>
&#149; <a href="../sql/index.jsp">SQL</a> &#149; <a href="../functions/index.html">Functions</a>
&#149; <a href="../tlv/index.html">TLV</a>
</font></td>
</tr>
</table>
<!-- #BeginEditable "body" -->
<h2>General-Purpose Tags Examples</h2>
<h3>&lt;out&gt;&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/elsupport/Out.jsp"><img src="../images/code.gif"
width="24" height="24"
border="0"></a>
<a href="../elsupport/Out.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
This example features &lt;out&gt; used with default values using the default attribute
as well as the tag's body content. <br>
<h3> &lt;set&gt;&nbsp;&nbsp;<a href="../ShowSource.jsp?filename=/elsupport/Set.jsp"><img src="../images/code.gif"
width="24" height="24"
border="0"></a>
<a href="../elsupport/Set.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
<p>We set the value of an application scope attribute from the &lt;set&gt; tag
body content. This application scope variable is then used in a second JSP page.</p>
<!--
<h3>&lt;declare&gt;&nbsp;&nbsp;<a href="../ShowSource.jsp?filename=/elsupport/Declare.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
<a href="../elsupport/Declare.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
<p>In order for JSTL tags to collaborate with custom tags that only accept rtexprvalues,
the &lt;declare&gt; tag must be used to create a scripting variable. In this
example, the page attribute created by the &lt;forEach&gt; tag is used in the
&lt;declare&gt; tag to export a scripting variable that is then used in custom
tag &lt;customerFmt&gt;.</p>
-->
<!-- #EndEditable -->
<hr noshade color="#000099">
<table width="100%" border="0" cellpadding="5">
<tr>
<td height="24"><font color="#000099"><b>standard taglib &#149; implementation
of the JSP Standard Tag Library</b></font></td>
</tr>
</table>
</body>
<!-- #EndTemplate --></html>