You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by lu...@apache.org on 2002/01/04 23:23:23 UTC

cvs commit: jakarta-taglibs/standard/examples/web/format GermanUmlautCorrect.jsp GermanUmlautIncorrect.jsp RequestEncoding.jsp index.html

luehe       02/01/04 14:23:23

  Modified:    standard/examples/web/format index.html
  Added:       standard/examples/web/format GermanUmlautCorrect.jsp
                        GermanUmlautIncorrect.jsp RequestEncoding.jsp
  Log:
  Added example for <requestEncoding> tag which showcases the (in)correct decoding of German Umlaut characters sent as request parameters
  
  Revision  Changes    Path
  1.10      +5 -1      jakarta-taglibs/standard/examples/web/format/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/format/index.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- index.html	2 Jan 2002 18:49:29 -0000	1.9
  +++ index.html	4 Jan 2002 22:23:23 -0000	1.10
  @@ -48,7 +48,7 @@
     <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> 
  +<h3>Message Format&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>
  @@ -68,6 +68,10 @@
     <a href="ThrowException.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
   </h3>
   Displaying error page exception in localized format. <br>
  +<h3>Request Parameter Decoding&nbsp;&nbsp; <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">
  
  
  
  1.1                  jakarta-taglibs/standard/examples/web/format/GermanUmlautCorrect.jsp
  
  Index: GermanUmlautCorrect.jsp
  ===================================================================
  <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/ea/fmt" %>
  
  <html>
  <head>
    <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>German Umlaut characters decoded correctly:</h3>
  
  <fmt:requestEncoding value="UTF-8"/>
  
  <ul>
   <li>a umlaut: <%= request.getParameter("a_umlaut") %>
   <li>o umlaut: <%= request.getParameter("o_umlaut") %>
   <li>u umlaut: <%= request.getParameter("u_umlaut") %>
  </ul>
  
  </body>
  </html>
  
  
  1.1                  jakarta-taglibs/standard/examples/web/format/GermanUmlautIncorrect.jsp
  
  Index: GermanUmlautIncorrect.jsp
  ===================================================================
  <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/ea/fmt" %>
  
  <html>
  <head>
    <title>JSTL: Formatting/I18N Support -- Request Encoding Example</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>German Umlaut characters decoded incorrectly:</h3>
  
  <ul>
   <li>a umlaut: <%= request.getParameter("a_umlaut") %>
   <li>o umlaut: <%= request.getParameter("o_umlaut") %>
   <li>u umlaut: <%= request.getParameter("u_umlaut") %>
  </ul>
  
  </body>
  </html>
  
  
  1.1                  jakarta-taglibs/standard/examples/web/format/RequestEncoding.jsp
  
  Index: RequestEncoding.jsp
  ===================================================================
  <html>
  <head>
    <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
  parameter values to each of the linked pages.<br>
  Only one of the linked pages decodes and displays the request parameter values
  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>
  </ul>
  
  </body>
  </html>
  
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>