tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-servletapi-5/jsr152/examples/jsp2/el basic-arithmetic.jsp basic-arithmetic.txt basic-comparisons.jsp basic-comparisons.txt functions.jsp functions.txt implicit-objects.jsp implicit-objects.txt
Date Fri, 21 Mar 2003 00:54:06 GMT
kinman      2003/03/20 16:54:06

  Modified:    jsr152/examples/jsp2/el basic-arithmetic.jsp
                        basic-arithmetic.txt basic-comparisons.jsp
                        basic-comparisons.txt functions.jsp functions.txt
                        implicit-objects.jsp implicit-objects.txt
  Log:
  - patch by Mark Roth
  
  Quick patch to improve JSP 2.0 EL examples:
  
       * Added example of conditional operator ${(1==2) ? 3 : 4}
         Commented out, since this is not yet implemented.
       * Changed quoting from old-style ${'${'} 1 + 2 }
         to new-style \${ 1 + 2 }
  
  Revision  Changes    Path
  1.2       +17 -11    jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-arithmetic.jsp
  
  Index: basic-arithmetic.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-arithmetic.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- basic-arithmetic.jsp	7 Sep 2002 00:47:59 -0000	1.1
  +++ basic-arithmetic.jsp	21 Mar 2003 00:54:06 -0000	1.2
  @@ -18,49 +18,55 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}1}</td>
  +	    <td>\${1}</td>
   	    <td>${1}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 + 2}</td>
  +	    <td>\${1 + 2}</td>
   	    <td>${1 + 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1.2 + 2.3}</td>
  +	    <td>\${1.2 + 2.3}</td>
   	    <td>${1.2 + 2.3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1.2E4 + 1.4}</td>
  +	    <td>\${1.2E4 + 1.4}</td>
   	    <td>${1.2E4 + 1.4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}-4 - 2}</td>
  +	    <td>\${-4 - 2}</td>
   	    <td>${-4 - 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}21 * 2}</td>
  +	    <td>\${21 * 2}</td>
   	    <td>${21 * 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}3/4}</td>
  +	    <td>\${3/4}</td>
   	    <td>${3/4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}3 div 4}</td>
  +	    <td>\${3 div 4}</td>
   	    <td>${3 div 4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}3/0}</td>
  +	    <td>\${3/0}</td>
   	    <td>${3/0}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}10%4}</td>
  +	    <td>\${10%4}</td>
   	    <td>${10%4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}10 mod 4}</td>
  +	    <td>\${10 mod 4}</td>
   	    <td>${10 mod 4}</td>
   	  </tr>
  +<%-- XXX - NOT YET IMPLEMENTED
  +          <tr>
  +            <td>\${(1==2) ? 3 : 4}</td>
  +            <td>${(1==2) ? 3 : 4}</td>
  +          </tr>
  +--%>
   	</table>
         </code>
       </blockquote>
  
  
  
  1.2       +17 -11    jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-arithmetic.txt
  
  Index: basic-arithmetic.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-arithmetic.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- basic-arithmetic.txt	7 Sep 2002 00:47:59 -0000	1.1
  +++ basic-arithmetic.txt	21 Mar 2003 00:54:06 -0000	1.2
  @@ -18,49 +18,55 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}1}</td>
  +	    <td>\${1}</td>
   	    <td>${1}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 + 2}</td>
  +	    <td>\${1 + 2}</td>
   	    <td>${1 + 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1.2 + 2.3}</td>
  +	    <td>\${1.2 + 2.3}</td>
   	    <td>${1.2 + 2.3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1.2E4 + 1.4}</td>
  +	    <td>\${1.2E4 + 1.4}</td>
   	    <td>${1.2E4 + 1.4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}-4 - 2}</td>
  +	    <td>\${-4 - 2}</td>
   	    <td>${-4 - 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}21 * 2}</td>
  +	    <td>\${21 * 2}</td>
   	    <td>${21 * 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}3/4}</td>
  +	    <td>\${3/4}</td>
   	    <td>${3/4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}3 div 4}</td>
  +	    <td>\${3 div 4}</td>
   	    <td>${3 div 4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}3/0}</td>
  +	    <td>\${3/0}</td>
   	    <td>${3/0}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}10%4}</td>
  +	    <td>\${10%4}</td>
   	    <td>${10%4}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}10 mod 4}</td>
  +	    <td>\${10 mod 4}</td>
   	    <td>${10 mod 4}</td>
   	  </tr>
  +<%-- XXX - NOT YET IMPLEMENTED
  +          <tr>
  +            <td>\${(1==2) ? 3 : 4}</td>
  +            <td>${(1==2) ? 3 : 4}</td>
  +          </tr>
  +--%>
   	</table>
         </code>
       </blockquote>
  
  
  
  1.2       +15 -15    jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-comparisons.jsp
  
  Index: basic-comparisons.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-comparisons.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- basic-comparisons.jsp	7 Sep 2002 00:47:59 -0000	1.1
  +++ basic-comparisons.jsp	21 Mar 2003 00:54:06 -0000	1.2
  @@ -24,51 +24,51 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}1 &lt; 2}</td>
  +	    <td>\${1 &lt; 2}</td>
   	    <td>${1 < 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 lt 2}</td>
  +	    <td>\${1 lt 2}</td>
   	    <td>${1 lt 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 &gt; (4/2)}</td>
  +	    <td>\${1 &gt; (4/2)}</td>
   	    <td>${1 > (4/2)}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 > (4/2)}</td>
  +	    <td>\${1 &gt; (4/2)}</td>
   	    <td>${1 > (4/2)}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4.0 &gt;= 3}</td>
  +	    <td>\${4.0 &gt;= 3}</td>
   	    <td>${4.0 >= 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4.0 ge 3}</td>
  +	    <td>\${4.0 ge 3}</td>
   	    <td>${4.0 ge 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4 &lt;= 3}</td>
  +	    <td>\${4 &lt;= 3}</td>
   	    <td>${4 <= 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4 le 3}</td>
  +	    <td>\${4 le 3}</td>
   	    <td>${4 le 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}100.0 == 100}</td>
  +	    <td>\${100.0 == 100}</td>
   	    <td>${100.0 == 100}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}100.0 eq 100}</td>
  +	    <td>\${100.0 eq 100}</td>
   	    <td>${100.0 eq 100}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}(10*10) != 100}</td>
  +	    <td>\${(10*10) != 100}</td>
   	    <td>${(10*10) != 100}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}(10*10) ne 100}</td>
  +	    <td>\${(10*10) ne 100}</td>
   	    <td>${(10*10) ne 100}</td>
   	  </tr>
   	</table>
  @@ -82,15 +82,15 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}'a' < 'b'}</td>
  +	    <td>\${'a' &lt; 'b'}</td>
   	    <td>${'a' < 'b'}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}'hip' > 'hit'}</td>
  +	    <td>\${'hip' &gt; 'hit'}</td>
   	    <td>${'hip' > 'hit'}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}'4' > 3}</td>
  +	    <td>\${'4' &gt; 3}</td>
   	    <td>${'4' > 3}</td>
   	  </tr>
   	</table>
  
  
  
  1.2       +15 -15    jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-comparisons.txt
  
  Index: basic-comparisons.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-comparisons.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- basic-comparisons.txt	7 Sep 2002 00:47:59 -0000	1.1
  +++ basic-comparisons.txt	21 Mar 2003 00:54:06 -0000	1.2
  @@ -24,51 +24,51 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}1 &lt; 2}</td>
  +	    <td>\${1 &lt; 2}</td>
   	    <td>${1 < 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 lt 2}</td>
  +	    <td>\${1 lt 2}</td>
   	    <td>${1 lt 2}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 &gt; (4/2)}</td>
  +	    <td>\${1 &gt; (4/2)}</td>
   	    <td>${1 > (4/2)}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}1 > (4/2)}</td>
  +	    <td>\${1 &gt; (4/2)}</td>
   	    <td>${1 > (4/2)}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4.0 &gt;= 3}</td>
  +	    <td>\${4.0 &gt;= 3}</td>
   	    <td>${4.0 >= 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4.0 ge 3}</td>
  +	    <td>\${4.0 ge 3}</td>
   	    <td>${4.0 ge 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4 &lt;= 3}</td>
  +	    <td>\${4 &lt;= 3}</td>
   	    <td>${4 <= 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}4 le 3}</td>
  +	    <td>\${4 le 3}</td>
   	    <td>${4 le 3}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}100.0 == 100}</td>
  +	    <td>\${100.0 == 100}</td>
   	    <td>${100.0 == 100}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}100.0 eq 100}</td>
  +	    <td>\${100.0 eq 100}</td>
   	    <td>${100.0 eq 100}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}(10*10) != 100}</td>
  +	    <td>\${(10*10) != 100}</td>
   	    <td>${(10*10) != 100}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}(10*10) ne 100}</td>
  +	    <td>\${(10*10) ne 100}</td>
   	    <td>${(10*10) ne 100}</td>
   	  </tr>
   	</table>
  @@ -82,15 +82,15 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}'a' < 'b'}</td>
  +	    <td>\${'a' &lt; 'b'}</td>
   	    <td>${'a' < 'b'}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}'hip' > 'hit'}</td>
  +	    <td>\${'hip' &gt; 'hit'}</td>
   	    <td>${'hip' > 'hit'}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}'4' > 3}</td>
  +	    <td>\${'4' &gt; 3}</td>
   	    <td>${'4' > 3}</td>
   	  </tr>
   	</table>
  
  
  
  1.2       +4 -4      jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.jsp
  
  Index: functions.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- functions.jsp	7 Sep 2002 00:47:59 -0000	1.1
  +++ functions.jsp	21 Mar 2003 00:54:06 -0000	1.2
  @@ -26,19 +26,19 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}param["foo"]}</td>
  +	    <td>\${param["foo"]}</td>
   	    <td>${param["foo"]}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}my:reverse(param["foo"])}</td>
  +	    <td>\${my:reverse(param["foo"])}</td>
   	    <td>${my:reverse(param["foo"])}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}my:reverse(my:reverse(param["foo"]))}</td>
  +	    <td>\${my:reverse(my:reverse(param["foo"]))}</td>
   	    <td>${my:reverse(my:reverse(param["foo"]))}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}my:countVowels(param["foo"])}</td>
  +	    <td>\${my:countVowels(param["foo"])}</td>
   	    <td>${my:countVowels(param["foo"])}&nbsp;</td>
   	  </tr>
   	</table>
  
  
  
  1.2       +4 -4      jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.txt
  
  Index: functions.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- functions.txt	7 Sep 2002 00:47:59 -0000	1.1
  +++ functions.txt	21 Mar 2003 00:54:06 -0000	1.2
  @@ -26,19 +26,19 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}param["foo"]}</td>
  +	    <td>\${param["foo"]}</td>
   	    <td>${param["foo"]}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}my:reverse(param["foo"])}</td>
  +	    <td>\${my:reverse(param["foo"])}</td>
   	    <td>${my:reverse(param["foo"])}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}my:reverse(my:reverse(param["foo"]))}</td>
  +	    <td>\${my:reverse(my:reverse(param["foo"]))}</td>
   	    <td>${my:reverse(my:reverse(param["foo"]))}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}my:countVowels(param["foo"])}</td>
  +	    <td>\${my:countVowels(param["foo"])}</td>
   	    <td>${my:countVowels(param["foo"])}&nbsp;</td>
   	  </tr>
   	</table>
  
  
  
  1.2       +5 -5      jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.jsp
  
  Index: implicit-objects.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- implicit-objects.jsp	7 Sep 2002 00:47:59 -0000	1.1
  +++ implicit-objects.jsp	21 Mar 2003 00:54:06 -0000	1.2
  @@ -45,23 +45,23 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}param.foo}</td>
  +	    <td>\${param.foo}</td>
   	    <td>${param.foo}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}param["foo"]}</td>
  +	    <td>\${param["foo"]}</td>
   	    <td>${param["foo"]}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}header["host"]}</td>
  +	    <td>\${header["host"]}</td>
   	    <td>${header["host"]}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}header["accept"]}</td>
  +	    <td>\${header["accept"]}</td>
   	    <td>${header["accept"]}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}header["user-agent"]}</td>
  +	    <td>\${header["user-agent"]}</td>
   	    <td>${header["user-agent"]}</td>
   	  </tr>
   	</table>
  
  
  
  1.2       +5 -5      jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.txt
  
  Index: implicit-objects.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- implicit-objects.txt	7 Sep 2002 00:47:59 -0000	1.1
  +++ implicit-objects.txt	21 Mar 2003 00:54:06 -0000	1.2
  @@ -45,23 +45,23 @@
   	    <td><b>Result</b></td>
   	  </thead>
   	  <tr>
  -	    <td>${'${'}param.foo}</td>
  +	    <td>\${param.foo}</td>
   	    <td>${param.foo}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}param["foo"]}</td>
  +	    <td>\${param["foo"]}</td>
   	    <td>${param["foo"]}&nbsp;</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}header["host"]}</td>
  +	    <td>\${header["host"]}</td>
   	    <td>${header["host"]}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}header["accept"]}</td>
  +	    <td>\${header["accept"]}</td>
   	    <td>${header["accept"]}</td>
   	  </tr>
   	  <tr>
  -	    <td>${'${'}header["user-agent"]}</td>
  +	    <td>\${header["user-agent"]}</td>
   	    <td>${header["user-agent"]}</td>
   	  </tr>
   	</table>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message