001 package jsp.jsp2.el;
002
003 import javax.servlet.*;
004 import javax.servlet.http.*;
005 import javax.servlet.jsp.*;
006
007 public final class implicit_002dobjects_jsp extends org.apache.jasper.runtime.HttpJspBase
008 implements org.apache.jasper.runtime.JspSourceDependent {
009
010 static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0;
011
012 static {
013 _jspx_fnmap_0= org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("fn:escapeXml", org.apache.taglibs.standard.functions.Functions.class, "escapeXml", new Class[] {java.lang.String.class});
014 }
015
016 private static java.util.List _jspx_dependants;
017
018 public Object getDependants() {
019 return _jspx_dependants;
020 }
021
022 public void _jspService(HttpServletRequest request, HttpServletResponse response)
023 throws java.io.IOException, ServletException {
024
025 JspFactory _jspxFactory = null;
026 PageContext pageContext = null;
027 HttpSession session = null;
028 ServletContext application = null;
029 ServletConfig config = null;
030 JspWriter out = null;
031 Object page = this;
032 JspWriter _jspx_out = null;
033 PageContext _jspx_page_context = null;
034
035
036 try {
037 _jspxFactory = JspFactory.getDefaultFactory();
038 response.setContentType("text/html");
039 pageContext = _jspxFactory.getPageContext(this, request, response,
040 null, true, 8192, true);
041 _jspx_page_context = pageContext;
042 application = pageContext.getServletContext();
043 config = pageContext.getServletConfig();
044 session = pageContext.getSession();
045 out = pageContext.getOut();
046 _jspx_out = out;
047
048 out.write("<!--\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements. See the NOTICE file distributed with\n this work for additional information regarding copyright ownership.\n The ASF licenses this file to You under the Apache License, Version 2.0\n (the \"License\"); you may not use this file except in compliance with\n the License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n\n\n<html>\n <head>\n <title>JSP 2.0 Expression Language - Implicit Objects</title>\n </head>\n <body>\n <h1>JSP 2.0 Expression Language - Implicit Objects</h1>\n <hr>\n This example illustrates some of the implicit objects available \n");
049 out.write(" in the Expression Lanaguage. The following implicit objects are \n available (not all illustrated here):\n <ul>\n <li>pageContext - the PageContext object</li>\n <li>pageScope - a Map that maps page-scoped attribute names to \n their values</li>\n <li>requestScope - a Map that maps request-scoped attribute names \n to their values</li>\n <li>sessionScope - a Map that maps session-scoped attribute names \n to their values</li>\n <li>applicationScope - a Map that maps application-scoped attribute \n names to their values</li>\n <li>param - a Map that maps parameter names to a single String \n parameter value</li>\n <li>paramValues - a Map that maps parameter names to a String[] of \n all values for that parameter</li>\n <li>header - a Map that maps header names to a single String \n header value</li>\n <li>headerValues - a Map that maps header names to a String[] of \n all values for that header</li>\n <li>initParam - a Map that maps context initialization parameter \n");
050 out.write(" names to their String parameter value</li>\n <li>cookie - a Map that maps cookie names to a single Cookie object.</li>\n </ul>\n\n <blockquote>\n <u><b>Change Parameter</b></u>\n <form action=\"implicit-objects.jsp\" method=\"GET\">\n\t foo = <input type=\"text\" name=\"foo\" value=\"");
051 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(param[\"foo\"])}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false));
052 out.write("\">\n <input type=\"submit\">\n </form>\n <br>\n <code>\n <table border=\"1\">\n <thead>\n\t <td><b>EL Expression</b></td>\n\t <td><b>Result</b></td>\n\t </thead>\n\t <tr>\n\t <td>${param.foo}</td>\n\t <td>");
053 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(param[\"foo\"])}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false));
054 out.write(" </td>\n\t </tr>\n\t <tr>\n\t <td>${param[\"foo\"]}</td>\n\t <td>");
055 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(param[\"foo\"])}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false));
056 out.write(" </td>\n\t </tr>\n\t <tr>\n\t <td>${header[\"host\"]}</td>\n\t <td>");
057 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(header[\"host\"])}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false));
058 out.write(" </td>\n\t </tr>\n\t <tr>\n\t <td>${header[\"accept\"]}</td>\n\t <td>");
059 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(header[\"accept\"])}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false));
060 out.write(" </td>\n\t </tr>\n\t <tr>\n\t <td>${header[\"user-agent\"]}</td>\n\t <td>");
061 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(header[\"user-agent\"])}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false));
062 out.write(" </td>\n\t </tr>\n\t</table>\n </code>\n </blockquote>\n </body>\n</html>\n");
063 } catch (Throwable t) {
064 if (!(t instanceof SkipPageException)){
065 out = _jspx_out;
066 if (out != null && out.getBufferSize() != 0)
067 out.clearBuffer();
068 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
069 }
070 } finally {
071 if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
072 }
073 }
074 }