home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / implicit-objects.jsp < prev    next >
Encoding:
Text File  |  2004-08-28  |  2.9 KB  |  87 lines

  1. <!--
  2.   Copyright 2004 The Apache Software Foundation
  3.  
  4.   Licensed under the Apache License, Version 2.0 (the "License");
  5.   you may not use this file except in compliance with the License.
  6.   You may obtain a copy of the License at
  7.  
  8.       http://www.apache.org/licenses/LICENSE-2.0
  9.  
  10.   Unless required by applicable law or agreed to in writing, software
  11.   distributed under the License is distributed on an "AS IS" BASIS,
  12.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.   See the License for the specific language governing permissions and
  14.   limitations under the License.
  15. -->
  16. <html>
  17.   <head>
  18.     <title>JSP 2.0 Expression Language - Implicit Objects</title>
  19.   </head>
  20.   <body>
  21.     <h1>JSP 2.0 Expression Language - Implicit Objects</h1>
  22.     <hr>
  23.     This example illustrates some of the implicit objects available 
  24.     in the Expression Lanaguage.  The following implicit objects are 
  25.     available (not all illustrated here):
  26.     <ul>
  27.       <li>pageContext - the PageContext object</li>
  28.       <li>pageScope - a Map that maps page-scoped attribute names to 
  29.           their values</li>
  30.       <li>requestScope - a Map that maps request-scoped attribute names 
  31.           to their values</li>
  32.       <li>sessionScope - a Map that maps session-scoped attribute names 
  33.           to their values</li>
  34.       <li>applicationScope - a Map that maps application-scoped attribute 
  35.           names to their values</li>
  36.       <li>param - a Map that maps parameter names to a single String 
  37.           parameter value</li>
  38.       <li>paramValues - a Map that maps parameter names to a String[] of 
  39.           all values for that parameter</li>
  40.       <li>header - a Map that maps header names to a single String 
  41.           header value</li>
  42.       <li>headerValues - a Map that maps header names to a String[] of 
  43.           all values for that header</li>
  44.       <li>initParam - a Map that maps context initialization parameter 
  45.           names to their String parameter value</li>
  46.       <li>cookie - a Map that maps cookie names to a single Cookie object.</li>
  47.     </ul>
  48.  
  49.     <blockquote>
  50.       <u><b>Change Parameter</b></u>
  51.       <form action="implicit-objects.jsp" method="GET">
  52.       foo = <input type="text" name="foo" value="${param["foo"]}">
  53.           <input type="submit">
  54.       </form>
  55.       <br>
  56.       <code>
  57.         <table border="1">
  58.           <thead>
  59.         <td><b>EL Expression</b></td>
  60.         <td><b>Result</b></td>
  61.       </thead>
  62.       <tr>
  63.         <td>\${param.foo}</td>
  64.         <td>${param.foo} </td>
  65.       </tr>
  66.       <tr>
  67.         <td>\${param["foo"]}</td>
  68.         <td>${param["foo"]} </td>
  69.       </tr>
  70.       <tr>
  71.         <td>\${header["host"]}</td>
  72.         <td>${header["host"]}</td>
  73.       </tr>
  74.       <tr>
  75.         <td>\${header["accept"]}</td>
  76.         <td>${header["accept"]}</td>
  77.       </tr>
  78.       <tr>
  79.         <td>\${header["user-agent"]}</td>
  80.         <td>${header["user-agent"]}</td>
  81.       </tr>
  82.     </table>
  83.       </code>
  84.     </blockquote>
  85.   </body>
  86. </html>
  87.