jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-taglibs/jsptl/examples/web/format Exception.jsp FormatDateTime.jsp FormatNumber.jsp GermanLocale.jsp ItalianLocale.jsp MessageFormat.jsp MissingResourceBundle.jsp ParametricReplacement.jsp PrefixAttribute.jsp ThrowException.jsp UndefinedKey.jsp index.html
Date Wed, 21 Nov 2001 03:02:57 GMT
luehe       01/11/20 19:02:57

  Added:       jsptl/examples/web/format Exception.jsp FormatDateTime.jsp
                        FormatNumber.jsp GermanLocale.jsp ItalianLocale.jsp
                        MessageFormat.jsp MissingResourceBundle.jsp
                        ParametricReplacement.jsp PrefixAttribute.jsp
                        ThrowException.jsp UndefinedKey.jsp index.html
  Removed:     jsptl/examples/web/i18n Exception.jsp Message.jsp
                        MessageFormat.jsp ThrowException.jsp
               jsptl/examples/web/formatting FormatDateTime.jsp
                        FormatNumber.jsp
  Log:
  [i18n] Normalized examples
  
  Revision  Changes    Path
  1.1                  jakarta-taglibs/jsptl/examples/web/format/Exception.jsp
  
  Index: Exception.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: I18N Support -- Exception Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  
  <%@ page isErrorPage="true" %>
  Looking up exception's fully qualified class name in resource bundle:<br>
  <jx:locale value="de"/>
  <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources" var="deBundle"/>
  <ul>
   <li> Localized exception message:<br>
    <jx:exception bundle="$deBundle"/>
   <li> Localized exception message plus stack trace:<br>
    <jx:exception bundle="$deBundle" stackTrace="true"/>
  </ul>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/FormatDateTime.jsp
  
  Index: FormatDateTime.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting Support -- Date and Time Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Formatting Dates and Times</h3>
  
  <ul>
   <li> Formatting current date as &quot;GMT&quot;: 
    <jx:timeZone value="GMT">
     <jx:formatDate type="both"/>
    </jx:timeZone>
  
   <li> Formatting current date as &quot;GMT+1:00&quot;, and parse
        its date and time components:<br>
    <jx:timeZone value="GMT+1:00"/>
    <jx:formatDate type="both" dateStyle="long" timeStyle="long" var="formattedDate"/>
    <jx:parseDate value="$formattedDate" type="both" var="parsedDate"/>
    Parsed date: <jx:formatDate value="$parsedDate" type="date"/><br>
    Parsed time: <jx:formatDate value="$parsedDate" type="time"/>
  </ul>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/FormatNumber.jsp
  
  Index: FormatNumber.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting Support -- Number, Currency, and Percent Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Formatting Numbers, Currencies, and Percentages</h3>
  
  <ul>
   <li> Format as number: 
    <jx:formatNumber value="123456789"/>
  
   <li> Format as currency: 
    <jx:formatNumber value="123456789" type="currency"/>
  
   <li> Format as percentage: 
    <jx:formatNumber value="123456789" type="percent"/>
  
   <li> Format as currency, parse, and print parsed result: 
    <jx:formatNumber value="123456789" type="currency" var="cur"/>
    <jx:parseNumber value="$cur" type="currency"/>
  </ul>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/GermanLocale.jsp
  
  Index: GermanLocale.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- German Locale Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>German Locale</h3>
  
  <jx:locale value="de"/>
  <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources">
   <jx:message key="greetingMorning"/>
  </jx:bundle>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/ItalianLocale.jsp
  
  Index: ItalianLocale.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- Italian Locale Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Italian Locale</h3>
  
  <jx:locale value="it"/>
  <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources" var="itBundle"
scope="page"/>
  <jx:message key="greetingMorning" bundle="$itBundle"/>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/MessageFormat.jsp
  
  Index: MessageFormat.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- MessageFormat Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>MessageFormat</h3>
  
  <jx:formatDate type="both" var="currentDateString"/>
  <jx:parseDate value="$currentDateString" type="both" var="currentDate"/>
  
  <ul>
   <li> String argument:<br>
    <jx:messageFormat value="Current time: {0}">
     <jx:messageArg value="$currentDateString"/>
    </jx:messageFormat>
   
   <li> <tt>java.util.Date</tt> argument:<br>
    <jx:messageFormat value="Current time: {0}">
     <jx:messageArg value="$currentDate"/>
    </jx:messageFormat>
  
   <li> Using &lt;messageArg&gt; body:<br>
    <jx:messageFormat value="Current time: {0{">
     <jx:messageArg>
      <jx:formatDate type="both"/>
     </jx:messageArg>
    </jx:messageFormat>
  </ul>
  
  </ul>
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/MissingResourceBundle.jsp
  
  Index: MissingResourceBundle.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- Missing Resource Bundle Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Missing Resource Bundle</h3>
  
  <ul>
   <li> Implicit collaboration with &lt;bundle&gt; (via ancestry chain):<br>
    <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources">
     <jx:message key="greetingMorning"/>
    </jx:bundle>
  
   <li> Explicit collaboration with &lt;bundle&gt; (via <tt>var</tt>
attribute):<br>
    <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources" var="enBundle"/>
    <jx:message key="greetingEvening" bundle="$enBundle"/>
  </ul>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/ParametricReplacement.jsp
  
  Index: ParametricReplacement.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- Parametric Replacement Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Parametric Replacement</h3>
  
  <jx:locale value="de"/>
  <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources" var="deBundle"/>
  <jx:formatDate type="both" var="currentDateString"/>
  <jx:parseDate value="$currentDateString" type="both" var="currentDate"/>
  <ul>
   <li> String argument:<br>
    <jx:message key="currentTime" bundle="$deBundle">
     <jx:messageArg value="$currentDateString"/>
    </jx:message>
   
   <li> <tt>java.util.Date</tt> argument:<br>
    <jx:message key="currentTime" bundle="$deBundle">
     <jx:messageArg value="$currentDate"/>
    </jx:message>
  
   <li> Using &lt;messageArg&gt; body:<br>
    <jx:message key="currentTime" bundle="$deBundle">
     <jx:messageArg>
      <jx:formatDate type="both"/>
     </jx:messageArg>
    </jx:message>
  </ul>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/PrefixAttribute.jsp
  
  Index: PrefixAttribute.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- Prefix Attribute Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Prefix Attribute</h3>
  
  <jx:locale value="de"/>
  <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources" prefix="com.acme.labels.">
   <jx:message key="cancel"/>
  </jx:bundle>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/ThrowException.jsp
  
  Index: ThrowException.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>Throw Exception</title>
  </head>
  <body bgcolor="#FFFFFF">
  
  <%@ page errorPage="Exception.jsp" %>
  <%-- throws java.lang.ArithmeticException: / by zero --%>
  <%
  int i = 5/0;
  %>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/UndefinedKey.jsp
  
  Index: UndefinedKey.jsp
  ===================================================================
  <%@ taglib prefix="jx" uri="http://java.sun.com/jsptl/ea/jx" %>
  
  <html>
  <head>
    <title>JSPTL: Formatting/I18N Support -- Undefined Key Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Undefined Key</h3>
  
  <jx:locale value="it"/>
  <jx:bundle basename="org.apache.taglibs.jsptl.examples.i18n.Resources" var="itBundle"/>
  <jx:message key="invalidKey" bundle="$itBundle"/>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/jsptl/examples/web/format/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <!-- #BeginTemplate "/web/Templates/ExamplesTemplate.dwt" --> 
  <head>
  <!-- #BeginEditable "doctitle" --> 
  <title>JSPTL: EcmaScript 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">
  <script language="JavaScript">
  <!--
  function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
  }
  //-->
  </script>
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
  <table width="100%" border="0" cellpadding="5">
    <tr> 
      <td height="0"><font size="-1" color="#000099"><b>JSPTL Early Access</b></font></td>
      <td align="center" height="0"><font size="-1" color="#000099"> <b>Beware
&#151; 
        API and Tags may/will change</b></font></td>
      <td align="right" height="0"><font size="-1" color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>

        &nbsp;&nbsp;<b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>&nbsp;&nbsp;

        <a href="mailto:jsr052-comments@sun.com">comments to JSR052 EG</a></b></font></td>
    </tr>
    <tr> 
      <td colspan="3" bgcolor="#CCCCFF"><font color="#CCFF00"><b><font
color="#000099">JSPTL 
        Examples</font><font color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;<a
href="../index.html">Introduction</a> 
        &#149; <a href="../iterators/index.html">Iterators</a> &#149;
<a href="../conditionals/index.html">Conditionals</a> 
        &#149; <a href="../elsupport/index.html">EL Support </a></font><font
color="#CCFF00"><b><font color="#FFFFFF">&#149; 
        <a href="../misc/index.html">Misc</a></font></b></font><font
color="#FFFFFF">
        &#149; <a href="../ecmascript/index.html">EcmaScript</a>
        &#149; <a href="index.html">Import</a></font></b></font></td>
    </tr>
  </table>
  
  <!-- #BeginEditable "body" --> 
  <h2>Formatting/I18N Tags Examples</h2>
  
  <h3>German&nbsp;&nbsp; <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&nbsp;&nbsp; <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&nbsp;&nbsp; <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&nbsp;&nbsp; <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&nbsp;&nbsp; <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>MessageFormat&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/format/MessageFormat.jsp"><img
src="../images/code.gif" width="24" height="24" border="0"></a> 
    <a href="MessageFormat.jsp"><img src="../images/execute.gif" width="24" height="24"
border="0"></a> 
  </h3>
  Message formatting examples.
  <br>
  
  <h3>Prefix&nbsp;&nbsp; <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&nbsp;&nbsp; <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.
  <br>
  
  <h3>Number&nbsp;&nbsp; <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.
  <br>
  
  <h3>Exception&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/format/ThrowException.jsp"><img
src="../images/code.gif" width="24" height="24" border="0"></a> 
    <a href="ThrowException.jsp"><img src="../images/execute.gif" width="24" height="24"
border="0"></a> 
  </h3>
  Formatting error page exception.
  <br>
  
  <!-- #EndEditable --> 
  
  <hr noshade color="#000099">
  <table width="100%" border="0" cellpadding="5">
    <tr> 
      <td height="24"><font size="-1" color="#000099"><b>JSPTL Early Access</b></font></td>
      <td align="center" height="24"><font size="-1" color="#000099"> <b>Beware

        &#151; API and Tags may/will change</b></font></td>
      <td align="right" height="24"><font size="-1" color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a>

        <b>&nbsp;&nbsp; <a href="mailto:taglibs-dev@jakarta.apache.org">development</a>

        &nbsp;&nbsp;<a href="mailto:jsr052-comments@sun.com">comments to JSR052

        EG</a></b></font></td>
    </tr>
  </table>
  </body>
  <!-- #EndTemplate -->
  </html>
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message