You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jb...@apache.org on 2010/11/20 19:34:07 UTC
svn commit: r1037291 [2/5] - in /tomcat/taglibs/standard/trunk/examples:
src/org/apache/taglibs/standard/examples/beans/
src/org/apache/taglibs/standard/examples/i18n/
src/org/apache/taglibs/standard/examples/startup/
src/org/apache/taglibs/standard/ex...
Modified: tomcat/taglibs/standard/trunk/examples/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/WEB-INF/web.xml?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/WEB-INF/web.xml (original)
+++ tomcat/taglibs/standard/trunk/examples/web/WEB-INF/web.xml Sat Nov 20 18:34:03 2010
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
- version="2.4">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+ version="2.4">
<display-name>JSTL Examples</display-name>
<description>
@@ -11,12 +11,12 @@
</description>
<listener>
- <listener-class>org.apache.taglibs.standard.examples.startup.Init</listener-class>
+ <listener-class>org.apache.taglibs.standard.examples.startup.Init</listener-class>
</listener>
<welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- <welcome-file>index.html</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
Modified: tomcat/taglibs/standard/trunk/examples/web/conditionals/Choose.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/conditionals/Choose.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/conditionals/Choose.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/conditionals/Choose.jsp Sat Nov 20 18:34:03 2010
@@ -2,7 +2,7 @@
<html>
<head>
- <title>JSTL: Conditional Support -- Mutually Exclusive Conditional Execution Example</title>
+ <title>JSTL: Conditional Support -- Mutually Exclusive Conditional Execution Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Mutually Exclusive Conditional Execution</h3>
@@ -10,18 +10,18 @@
<h4>USA:blue Canada:red Others:green</h4>
<c:forEach var="customer" items="${customers}">
- <c:choose>
- <c:when test="${customer.address.country == 'USA'}">
- <font color="blue">
+<c:choose>
+<c:when test="${customer.address.country == 'USA'}">
+<font color="blue">
</c:when>
<c:when test="${customer.address.country == 'Canada'}">
- <font color="red">
- </c:when>
- <c:otherwise>
- <font color="green">
- </c:otherwise>
- </c:choose>
- ${customer}</font><br>
-</c:forEach>
+ <font color="red">
+ </c:when>
+ <c:otherwise>
+ <font color="green">
+ </c:otherwise>
+ </c:choose>
+ ${customer}</font><br>
+ </c:forEach>
</body>
</html>
Modified: tomcat/taglibs/standard/trunk/examples/web/conditionals/CustomLogicTag.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/conditionals/CustomLogicTag.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/conditionals/CustomLogicTag.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/conditionals/CustomLogicTag.jsp Sat Nov 20 18:34:03 2010
@@ -3,7 +3,7 @@
<html>
<head>
- <title>JSTL: Conditional Support -- Custom Logic Tag Example</title>
+ <title>JSTL: Conditional Support -- Custom Logic Tag Example</title>
</head>
<body bgcolor="#FFFFFF">
@@ -13,24 +13,24 @@
<h4>Simple Conditional Execution</h4>
<c:forEach var="customer" items="${customers}">
- <ex:usCustomer customer="${customer}">
- <c:out value="${customer}"/><br>
- </ex:usCustomer>
+ <ex:usCustomer customer="${customer}">
+ <c:out value="${customer}"/><br>
+ </ex:usCustomer>
</c:forEach>
<h4>Mutually Exclusive Conditional Execution</h4>
<c:forEach var="customer" items="${customers}">
- <ex:usCustomer customer="${customer}" var="isUsCustomer"/>
- <c:choose>
- <c:when test="${isUsCustomer}">
- <font color="blue">
+<ex:usCustomer customer="${customer}" var="isUsCustomer"/>
+<c:choose>
+<c:when test="${isUsCustomer}">
+<font color="blue">
</c:when>
<c:otherwise>
- <font color="green">
- </c:otherwise>
- </c:choose>
- <c:out value="${customer}"/></font><br>
-</c:forEach>
+ <font color="green">
+ </c:otherwise>
+ </c:choose>
+ <c:out value="${customer}"/></font><br>
+ </c:forEach>
</body>
</html>
Modified: tomcat/taglibs/standard/trunk/examples/web/conditionals/FailureLocal.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/conditionals/FailureLocal.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/conditionals/FailureLocal.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/conditionals/FailureLocal.jsp Sat Nov 20 18:34:03 2010
@@ -2,7 +2,7 @@
<html>
<head>
- <title>JSTL: Conditional Support -- Mutually Exclusive Conditional Execution Example</title>
+ <title>JSTL: Conditional Support -- Mutually Exclusive Conditional Execution Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Mutually Exclusive Conditional Execution</h3>
@@ -10,18 +10,18 @@
<h4>USA:blue Canada:red Others:green</h4>
<c:forEach var="customer" items="${customers}">
- <c:choose>
- <c:otherwise>
- <font color="green">
- </c:otherwise>
+<c:choose>
+<c:otherwise>
+<font color="green">
+ </c:otherwise>
<c:when test="${customer.address.country == 'USA'}">
- <font color="blue">
- </c:when>
- <c:when test="${customer.address.country == 'Canada'}">
- <font color="red">
- </c:when>
- </c:choose>
- <c:out value="${customer}"/></font><br>
-</c:forEach>
+ <font color="blue">
+ </c:when>
+ <c:when test="${customer.address.country == 'Canada'}">
+ <font color="red">
+ </c:when>
+ </c:choose>
+ <c:out value="${customer}"/></font><br>
+ </c:forEach>
</body>
</html>
Modified: tomcat/taglibs/standard/trunk/examples/web/conditionals/If.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/conditionals/If.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/conditionals/If.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/conditionals/If.jsp Sat Nov 20 18:34:03 2010
@@ -2,7 +2,7 @@
<html>
<head>
- <title>JSTL: Conditional Support -- Simple Conditional Execution Example</title>
+ <title>JSTL: Conditional Support -- Simple Conditional Execution Example</title>
</head>
<body bgcolor="#FFFFFF">
@@ -11,9 +11,9 @@
<h4>Customers living in the USA</h4>
<c:forEach var="customer" items="${customers}">
- <c:if test="${customer.address.country == 'USA'}">
- ${customer}<br>
- </c:if>
+ <c:if test="${customer.address.country == 'USA'}">
+ ${customer}<br>
+ </c:if>
</c:forEach>
</body>
</html>
Modified: tomcat/taglibs/standard/trunk/examples/web/conditionals/index.html
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/conditionals/index.html?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/conditionals/index.html (original)
+++ tomcat/taglibs/standard/trunk/examples/web/conditionals/index.html Sat Nov 20 18:34:03 2010
@@ -1,59 +1,72 @@
<html><!-- #BeginTemplate "/Templates/ExamplesTemplate.dwt" -->
<head>
-<!-- #BeginEditable "doctitle" -->
-<title>JSTL: Conditional 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">
+ <!-- #BeginEditable "doctitle" -->
+ <title>JSTL: Conditional 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 • implementation
- of the JSP Standard Tag Library • </b></font><font color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
- <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
- <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
- </tr>
- <tr>
- <td bgcolor="#CCCCFF"><font size="-1">Examples <a href="../index.html">Introduction</a>
- • <a href="../elsupport/index.html">General Purpose</a>
- • <a href="index.html">Conditionals</a>
- • <a href="../iterators/index.html">Iterators</a> •
- <a href="../import/index.jsp">Import</a> • <a href="../format/index.html">I18N
- & Formatting</a> • <a href="../xml/index.html">XML</a>
- • <a href="../sql/index.jsp">SQL</a> • <a href="../functions/index.html">Functions</a>
- • <a href="../tlv/index.html">TLV</a> • <a href="../functions/index.html"></a><a href="../misc/index.html">Misc.</a></font></td>
- </tr>
+ <tr>
+ <td height="0"><font color="#000099"><b>standard taglib • implementation
+ of the JSP Standard Tag Library • </b></font><font color="#003399"><a
+ href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
+ <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
+ <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCFF"><font size="-1">Examples <a href="../index.html">Introduction</a>
+ • <a href="../elsupport/index.html">General Purpose</a>
+ • <a href="index.html">Conditionals</a>
+ • <a href="../iterators/index.html">Iterators</a> •
+ <a href="../import/index.jsp">Import</a> • <a href="../format/index.html">I18N
+ & Formatting</a> • <a href="../xml/index.html">XML</a>
+ • <a href="../sql/index.jsp">SQL</a> • <a href="../functions/index.html">Functions</a>
+ • <a href="../tlv/index.html">TLV</a> • <a href="../functions/index.html"></a><a
+ href="../misc/index.html">Misc.</a></font></td>
+ </tr>
</table>
-<!-- #BeginEditable "body" -->
+<!-- #BeginEditable "body" -->
<h2>Conditional Tags Examples</h2>
-<h3><if> Simple Conditional Execution <a href="../ShowSource.jsp?filename=/conditionals/If.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="If.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3><if> Simple Conditional Execution <a href="../ShowSource.jsp?filename=/conditionals/If.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="If.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Only shows a customer from the customer list if they are living in the "USA".<br>
-<h3> <choose> Mutually Exclusive Conditional Execution <a href="../ShowSource.jsp?filename=/conditionals/Choose.jsp"><img src="../images/code.gif" width="24" height="24"" border="0"></a>
- <a href="Choose.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3> <choose> Mutually Exclusive Conditional Execution <a
+ href="../ShowSource.jsp?filename=/conditionals/Choose.jsp"><img src="../images/code.gif" width="24" height="24""
+ border="0"></a>
+ <a href="Choose.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
-<p>Customers from the USA will be printed in blue, those from Canada in red, and
- others in green.</p>
-<h3>Custom Logic Tag <a href="../ShowSource.jsp?filename=/conditionals/CustomLogicTag.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> <a href="CustomLogicTag.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
-<p>JSTL exposes in its API the abstract class ConditionalTagSupport to facilitate
- the implementation of custom conditional tags that leverage the standard conditional
- behavior defined in JSTL. This example shows custom tag <usCustomer> that
- returns true if its customer attribute value points to a US customer. It can
- be used both in the context of a simple conditional execution, as well as in
- the context of a mutually conditional execution by exposing the result of the
- conditional execution in a JSP page attribute via the tag attribute 'var'. </p>
+
+<p>Customers from the USA will be printed in blue, those from Canada in red, and
+ others in green.</p>
+
+<h3>Custom Logic Tag <a href="../ShowSource.jsp?filename=/conditionals/CustomLogicTag.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a> <a href="CustomLogicTag.jsp"><img
+ src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
+
+<p>JSTL exposes in its API the abstract class ConditionalTagSupport to facilitate
+ the implementation of custom conditional tags that leverage the standard conditional
+ behavior defined in JSTL. This example shows custom tag <usCustomer> that
+ returns true if its customer attribute value points to a US customer. It can
+ be used both in the context of a simple conditional execution, as well as in
+ the context of a mutually conditional execution by exposing the result of the
+ conditional execution in a JSP page attribute via the tag attribute 'var'. </p>
<!-- #EndEditable -->
<hr noshade color="#000099">
<table width="100%" border="0" cellpadding="5">
- <tr>
- <td height="24"><font color="#000099"><b>standard taglib • implementation
- of the JSP Standard Tag Library • </b></font><font color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
- <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
- <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
- </tr>
+ <tr>
+ <td height="24"><font color="#000099"><b>standard taglib • implementation
+ of the JSP Standard Tag Library • </b></font><font color="#003399"><a
+ href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
+ <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
+ <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
+ </tr>
</table>
</body>
<!-- #EndTemplate --></html>
Modified: tomcat/taglibs/standard/trunk/examples/web/elsupport/Out.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/elsupport/Out.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/elsupport/Out.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/elsupport/Out.jsp Sat Nov 20 18:34:03 2010
@@ -1,32 +1,32 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
- <title>JSTL: Expression Language Support -- Expr Example</title>
+ <title>JSTL: Expression Language Support -- Expr Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3><c:out></h3>
<table border="1">
- <c:forEach var="customer" items="${customers}">
- <tr>
- <td><c:out value="${customer.lastName}"/></td>
- <td><c:out value="${customer.phoneHome}" default="no home phone specified"/></td>
- <td>
- <c:out value="${customer.phoneCell}" escapeXml="false">
- <font color="red">no cell phone specified</font>
- </c:out>
- </td>
- </tr>
- </c:forEach>
+ <c:forEach var="customer" items="${customers}">
+ <tr>
+ <td><c:out value="${customer.lastName}"/></td>
+ <td><c:out value="${customer.phoneHome}" default="no home phone specified"/></td>
+ <td>
+ <c:out value="${customer.phoneCell}" escapeXml="false">
+ <font color="red">no cell phone specified</font>
+ </c:out>
+ </td>
+ </tr>
+ </c:forEach>
</table>
<h4><c:out> with Reader object</h4>
<%
-java.io.Reader reader1 = new java.io.StringReader("<foo>Text for a Reader!</foo>");
-pageContext.setAttribute("myReader1", reader1);
-java.io.Reader reader2 = new java.io.StringReader("<foo>Text for a Reader!</foo>");
-pageContext.setAttribute("myReader2", reader2);
+ java.io.Reader reader1 = new java.io.StringReader("<foo>Text for a Reader!</foo>");
+ pageContext.setAttribute("myReader1", reader1);
+ java.io.Reader reader2 = new java.io.StringReader("<foo>Text for a Reader!</foo>");
+ pageContext.setAttribute("myReader2", reader2);
%>
Reader1 (escapeXml=true) : <c:out value="${myReader1}"/><br>
Reader2 (escapeXml=false): <c:out value="${myReader2}" escapeXml="false"/><br>
Modified: tomcat/taglibs/standard/trunk/examples/web/elsupport/Set.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/elsupport/Set.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/elsupport/Set.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/elsupport/Set.jsp Sat Nov 20 18:34:03 2010
@@ -2,7 +2,7 @@
<html>
<head>
- <title>JSTL: Expression Language Support -- Set Example</title>
+ <title>JSTL: Expression Language Support -- Set Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3><c:set></h3>
@@ -10,24 +10,25 @@
<h4>Setting application scope attribute "customerTable"</h4>
<c:set var="customerTable" scope="application">
-<table border="1">
- <c:forEach var="customer" items="${customers}">
- <tr>
- <td>${customer.lastName}</td>
- <td><c:out value="${customer.address}" default="no address specified"/></td>
- <td>
- <c:out value="${customer.address}">
- <font color="red">no address specified</font>
- </c:out>
- </td>
- </tr>
- </c:forEach>
-</table>
+ <table border="1">
+ <c:forEach var="customer" items="${customers}">
+ <tr>
+ <td>${customer.lastName}</td>
+ <td><c:out value="${customer.address}" default="no address specified"/></td>
+ <td>
+ <c:out value="${customer.address}">
+ <font color="red">no address specified</font>
+ </c:out>
+ </td>
+ </tr>
+ </c:forEach>
+ </table>
</c:set>
-<p>
-Using customerTable in another JSP page
-<a href="../ShowSource.jsp?filename=/elsupport/Set2.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
-<a href="../elsupport/Set2.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+<p>
+ Using customerTable in another JSP page
+ <a href="../ShowSource.jsp?filename=/elsupport/Set2.jsp"><img src="../images/code.gif" width="24" height="24"
+ border="0"></a>
+ <a href="../elsupport/Set2.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</body>
</html>
Modified: tomcat/taglibs/standard/trunk/examples/web/elsupport/Set2.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/elsupport/Set2.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/elsupport/Set2.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/elsupport/Set2.jsp Sat Nov 20 18:34:03 2010
@@ -1,7 +1,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
- <title>JSTL: Expression Language Support -- Set 2 Example</title>
+ <title>JSTL: Expression Language Support -- Set 2 Example</title>
</head>
<body bgcolor="#FFFFFF">
@@ -11,6 +11,6 @@
<c:out value="${customerTable}" escapeXml="false"/>
<h4>Using "customerTable" application scope attribute defined in Set.jsp a second time</h4>
-<c:out value="${customerTable}" escapeXml="false" />
+<c:out value="${customerTable}" escapeXml="false"/>
</body>
</html>
Modified: tomcat/taglibs/standard/trunk/examples/web/elsupport/index.html
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/elsupport/index.html?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/elsupport/index.html (original)
+++ tomcat/taglibs/standard/trunk/examples/web/elsupport/index.html Sat Nov 20 18:34:03 2010
@@ -1,42 +1,51 @@
<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">
+ <!-- #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 • implementation
- of the JSP Standard Tag Library • </b></font><font color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
- <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
- <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
- </tr>
- <tr>
- <td bgcolor="#CCCCFF"><font size="-1">Examples <a href="../index.html">Introduction</a>
- • <a href="index.html">General Purpose</a>
- • <a href="../conditionals/index.html">Conditionals</a>
- • <a href="../iterators/index.html">Iterators</a> •
- <a href="../import/index.jsp">Import</a> • <a href="../format/index.html">I18N
- & Formatting</a> • <a href="../xml/index.html">XML</a>
- • <a href="../sql/index.jsp">SQL</a> • <a href="../functions/index.html">Functions</a>
- • <a href="../tlv/index.html">TLV</a> • <a href="../functions/index.html"></a><a href="../misc/index.html">Misc.</a></font></td>
- </tr>
+ <tr>
+ <td height="0"><font color="#000099"><b>standard taglib • implementation
+ of the JSP Standard Tag Library • </b></font><font color="#003399"><a
+ href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
+ <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
+ <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCFF"><font size="-1">Examples <a href="../index.html">Introduction</a>
+ • <a href="index.html">General Purpose</a>
+ • <a href="../conditionals/index.html">Conditionals</a>
+ • <a href="../iterators/index.html">Iterators</a> •
+ <a href="../import/index.jsp">Import</a> • <a href="../format/index.html">I18N
+ & Formatting</a> • <a href="../xml/index.html">XML</a>
+ • <a href="../sql/index.jsp">SQL</a> • <a href="../functions/index.html">Functions</a>
+ • <a href="../tlv/index.html">TLV</a> • <a href="../functions/index.html"></a><a
+ href="../misc/index.html">Misc.</a></font></td>
+ </tr>
</table>
-<!-- #BeginEditable "body" -->
+<!-- #BeginEditable "body" -->
<h2>General-Purpose Tags Examples</h2>
-<h3><out> <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><out> <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 <out> used with default values using the default attribute
+This example features <out> used with default values using the default attribute
as well as the tag's body content. <br>
-<h3> <set> <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 <set> tag
- body content. This application scope variable is then used in a second JSP page.</p>
+
+<h3> <set> <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 <set> tag
+ body content. This application scope variable is then used in a second JSP page.</p>
<!--
<h3><declare> <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>
@@ -49,12 +58,13 @@ as well as the tag's body content. <br>
<!-- #EndEditable -->
<hr noshade color="#000099">
<table width="100%" border="0" cellpadding="5">
- <tr>
- <td height="24"><font color="#000099"><b>standard taglib • implementation
- of the JSP Standard Tag Library • </b></font><font color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
- <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
- <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
- </tr>
+ <tr>
+ <td height="24"><font color="#000099"><b>standard taglib • implementation
+ of the JSP Standard Tag Library • </b></font><font color="#003399"><a
+ href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
+ <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
+ <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
+ </tr>
</table>
</body>
<!-- #EndTemplate --></html>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/Demo.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/Demo.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/Demo.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/Demo.jsp Sat Nov 20 18:34:03 2010
@@ -1,61 +1,65 @@
-<%@ page import="javax.servlet.jsp.jstl.core.Config, java.util.*" %>
+<%@ page import="java.util.Enumeration, java.util.Locale" %>
+<%@ page import="javax.servlet.jsp.jstl.core.Config" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Demo Example</title>
+ <title>JSTL: Formatting/I18N Support -- Demo Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Demo</h3>
+
<p>
-The following bundles exist in the web application: 'Resources', 'Resources_de', 'Resources_fr', 'Resources_it'.
-'Resources' is the 'base' bundle and contains all messages in English. The italian bundle only holds one message
-(key=greetingMorning).
+ The following bundles exist in the web application: 'Resources', 'Resources_de', 'Resources_fr', 'Resources_it'.
+ 'Resources' is the 'base' bundle and contains all messages in English. The italian bundle only holds one message
+ (key=greetingMorning).
</p>
<c:if test="${!empty param.locale}">
- <fmt:setLocale value="${param.locale}" scope="page"/>
+ <fmt:setLocale value="${param.locale}" scope="page"/>
</c:if>
<c:if test="${!empty param.fallback}">
- <% Config.set(request, Config.FMT_FALLBACK_LOCALE, request.getParameter("fallback")); %>
+ <% Config.set(request, Config.FMT_FALLBACK_LOCALE, request.getParameter("fallback")); %>
</c:if>
<table>
-<tr>
- <td><b>Set application-based locale:</b></td>
- <td>
-<a href='?locale=fr&fallback=<c:out value="${param.fallback}"/>'>French</a> •
-<a href='?locale=de&fallback=<c:out value="${param.fallback}"/>'>German</a> •
-<a href='?locale=it&fallback=<c:out value="${param.fallback}"/>'>Italian</a> •
-<a href='?locale=es&fallback=<c:out value="${param.fallback}"/>'>Spanish (no bundle)</a> •
-<a href='?locale=&fallback=<c:out value="${param.fallback}"/>'>None</a>
- </td>
-</tr>
-<tr>
- <td align="right"><b>Set fallback locale:</b></td>
- <td>
-<a href='?locale=<c:out value="${param.locale}"/>&fallback=fr'>French</a> •
-<a href='?locale=<c:out value="${param.locale}"/>&fallback=de'>German</a> •
-<a href='?locale=<c:out value="${param.locale}"/>&fallback=it'>Italian</a> •
-<a href='?locale=<c:out value="${param.locale}"/>&fallback=es'>Spanish (no bundle)</a> •
-<a href='?locale=<c:out value="${param.locale}"/>&fallback='>None</a>
- </td>
+ <tr>
+ <td><b>Set application-based locale:</b></td>
+ <td>
+ <a href='?locale=fr&fallback=<c:out value="${param.fallback}"/>'>French</a> •
+ <a href='?locale=de&fallback=<c:out value="${param.fallback}"/>'>German</a> •
+ <a href='?locale=it&fallback=<c:out value="${param.fallback}"/>'>Italian</a> •
+ <a href='?locale=es&fallback=<c:out value="${param.fallback}"/>'>Spanish (no bundle)</a> •
+ <a href='?locale=&fallback=<c:out value="${param.fallback}"/>'>None</a>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Set fallback locale:</b></td>
+ <td>
+ <a href='?locale=<c:out value="${param.locale}"/>&fallback=fr'>French</a> •
+ <a href='?locale=<c:out value="${param.locale}"/>&fallback=de'>German</a> •
+ <a href='?locale=<c:out value="${param.locale}"/>&fallback=it'>Italian</a> •
+ <a href='?locale=<c:out value="${param.locale}"/>&fallback=es'>Spanish (no bundle)</a> •
+ <a href='?locale=<c:out value="${param.locale}"/>&fallback='>None</a>
+ </td>
</table>
<p>
-Request parameter "locale": <c:out value="${param.locale}"/><br>
-<i>(This value is used to set the application based locale for this example)</i>
+ Request parameter "locale": <c:out value="${param.locale}"/><br>
+ <i>(This value is used to set the application based locale for this example)</i>
+
<p>
-Application based locale: <%=Config.find(pageContext, Config.FMT_LOCALE)%><br>
-<i>(javax.servlet.jsp.jstl.fmt.locale configuration setting)</i>
+ Application based locale: <%=Config.find(pageContext, Config.FMT_LOCALE)%><br>
+ <i>(javax.servlet.jsp.jstl.fmt.locale configuration setting)</i>
+
<p>
-Browser-Based locales:
-<%
+ Browser-Based locales:
+ <%
Enumeration enum_ = request.getLocales();
while (enum_.hasMoreElements()) {
Locale locale = (Locale)enum_.nextElement();
@@ -63,52 +67,54 @@ Browser-Based locales:
out.print(" ");
}
%>
-<br>
-<i>(ServletRequest.getLocales() on the incoming request)</i>
+ <br>
+ <i>(ServletRequest.getLocales() on the incoming request)</i>
+
<p>
-Fallback locale: <%=Config.find(pageContext, Config.FMT_FALLBACK_LOCALE)%><br>
-<i>(javax.servlet.jsp.jstl.fmt.fallbackLocale configuration setting)</i>
+ Fallback locale: <%=Config.find(pageContext, Config.FMT_FALLBACK_LOCALE)%><br>
+ <i>(javax.servlet.jsp.jstl.fmt.fallbackLocale configuration setting)</i>
+
<p>
-<jsp:useBean id="now" class="java.util.Date" />
+ <jsp:useBean id="now" class="java.util.Date"/>
<h4>
-<fmt:formatDate value="${now}" dateStyle="full"/> •
-<fmt:formatDate value="${now}" type="time"/>
+ <fmt:formatDate value="${now}" dateStyle="full"/> •
+ <fmt:formatDate value="${now}" type="time"/>
</h4>
<p>
-<fmt:bundle basename="org.apache.taglibs.standard.examples.i18n.Resources">
+ <fmt:bundle basename="org.apache.taglibs.standard.examples.i18n.Resources">
<table cellpadding="5" border="1">
- <tr>
- <th align="left">KEY</th>
- <th align="left">VALUE</th>
- </tr>
- <tr>
- <td>greetingMorning</td>
- <td><fmt:message key="greetingMorning"/></td>
- </tr>
- <tr>
- <td>greetingEvening</td>
- <td><fmt:message key="greetingEvening"/></td>
- </tr>
- <tr>
- <td>currentTime</td>
- <td>
- <fmt:message key="currentTime">
- <fmt:param value="${now}"/>
- </fmt:message>
- </td>
- </tr>
- <tr>
- <td>serverInfo</td>
- <td><fmt:message key="serverInfo"/></td>
- </tr>
- <tr>
- <td>undefinedKey</td>
- <td><fmt:message key="undefinedKey"/></td>
- </tr>
+ <tr>
+ <th align="left">KEY</th>
+ <th align="left">VALUE</th>
+ </tr>
+ <tr>
+ <td>greetingMorning</td>
+ <td><fmt:message key="greetingMorning"/></td>
+ </tr>
+ <tr>
+ <td>greetingEvening</td>
+ <td><fmt:message key="greetingEvening"/></td>
+ </tr>
+ <tr>
+ <td>currentTime</td>
+ <td>
+ <fmt:message key="currentTime">
+ <fmt:param value="${now}"/>
+ </fmt:message>
+ </td>
+ </tr>
+ <tr>
+ <td>serverInfo</td>
+ <td><fmt:message key="serverInfo"/></td>
+ </tr>
+ <tr>
+ <td>undefinedKey</td>
+ <td><fmt:message key="undefinedKey"/></td>
+ </tr>
</table>
</fmt:bundle>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTime.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTime.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTime.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTime.jsp Sat Nov 20 18:34:03 2010
@@ -3,71 +3,72 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Date and Time Example</title>
+ <title>JSTL: Formatting/I18N Support -- Date and Time Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Formatting dates and times using <tt>en-US</tt> locale</h3>
-<jsp:useBean id="now" class="java.util.Date" />
-<fmt:setLocale value="en-US" />
+<jsp:useBean id="now" class="java.util.Date"/>
+<fmt:setLocale value="en-US"/>
<ul>
- <li> Formatting current date as "GMT":<br>
- <fmt:timeZone value="GMT">
- <fmt:formatDate value="${now}" type="both" dateStyle="full"
- timeStyle="full"/>
- </fmt:timeZone>
-
- <li> Formatting current date as "GMT+1:00", and parsing
- its date and time components:<br>
- <fmt:timeZone value="GMT+1:00">
- <fmt:formatDate value="${now}" type="both" dateStyle="full"
- timeStyle="full" var="formatted"/>
- <fmt:parseDate value="${formatted}" type="both" dateStyle="full"
- timeStyle="full" timeZone="PST" var="parsedDateTime"/>
- Parsed date: <fmt:formatDate value="${parsedDateTime}" type="date"
- dateStyle="full"/><br>
- Parsed time: <fmt:formatDate value="${parsedDateTime}" type="time"
- timeStyle="full"/>
- </fmt:timeZone>
-
- <li> Parsing SHORT version of current time in different time zones:<br>
- <fmt:formatDate value="${now}" type="both" timeStyle="short"
- var="formatted"/>
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="GMT" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="GMT+1:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="GMT+3:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="PST" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "PST")
-
- <li> Parsing FULL version of current time in different time zones<br>
- (parse result is independent of specified time zone):<br>
- <fmt:formatDate value="${now}" type="both" timeStyle="full" var="formatted"/>
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="GMT" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="GMT+1:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="GMT+3:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="PST" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "PST")
+ <li> Formatting current date as "GMT":<br>
+ <fmt:timeZone value="GMT">
+ <fmt:formatDate value="${now}" type="both" dateStyle="full"
+ timeStyle="full"/>
+ </fmt:timeZone>
+
+ <li> Formatting current date as "GMT+1:00", and parsing
+ its date and time components:<br>
+ <fmt:timeZone value="GMT+1:00">
+ <fmt:formatDate value="${now}" type="both" dateStyle="full"
+ timeStyle="full" var="formatted"/>
+ <fmt:parseDate value="${formatted}" type="both" dateStyle="full"
+ timeStyle="full" timeZone="PST" var="parsedDateTime"/>
+ Parsed date: <fmt:formatDate value="${parsedDateTime}" type="date"
+ dateStyle="full"/><br>
+ Parsed time:
+ <fmt:formatDate value="${parsedDateTime}" type="time"
+ timeStyle="full"/>
+ </fmt:timeZone>
+
+ <li> Parsing SHORT version of current time in different time zones:<br>
+ <fmt:formatDate value="${now}" type="both" timeStyle="short"
+ var="formatted"/>
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="GMT" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="GMT+1:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="GMT+3:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="PST" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "PST")
+
+ <li> Parsing FULL version of current time in different time zones<br>
+ (parse result is independent of specified time zone):<br>
+ <fmt:formatDate value="${now}" type="both" timeStyle="full" var="formatted"/>
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="GMT" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="GMT+1:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="GMT+3:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="PST" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "PST")
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTimeBrowserLocale.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTimeBrowserLocale.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTimeBrowserLocale.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/FormatDateTimeBrowserLocale.jsp Sat Nov 20 18:34:03 2010
@@ -3,70 +3,71 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Date and Time Example</title>
+ <title>JSTL: Formatting/I18N Support -- Date and Time Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Formatting dates and times using browser-based locale</h3>
-<jsp:useBean id="now" class="java.util.Date" />
+<jsp:useBean id="now" class="java.util.Date"/>
<ul>
- <li> Formatting current date as "GMT":<br>
- <fmt:timeZone value="GMT">
- <fmt:formatDate value="${now}" type="both" dateStyle="full"
- timeStyle="full"/>
- </fmt:timeZone>
-
- <li> Formatting current date as "GMT+1:00", and parsing
- its date and time components:<br>
- <fmt:timeZone value="GMT+1:00">
- <fmt:formatDate value="${now}" type="both" dateStyle="full"
- timeStyle="full" var="formatted"/>
- <fmt:parseDate value="${formatted}" type="both" dateStyle="full"
- timeStyle="full" timeZone="PST" var="parsedDateTime"/>
- Parsed date: <fmt:formatDate value="${parsedDateTime}" type="date"
- dateStyle="full"/><br>
- Parsed time: <fmt:formatDate value="${parsedDateTime}" type="time"
- timeStyle="full"/>
- </fmt:timeZone>
-
- <li> Parsing SHORT version of current time in different time zones:<br>
- <fmt:formatDate value="${now}" type="both" timeStyle="short"
- var="formatted"/>
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="GMT" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="GMT+1:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="GMT+3:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
- timeZone="PST" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "PST")
-
- <li> Parsing FULL version of current time in different time zones<br>
- (parse result is independent of specified time zone):<br>
- <fmt:formatDate value="${now}" type="both" timeStyle="full" var="formatted"/>
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="GMT" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="GMT+1:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="GMT+3:00" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
-
- <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
- timeZone="PST" var="parsed"/>
- <c:out value="${parsed}"/> (parsed in "PST")
+ <li> Formatting current date as "GMT":<br>
+ <fmt:timeZone value="GMT">
+ <fmt:formatDate value="${now}" type="both" dateStyle="full"
+ timeStyle="full"/>
+ </fmt:timeZone>
+
+ <li> Formatting current date as "GMT+1:00", and parsing
+ its date and time components:<br>
+ <fmt:timeZone value="GMT+1:00">
+ <fmt:formatDate value="${now}" type="both" dateStyle="full"
+ timeStyle="full" var="formatted"/>
+ <fmt:parseDate value="${formatted}" type="both" dateStyle="full"
+ timeStyle="full" timeZone="PST" var="parsedDateTime"/>
+ Parsed date: <fmt:formatDate value="${parsedDateTime}" type="date"
+ dateStyle="full"/><br>
+ Parsed time:
+ <fmt:formatDate value="${parsedDateTime}" type="time"
+ timeStyle="full"/>
+ </fmt:timeZone>
+
+ <li> Parsing SHORT version of current time in different time zones:<br>
+ <fmt:formatDate value="${now}" type="both" timeStyle="short"
+ var="formatted"/>
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="GMT" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="GMT+1:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="GMT+3:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="short"
+ timeZone="PST" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "PST")
+
+ <li> Parsing FULL version of current time in different time zones<br>
+ (parse result is independent of specified time zone):<br>
+ <fmt:formatDate value="${now}" type="both" timeStyle="full" var="formatted"/>
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="GMT" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="GMT+1:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+1:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="GMT+3:00" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "GMT+3:00")<br>
+
+ <fmt:parseDate value="${formatted}" type="both" timeStyle="full"
+ timeZone="PST" var="parsed"/>
+ <c:out value="${parsed}"/> (parsed in "PST")
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/FormatNumber.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/FormatNumber.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/FormatNumber.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/FormatNumber.jsp Sat Nov 20 18:34:03 2010
@@ -2,39 +2,39 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Number, Currency, and Percent
+ <title>JSTL: Formatting/I18N Support -- Number, Currency, and Percent
Example
- </title>
+ </title>
</head>
<body bgcolor="#FFFFFF">
<h3>Formatting numbers, currencies, and percentages using <tt>en-US</tt>
locale
</h3>
-<fmt:setLocale value="en-US" />
+<fmt:setLocale value="en-US"/>
<ul>
- <li> Format "123456789" as number:<br>
- <fmt:formatNumber value="123456789" />
+ <li> Format "123456789" as number:<br>
+ <fmt:formatNumber value="123456789"/>
- <li> Format "123456789" as percent:<br>
- <fmt:formatNumber type="percent">123456789</fmt:formatNumber>
+ <li> Format "123456789" as percent:<br>
+ <fmt:formatNumber type="percent">123456789</fmt:formatNumber>
- <li> Format "12345.67" as currency:<br>
- <fmt:formatNumber value="12345.67" type="currency" />
+ <li> Format "12345.67" as currency:<br>
+ <fmt:formatNumber value="12345.67" type="currency"/>
- <li> Format "12345.67" as currency, with
- grouping turned off, the maximum number of digits in the integer portion
- limited to 4, and no fraction portion:<br>
- <fmt:formatNumber value="12345.67" type="currency"
- groupingUsed="false" maxIntegerDigits="4"
- maxFractionDigits="0" />
-
- <li> Format "12345.67" as currency:<br>
- <fmt:formatNumber value="12345.67" type="currency" /><br>
- then parse its integer portion only and output the result:<br>
- <fmt:formatNumber value="12345.67" type="currency" var="cur" />
- <fmt:parseNumber value="${cur}" type="currency" integerOnly="true" />
+ <li> Format "12345.67" as currency, with
+ grouping turned off, the maximum number of digits in the integer portion
+ limited to 4, and no fraction portion:<br>
+ <fmt:formatNumber value="12345.67" type="currency"
+ groupingUsed="false" maxIntegerDigits="4"
+ maxFractionDigits="0"/>
+
+ <li> Format "12345.67" as currency:<br>
+ <fmt:formatNumber value="12345.67" type="currency"/><br>
+ then parse its integer portion only and output the result:<br>
+ <fmt:formatNumber value="12345.67" type="currency" var="cur"/>
+ <fmt:parseNumber value="${cur}" type="currency" integerOnly="true"/>
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/FormatNumberBrowserLocale.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/FormatNumberBrowserLocale.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/FormatNumberBrowserLocale.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/FormatNumberBrowserLocale.jsp Sat Nov 20 18:34:03 2010
@@ -3,9 +3,9 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Number, Currency, and Percent
+ <title>JSTL: Formatting/I18N Support -- Number, Currency, and Percent
Example
- </title>
+ </title>
</head>
<body bgcolor="#FFFFFF">
<h3>Formatting numbers, currencies, and percentages using browser-based
@@ -13,39 +13,39 @@
</h3>
<c:catch var="ex">
-<ul>
- <li> Format "123456789" as number:<br>
- <fmt:formatNumber value="123456789" />
-
- <li> Format "123456789" as percent:<br>
- <fmt:formatNumber type="percent">123456789</fmt:formatNumber>
-
- <li> Format "12345.67" as currency:<br>
- <fmt:formatNumber value="12345.67" type="currency" />
-
- <li> Format "12345.67" as currency, with
- grouping turned off, the maximum number of digits in the integer portion
- limited to 4, and no fraction portion:<br>
- <fmt:formatNumber value="12345.67" type="currency"
- groupingUsed="false" maxIntegerDigits="4"
- maxFractionDigits="0" />
-
- <li> Format "12345.67" as currency:<br>
- <fmt:formatNumber value="12345.67" type="currency" /><br>
- then parse its integer portion only and output the result:<br>
- <fmt:formatNumber value="12345.67" type="currency" var="cur" />
- <fmt:parseNumber value="${cur}" type="currency" integerOnly="true" />
-</ul>
+ <ul>
+ <li> Format "123456789" as number:<br>
+ <fmt:formatNumber value="123456789"/>
+
+ <li> Format "123456789" as percent:<br>
+ <fmt:formatNumber type="percent">123456789</fmt:formatNumber>
+
+ <li> Format "12345.67" as currency:<br>
+ <fmt:formatNumber value="12345.67" type="currency"/>
+
+ <li> Format "12345.67" as currency, with
+ grouping turned off, the maximum number of digits in the integer portion
+ limited to 4, and no fraction portion:<br>
+ <fmt:formatNumber value="12345.67" type="currency"
+ groupingUsed="false" maxIntegerDigits="4"
+ maxFractionDigits="0"/>
+
+ <li> Format "12345.67" as currency:<br>
+ <fmt:formatNumber value="12345.67" type="currency"/><br>
+ then parse its integer portion only and output the result:<br>
+ <fmt:formatNumber value="12345.67" type="currency" var="cur"/>
+ <fmt:parseNumber value="${cur}" type="currency" integerOnly="true"/>
+ </ul>
</c:catch>
<c:if test="${not empty ex}">
- <font color="#FF0000">
- <br> The following error has occurred:<br><br>
- <c:out value="${ex}" escapeXml='false'/> <br>
- <c:if test="${ex.rootCause.class.name == 'java.text.ParseException' && pageContext.response.locale == 'de_DE'}">
- <br> This is due to a known bug in java.text.NumberFormat (Bugtraq bugid: 4709840).
- </c:if>
- </font>
+ <font color="#FF0000">
+ <br> The following error has occurred:<br><br>
+ <c:out value="${ex}" escapeXml='false'/> <br>
+ <c:if test="${ex.rootCause.class.name == 'java.text.ParseException' && pageContext.response.locale == 'de_DE'}">
+ <br> This is due to a known bug in java.text.NumberFormat (Bugtraq bugid: 4709840).
+ </c:if>
+ </font>
</c:if>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/GermanLocale.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/GermanLocale.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/GermanLocale.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/GermanLocale.jsp Sat Nov 20 18:34:03 2010
@@ -2,16 +2,16 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- German Locale Example</title>
+ <title>JSTL: Formatting/I18N Support -- German Locale Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>German Locale</h3>
<fmt:setLocale value="de"/>
<fmt:bundle basename="org.apache.taglibs.standard.examples.i18n.Resources">
- <fmt:message>
- greetingMorning
- </fmt:message>
+ <fmt:message>
+ greetingMorning
+ </fmt:message>
</fmt:bundle>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautCorrect.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautCorrect.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautCorrect.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautCorrect.jsp Sat Nov 20 18:34:03 2010
@@ -3,7 +3,7 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
+ <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>German Umlaut characters decoded correctly:</h3>
@@ -11,9 +11,12 @@
<fmt:requestEncoding value="UTF-8"/>
<ul>
- <li>a umlaut: <c:out value="${param.a_umlaut}"/>
- <li>o umlaut: <c:out value="${param.o_umlaut}"/>
- <li>u umlaut: <c:out value="${param.u_umlaut}"/>
+ <li>a umlaut:
+ <c:out value="${param.a_umlaut}"/>
+ <li>o umlaut:
+ <c:out value="${param.o_umlaut}"/>
+ <li>u umlaut:
+ <c:out value="${param.u_umlaut}"/>
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautIncorrect.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautIncorrect.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautIncorrect.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/GermanUmlautIncorrect.jsp Sat Nov 20 18:34:03 2010
@@ -3,15 +3,18 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
+ <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>German Umlaut characters decoded incorrectly:</h3>
<ul>
- <li>a umlaut: <c:out value="${param.a_umlaut}"/>
- <li>o umlaut: <c:out value="${param.o_umlaut}"/>
- <li>u umlaut: <c:out value="${param.u_umlaut}"/>
+ <li>a umlaut:
+ <c:out value="${param.a_umlaut}"/>
+ <li>o umlaut:
+ <c:out value="${param.o_umlaut}"/>
+ <li>u umlaut:
+ <c:out value="${param.u_umlaut}"/>
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/ItalianLocale.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/ItalianLocale.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/ItalianLocale.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/ItalianLocale.jsp Sat Nov 20 18:34:03 2010
@@ -2,7 +2,7 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Italian Locale Example</title>
+ <title>JSTL: Formatting/I18N Support -- Italian Locale Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Italian Locale</h3>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/MissingResourceBundle.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/MissingResourceBundle.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/MissingResourceBundle.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/MissingResourceBundle.jsp Sat Nov 20 18:34:03 2010
@@ -2,20 +2,20 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Missing Resource Bundle Example</title>
+ <title>JSTL: Formatting/I18N Support -- Missing Resource Bundle Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Missing Resource Bundle</h3>
<ul>
- <li> Implicit collaboration with <bundle> (via ancestry chain):<br>
- <fmt:bundle basename="org.apache.taglibs.standard.examples.i18n.MissingResources">
- <fmt:message key="greetingMorning"/>
- </fmt:bundle>
+ <li> Implicit collaboration with <bundle> (via ancestry chain):<br>
+ <fmt:bundle basename="org.apache.taglibs.standard.examples.i18n.MissingResources">
+ <fmt:message key="greetingMorning"/>
+ </fmt:bundle>
- <li> Explicit collaboration with <bundle> (via <tt>var</tt> attribute):<br>
- <fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.MissingResources" var="enBundle"/>
- <fmt:message key="greetingEvening" bundle="${enBundle}"/>
+ <li> Explicit collaboration with <bundle> (via <tt>var</tt> attribute):<br>
+ <fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.MissingResources" var="enBundle"/>
+ <fmt:message key="greetingEvening" bundle="${enBundle}"/>
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/ParametricReplacement.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/ParametricReplacement.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/ParametricReplacement.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/ParametricReplacement.jsp Sat Nov 20 18:34:03 2010
@@ -3,12 +3,12 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Parametric Replacement Example</title>
+ <title>JSTL: Formatting/I18N Support -- Parametric Replacement Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Parametric Replacement</h3>
-<jsp:useBean id="now" class="java.util.Date" />
+<jsp:useBean id="now" class="java.util.Date"/>
<fmt:setLocale value="de"/>
<fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.Resources" var="deBundle"/>
@@ -17,49 +17,49 @@
<fmt:parseDate value="${currentDateString}" type="both" var="currentDate"/>
<ul>
- <li> Using single <param> with 'value' evaluating to String:<br>
- <fmt:message key="currentTime" bundle="${deBundle}">
- <fmt:param value="${currentDateString}"/>
- </fmt:message>
-
- <li> Using single <param> with 'value' evaluating to <tt>java.util.Date</tt>:<br>
- <fmt:message key="currentTime" bundle="${deBundle}">
- <fmt:param value="${currentDate}"/>
- </fmt:message>
-
- <li> Using single <param> with body:<br>
- <fmt:message key="currentTime" bundle="${deBundle}">
- <fmt:param>
- <fmt:formatDate value="${now}" type="both"/>
- </fmt:param>
- </fmt:message>
-
- <li> Using multiple parameters:<br>
- <fmt:message key="serverInfo" bundle="${deBundle}">
- <c:forEach var="arg" items="${serverInfoArgs}">
- <fmt:param value="${arg}"/>
- </c:forEach>
- </fmt:message>
+ <li> Using single <param> with 'value' evaluating to String:<br>
+ <fmt:message key="currentTime" bundle="${deBundle}">
+ <fmt:param value="${currentDateString}"/>
+ </fmt:message>
+
+ <li> Using single <param> with 'value' evaluating to <tt>java.util.Date</tt>:<br>
+ <fmt:message key="currentTime" bundle="${deBundle}">
+ <fmt:param value="${currentDate}"/>
+ </fmt:message>
+
+ <li> Using single <param> with body:<br>
+ <fmt:message key="currentTime" bundle="${deBundle}">
+ <fmt:param>
+ <fmt:formatDate value="${now}" type="both"/>
+ </fmt:param>
+ </fmt:message>
+
+ <li> Using multiple parameters:<br>
+ <fmt:message key="serverInfo" bundle="${deBundle}">
+ <c:forEach var="arg" items="${serverInfoArgs}">
+ <fmt:param value="${arg}"/>
+ </c:forEach>
+ </fmt:message>
</ul>
<ul>
- <fmt:setLocale value="es"/>
- <fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.Resources" var="esBundle"/>
- <li>Locale set to Spanish yields a locale-less localization context. Formatting still done
- using the preferred locale:<br>
- <fmt:message key="currentTime" bundle="${esBundle}">
- <fmt:param value="${currentDate}"/>
- </fmt:message>
- </li>
-
- <fmt:setLocale value="en"/>
- <fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.Resources" var="enBundle"/>
- <li>Locale set to English yields a locale-less localization context. Formatting still done
- using the preferred locale:<br>
- <fmt:message key="currentTime" bundle="${esBundle}">
- <fmt:param value="${currentDate}"/>
- </fmt:message>
- </li>
+ <fmt:setLocale value="es"/>
+ <fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.Resources" var="esBundle"/>
+ <li>Locale set to Spanish yields a locale-less localization context. Formatting still done
+ using the preferred locale:<br>
+ <fmt:message key="currentTime" bundle="${esBundle}">
+ <fmt:param value="${currentDate}"/>
+ </fmt:message>
+ </li>
+
+ <fmt:setLocale value="en"/>
+ <fmt:setBundle basename="org.apache.taglibs.standard.examples.i18n.Resources" var="enBundle"/>
+ <li>Locale set to English yields a locale-less localization context. Formatting still done
+ using the preferred locale:<br>
+ <fmt:message key="currentTime" bundle="${esBundle}">
+ <fmt:param value="${currentDate}"/>
+ </fmt:message>
+ </li>
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/PrefixAttribute.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/PrefixAttribute.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/PrefixAttribute.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/PrefixAttribute.jsp Sat Nov 20 18:34:03 2010
@@ -2,14 +2,14 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Prefix Attribute Example</title>
+ <title>JSTL: Formatting/I18N Support -- Prefix Attribute Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Prefix Attribute</h3>
<fmt:setLocale value="de"/>
<fmt:bundle basename="org.apache.taglibs.standard.examples.i18n.Resources" prefix="com.acme.labels.">
- <fmt:message key="cancel"/>
+ <fmt:message key="cancel"/>
</fmt:bundle>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/RequestEncoding.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/RequestEncoding.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/RequestEncoding.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/RequestEncoding.jsp Sat Nov 20 18:34:03 2010
@@ -1,6 +1,6 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
+ <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
</head>
<body bgcolor="#FFFFFF">
This page contains two links, and sends German Umlaut characters as request
@@ -9,8 +9,10 @@ Only one of the linked pages decodes and
correctly:
<ul>
- <li><a href="GermanUmlautIncorrect.jsp?a_umlaut=%C3%A4&o_umlaut=%C3%B6&u_umlaut=%C3%BC">German Umlaut characters decoded incorrectly</a>
- <li><a href="GermanUmlautCorrect.jsp?a_umlaut=%C3%A4&o_umlaut=%C3%B6&u_umlaut=%C3%BC">German Umlaut characters decoded correctly</a>
+ <li><a href="GermanUmlautIncorrect.jsp?a_umlaut=%C3%A4&o_umlaut=%C3%B6&u_umlaut=%C3%BC">German Umlaut characters
+ decoded incorrectly</a>
+ <li><a href="GermanUmlautCorrect.jsp?a_umlaut=%C3%A4&o_umlaut=%C3%B6&u_umlaut=%C3%BC">German Umlaut characters
+ decoded correctly</a>
</ul>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/UndefinedKey.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/UndefinedKey.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/UndefinedKey.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/UndefinedKey.jsp Sat Nov 20 18:34:03 2010
@@ -2,7 +2,7 @@
<html>
<head>
- <title>JSTL: Formatting/I18N Support -- Undefined Key Example</title>
+ <title>JSTL: Formatting/I18N Support -- Undefined Key Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Undefined Key</h3>
Modified: tomcat/taglibs/standard/trunk/examples/web/format/index.html
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/format/index.html?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/format/index.html (original)
+++ tomcat/taglibs/standard/trunk/examples/web/format/index.html Sat Nov 20 18:34:03 2010
@@ -1,89 +1,121 @@
<html><!-- #BeginTemplate "/Templates/ExamplesTemplate.dwt" -->
<head>
-<!-- #BeginEditable "doctitle" -->
-<title>JSTL: I18N-Capable Formatting 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">
+ <!-- #BeginEditable "doctitle" -->
+ <title>JSTL: I18N-Capable Formatting 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 • implementation
- of the JSP Standard Tag Library • </b></font><font color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
- <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
- <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
- </tr>
- <tr>
- <td bgcolor="#CCCCFF"><font size="-1">Examples <a href="../index.html">Introduction</a>
- • <a href="../elsupport/index.html">General Purpose</a>
- • <a href="../conditionals/index.html">Conditionals</a>
- • <a href="../iterators/index.html">Iterators</a> •
- <a href="../import/index.jsp">Import</a> • <a href="index.html">I18N
- & Formatting</a> • <a href="../xml/index.html">XML</a>
- • <a href="../sql/index.jsp">SQL</a> • <a href="../functions/index.html">Functions</a>
- • <a href="../tlv/index.html">TLV</a> • <a href="../functions/index.html"></a><a href="../misc/index.html">Misc.</a></font></td>
- </tr>
+ <tr>
+ <td height="0"><font color="#000099"><b>standard taglib • implementation
+ of the JSP Standard Tag Library • </b></font><font color="#003399"><a
+ href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
+ <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
+ <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
+ </tr>
+ <tr>
+ <td bgcolor="#CCCCFF"><font size="-1">Examples <a href="../index.html">Introduction</a>
+ • <a href="../elsupport/index.html">General Purpose</a>
+ • <a href="../conditionals/index.html">Conditionals</a>
+ • <a href="../iterators/index.html">Iterators</a> •
+ <a href="../import/index.jsp">Import</a> • <a href="index.html">I18N
+ & Formatting</a> • <a href="../xml/index.html">XML</a>
+ • <a href="../sql/index.jsp">SQL</a> • <a href="../functions/index.html">Functions</a>
+ • <a href="../tlv/index.html">TLV</a> • <a href="../functions/index.html"></a><a
+ href="../misc/index.html">Misc.</a></font></td>
+ </tr>
</table>
-<!-- #BeginEditable "body" -->
+<!-- #BeginEditable "body" -->
<h2>I18N-Capable Formatting Tags Examples</h2>
-<h3>Demo <a href="../ShowSource.jsp?filename=/format/Demo.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="Demo.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> </h3>
+
+<h3>Demo <a href="../ShowSource.jsp?filename=/format/Demo.jsp"><img src="../images/code.gif" width="24" height="24"
+ border="0"></a>
+ <a href="Demo.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
Overview demo where the locale to be applied to the page may be changed dynamically.<br>
-<h3>German <a href="../ShowSource.jsp?filename=/format/GermanLocale.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="GermanLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>German <a href="../ShowSource.jsp?filename=/format/GermanLocale.jsp"><img src="../images/code.gif"
+ width="24" height="24"
+ border="0"></a>
+ <a href="GermanLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Using resource bundle for German locale. <br>
-<h3>Italian <a href="../ShowSource.jsp?filename=/format/ItalianLocale.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="ItalianLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Italian <a href="../ShowSource.jsp?filename=/format/ItalianLocale.jsp"><img src="../images/code.gif"
+ width="24" height="24"
+ border="0"></a>
+ <a href="ItalianLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Using resource bundle for Italian locale. <br>
-<h3>Missing Resource Bundle <a href="../ShowSource.jsp?filename=/format/MissingResourceBundle.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="MissingResourceBundle.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Missing Resource Bundle <a href="../ShowSource.jsp?filename=/format/MissingResourceBundle.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="MissingResourceBundle.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Trying to access a resource bundle that does not exist. <br>
-<h3>Undefined Key <a href="../ShowSource.jsp?filename=/format/UndefinedKey.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="UndefinedKey.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Undefined Key <a href="../ShowSource.jsp?filename=/format/UndefinedKey.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="UndefinedKey.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Looking up an undefined key in a resource bundle. <br>
-<h3>Parametric Replacement <a href="../ShowSource.jsp?filename=/format/ParametricReplacement.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="ParametricReplacement.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Parametric Replacement <a href="../ShowSource.jsp?filename=/format/ParametricReplacement.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="ParametricReplacement.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Parametric replacement examples. <br>
-<h3>Prefix <a href="../ShowSource.jsp?filename=/format/PrefixAttribute.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="PrefixAttribute.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Prefix <a href="../ShowSource.jsp?filename=/format/PrefixAttribute.jsp"><img src="../images/code.gif"
+ width="24" height="24"
+ border="0"></a>
+ <a href="PrefixAttribute.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Prepending prefix to message key. <br>
-<h3>Date <a href="../ShowSource.jsp?filename=/format/FormatDateTime.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="FormatDateTime.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Date <a href="../ShowSource.jsp?filename=/format/FormatDateTime.jsp"><img src="../images/code.gif"
+ width="24" height="24"
+ border="0"></a>
+ <a href="FormatDateTime.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Formatting dates and times using <tt>en-US</tt> locale. <br>
-<h3>Date <a href="../ShowSource.jsp?filename=/format/FormatDateTimeBrowserLocale.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="FormatDateTimeBrowserLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Date <a href="../ShowSource.jsp?filename=/format/FormatDateTimeBrowserLocale.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="FormatDateTimeBrowserLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Formatting dates and times using browser-based locale. <br>
-<h3>Number <a href="../ShowSource.jsp?filename=/format/FormatNumber.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="FormatNumber.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Number <a href="../ShowSource.jsp?filename=/format/FormatNumber.jsp"><img src="../images/code.gif"
+ width="24" height="24"
+ border="0"></a>
+ <a href="FormatNumber.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Formatting numbers using <tt>en-US</tt> locale. <br>
-<h3>Number <a href="../ShowSource.jsp?filename=/format/FormatNumberBrowserLocale.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="FormatNumberBrowserLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Number <a href="../ShowSource.jsp?filename=/format/FormatNumberBrowserLocale.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="FormatNumberBrowserLocale.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Formatting numbers using browser-based locale. <br>
-<h3>Request Parameter Decoding <a href="../ShowSource.jsp?filename=/format/RequestEncoding.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a>
- <a href="RequestEncoding.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
+
+<h3>Request Parameter Decoding <a href="../ShowSource.jsp?filename=/format/RequestEncoding.jsp"><img
+ src="../images/code.gif" width="24" height="24" border="0"></a>
+ <a href="RequestEncoding.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a>
</h3>
Decoding and displaying request parameters using the appropriate charset. <br>
<!-- #EndEditable -->
<hr noshade color="#000099">
<table width="100%" border="0" cellpadding="5">
- <tr>
- <td height="24"><font color="#000099"><b>standard taglib • implementation
- of the JSP Standard Tag Library • </b></font><font color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
- <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
- <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
- </tr>
+ <tr>
+ <td height="24"><font color="#000099"><b>standard taglib • implementation
+ of the JSP Standard Tag Library • </b></font><font color="#003399"><a
+ href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>
+ <b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>
+ <a href="mailto:jsr-52-comments@jcp.org">comments to JSR-52</a></b></font></td>
+ </tr>
</table>
</body>
<!-- #EndTemplate --></html>
Modified: tomcat/taglibs/standard/trunk/examples/web/functions/EscapeXml.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/functions/EscapeXml.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/functions/EscapeXml.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/functions/EscapeXml.jsp Sat Nov 20 18:34:03 2010
@@ -3,7 +3,7 @@
<html>
<head>
- <title>JSTL Functions • Escape Xml</title>
+ <title>JSTL Functions • Escape Xml</title>
</head>
<body bgcolor="#FFFFFF">
@@ -13,26 +13,28 @@
<h4>fn:escapeXml</h4>
<table cellpadding="5" border="1">
- <tr>
- <th align="left">Input String</th>
- <th>Result</th>
- </tr>
- <tr>
- <td>${s1}</td>
- <td>${fn:escapeXml(s1)}</td>
- </tr>
- <tr>
- <td><foo>body of foo</foo></td>
- <td>${fn:escapeXml("<foo>body of foo</foo>")}</td>
- </tr>
- <tr>
- <td>null</td>
- <td> ${fn:escapeXml(undefined)}</td>
- </tr>
- <tr>
- <td>empty string</td>
- <td> ${fn:escapeXml("")}</td>
- </tr>
+ <tr>
+ <th align="left">Input String</th>
+ <th>Result</th>
+ </tr>
+ <tr>
+ <td>${s1}</td>
+ <td>${fn:escapeXml(s1)}</td>
+ </tr>
+ <tr>
+ <td>
+ <foo>body of foo</foo>
+ </td>
+ <td>${fn:escapeXml("<foo>body of foo</foo>")}</td>
+ </tr>
+ <tr>
+ <td>null</td>
+ <td> ${fn:escapeXml(undefined)}</td>
+ </tr>
+ <tr>
+ <td>empty string</td>
+ <td> ${fn:escapeXml("")}</td>
+ </tr>
</table>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/functions/Length.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/functions/Length.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/functions/Length.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/functions/Length.jsp Sat Nov 20 18:34:03 2010
@@ -3,7 +3,7 @@
<html>
<head>
- <title>JSTL Functions • Length</title>
+ <title>JSTL Functions • Length</title>
</head>
<body bgcolor="#FFFFFF">
@@ -11,26 +11,26 @@
<h4>fn:length</h4>
<table cellpadding="5" border="1">
- <tr>
- <th align="left">Input String</th>
- <th>Result</th>
- </tr>
- <tr>
- <td>${s1}</td>
- <td>${fn:length(s1)}</td>
- </tr>
- <tr>
- <td>${customers}</td>
- <td>${fn:length(customers)}</td>
- </tr>
- <tr>
- <td>null</td>
- <td>${fn:length(undefined)}</td>
- </tr>
- <tr>
- <td>empty string</td>
- <td>${fn:length("")}</td>
- </tr>
+ <tr>
+ <th align="left">Input String</th>
+ <th>Result</th>
+ </tr>
+ <tr>
+ <td>${s1}</td>
+ <td>${fn:length(s1)}</td>
+ </tr>
+ <tr>
+ <td>${customers}</td>
+ <td>${fn:length(customers)}</td>
+ </tr>
+ <tr>
+ <td>null</td>
+ <td>${fn:length(undefined)}</td>
+ </tr>
+ <tr>
+ <td>empty string</td>
+ <td>${fn:length("")}</td>
+ </tr>
</table>
</body>
Modified: tomcat/taglibs/standard/trunk/examples/web/functions/Replace.jsp
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/examples/web/functions/Replace.jsp?rev=1037291&r1=1037290&r2=1037291&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/examples/web/functions/Replace.jsp (original)
+++ tomcat/taglibs/standard/trunk/examples/web/functions/Replace.jsp Sat Nov 20 18:34:03 2010
@@ -3,7 +3,7 @@
<html>
<head>
- <title>JSTL Functions • Replace</title>
+ <title>JSTL Functions • Replace</title>
</head>
<body bgcolor="#FFFFFF">
@@ -13,42 +13,42 @@
<c:set var="s2" value="one - two - three - one - two - three - one - two - three"/>
<h4>fn:replace</h4>
<table cellpadding="5" border="1">
- <tr>
- <th align="left">Input String</th>
- <th>Substring Before</th>
- <th>Substring After</th>
- <th>Result</th>
- </tr>
- <tr>
- <td>${s1}</td>
- <td>e</td>
- <td>*</td>
- <td>${fn:replace(s1, "e", "*")}</td>
- </tr>
- <tr>
- <td>${s2}</td>
- <td>-</td>
- <td>•</td>
- <td>${fn:replace(s2, "-", "•")}</td>
- </tr>
- <tr>
- <td>${s2}</td>
- <td>two</td>
- <td>empty</td>
- <td>${fn:replace(s2, "two", "")}</td>
- </tr>
- <tr>
- <td>${s2}</td>
- <td>empty string</td>
- <td>one</td>
- <td>${fn:replace(s2, "", "one")}</td>
- </tr>
- <tr>
- <td>null</td>
- <td>one</td>
- <td>two</td>
- <td> ${fn:replace(undefined, "one", "two")}</td>
- </tr>
+ <tr>
+ <th align="left">Input String</th>
+ <th>Substring Before</th>
+ <th>Substring After</th>
+ <th>Result</th>
+ </tr>
+ <tr>
+ <td>${s1}</td>
+ <td>e</td>
+ <td>*</td>
+ <td>${fn:replace(s1, "e", "*")}</td>
+ </tr>
+ <tr>
+ <td>${s2}</td>
+ <td>-</td>
+ <td>•</td>
+ <td>${fn:replace(s2, "-", "•")}</td>
+ </tr>
+ <tr>
+ <td>${s2}</td>
+ <td>two</td>
+ <td>empty</td>
+ <td>${fn:replace(s2, "two", "")}</td>
+ </tr>
+ <tr>
+ <td>${s2}</td>
+ <td>empty string</td>
+ <td>one</td>
+ <td>${fn:replace(s2, "", "one")}</td>
+ </tr>
+ <tr>
+ <td>null</td>
+ <td>one</td>
+ <td>two</td>
+ <td> ${fn:replace(undefined, "one", "two")}</td>
+ </tr>
</table>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org