home *** CD-ROM | disk | FTP | other *** search
Wrap
package org.apache.jsp.jsp2.el; import java.io.IOException; import java.util.List; import java.util.Vector; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.servlet.jsp.JspFactory; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.SkipPageException; import org.apache.jasper.runtime.HttpJspBase; import org.apache.jasper.runtime.JspSourceDependent; import org.apache.jasper.runtime.PageContextImpl; import org.apache.jasper.runtime.ProtectedFunctionMapper; public final class functions_jsp extends HttpJspBase implements JspSourceDependent { private static ProtectedFunctionMapper _jspx_fnmap_0; private static ProtectedFunctionMapper _jspx_fnmap_1; private static Vector _jspx_dependants; // $FF: synthetic field static Class class$jsp2$examples$el$Functions; // $FF: synthetic field static Class class$java$lang$String; public List getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, (String)null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); out.write("<!--\r\n Copyright 2004 The Apache Software Foundation\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n-->\r\n\r\n\r\n<html>\r\n <head>\r\n <title>JSP 2.0 Expression Language - Functions</title>\r\n </head>\r\n <body>\r\n <h1>JSP 2.0 Expression Language - Functions</h1>\r\n <hr>\r\n An upgrade from the JSTL expression language, the JSP 2.0 EL also\r\n allows for simple function invocation. Functions are defined\r\n by tag libraries and are implemented by a Java programmer as \r\n static methods.\r\n\r\n <blockquote>\r\n"); out.write(" <u><b>Change Parameter</b></u>\r\n <form action=\"functions.jsp\" method=\"GET\">\r\n\t foo = <input type=\"text\" name=\"foo\" value=\""); out.write((String)PageContextImpl.proprietaryEvaluate("${param['foo']}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, pageContext, (ProtectedFunctionMapper)null, false)); out.write("\">\r\n <input type=\"submit\">\r\n </form>\r\n <br>\r\n <code>\r\n <table border=\"1\">\r\n <thead>\r\n\t <td><b>EL Expression</b></td>\r\n\t <td><b>Result</b></td>\r\n\t </thead>\r\n\t <tr>\r\n\t <td>${param[\"foo\"]}</td>\r\n\t <td>"); out.write((String)PageContextImpl.proprietaryEvaluate("${param[\"foo\"]}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, pageContext, (ProtectedFunctionMapper)null, false)); out.write(" </td>\r\n\t </tr>\r\n\t <tr>\r\n\t <td>${my:reverse(param[\"foo\"])}</td>\r\n\t <td>"); out.write((String)PageContextImpl.proprietaryEvaluate("${my:reverse(param[\"foo\"])}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, pageContext, _jspx_fnmap_0, false)); out.write(" </td>\r\n\t </tr>\r\n\t <tr>\r\n\t <td>${my:reverse(my:reverse(param[\"foo\"]))}</td>\r\n\t <td>"); out.write((String)PageContextImpl.proprietaryEvaluate("${my:reverse(my:reverse(param[\"foo\"]))}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, pageContext, _jspx_fnmap_0, false)); out.write(" </td>\r\n\t </tr>\r\n\t <tr>\r\n\t <td>${my:countVowels(param[\"foo\"])}</td>\r\n\t <td>"); out.write((String)PageContextImpl.proprietaryEvaluate("${my:countVowels(param[\"foo\"])}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, pageContext, _jspx_fnmap_1, false)); out.write(" </td>\r\n\t </tr>\r\n\t</table>\r\n </code>\r\n </blockquote>\r\n </body>\r\n</html>\r\n\r\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { if (_jspx_out != null && _jspx_out.getBufferSize() != 0) { _jspx_out.clearBuffer(); } if (_jspx_page_context != null) { _jspx_page_context.handlePageException(t); } } } finally { if (_jspxFactory != null) { _jspxFactory.releasePageContext(_jspx_page_context); } } } // $FF: synthetic method static Class class$(String x0) { try { return Class.forName(x0); } catch (ClassNotFoundException x1) { throw new NoClassDefFoundError(x1.getMessage()); } } static { _jspx_fnmap_0 = ProtectedFunctionMapper.getMapForFunction("my:reverse", class$jsp2$examples$el$Functions == null ? (class$jsp2$examples$el$Functions = class$("jsp2.examples.el.Functions")) : class$jsp2$examples$el$Functions, "reverse", new Class[]{class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String}); _jspx_fnmap_1 = ProtectedFunctionMapper.getMapForFunction("my:countVowels", class$jsp2$examples$el$Functions == null ? (class$jsp2$examples$el$Functions = class$("jsp2.examples.el.Functions")) : class$jsp2$examples$el$Functions, "numVowels", new Class[]{class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String}); _jspx_dependants = new Vector(1); _jspx_dependants.add("/WEB-INF/jsp2/jsp2-example-taglib.tld"); } }