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 basic_002dcomparisons_jsp extends org.apache.jasper.runtime.HttpJspBase
008 implements org.apache.jasper.runtime.JspSourceDependent {
009
010 private static java.util.List _jspx_dependants;
011
012 public Object getDependants() {
013 return _jspx_dependants;
014 }
015
016 public void _jspService(HttpServletRequest request, HttpServletResponse response)
017 throws java.io.IOException, ServletException {
018
019 JspFactory _jspxFactory = null;
020 PageContext pageContext = null;
021 HttpSession session = null;
022 ServletContext application = null;
023 ServletConfig config = null;
024 JspWriter out = null;
025 Object page = this;
026 JspWriter _jspx_out = null;
027 PageContext _jspx_page_context = null;
028
029
030 try {
031 _jspxFactory = JspFactory.getDefaultFactory();
032 response.setContentType("text/html");
033 pageContext = _jspxFactory.getPageContext(this, request, response,
034 null, true, 8192, true);
035 _jspx_page_context = pageContext;
036 application = pageContext.getServletContext();
037 config = pageContext.getServletConfig();
038 session = pageContext.getSession();
039 out = pageContext.getOut();
040 _jspx_out = out;
041
042 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<html>\n <head>\n <title>JSP 2.0 Expression Language - Basic Comparisons</title>\n </head>\n <body>\n <h1>JSP 2.0 Expression Language - Basic Comparisons</h1>\n <hr>\n This example illustrates basic Expression Language comparisons.\n");
043 out.write(" The following comparison operators are supported:\n <ul>\n <li>Less-than (< or lt)</li>\n <li>Greater-than (> or gt)</li>\n <li>Less-than-or-equal (<= or le)</li>\n <li>Greater-than-or-equal (>= or ge)</li>\n <li>Equal (== or eq)</li>\n <li>Not Equal (!= or ne)</li>\n </ul>\n <blockquote>\n <u><b>Numeric</b></u>\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>${1 < 2}</td>\n\t <td>");
044 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${1 < 2}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
045 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${1 lt 2}</td>\n\t <td>");
046 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${1 lt 2}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
047 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${1 > (4/2)}</td>\n\t <td>");
048 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${1 > (4/2)}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
049 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${1 > (4/2)}</td>\n\t <td>");
050 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${1 > (4/2)}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
051 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${4.0 >= 3}</td>\n\t <td>");
052 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${4.0 >= 3}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
053 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${4.0 ge 3}</td>\n\t <td>");
054 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${4.0 ge 3}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
055 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${4 <= 3}</td>\n\t <td>");
056 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${4 <= 3}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
057 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${4 le 3}</td>\n\t <td>");
058 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${4 le 3}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
059 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${100.0 == 100}</td>\n\t <td>");
060 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${100.0 == 100}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
061 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${100.0 eq 100}</td>\n\t <td>");
062 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${100.0 eq 100}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
063 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${(10*10) != 100}</td>\n\t <td>");
064 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${(10*10) != 100}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
065 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${(10*10) ne 100}</td>\n\t <td>");
066 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${(10*10) ne 100}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
067 out.write("</td>\n\t </tr>\n\t</table>\n </code>\n <br>\n <u><b>Alphabetic</b></u>\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>${'a' < 'b'}</td>\n\t <td>");
068 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${'a' < 'b'}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
069 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${'hip' > 'hit'}</td>\n\t <td>");
070 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${'hip' > 'hit'}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
071 out.write("</td>\n\t </tr>\n\t <tr>\n\t <td>${'4' > 3}</td>\n\t <td>");
072 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${'4' > 3}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
073 out.write("</td>\n\t </tr>\n\t</table>\n </code>\n </blockquote>\n </body>\n</html>\n");
074 } catch (Throwable t) {
075 if (!(t instanceof SkipPageException)){
076 out = _jspx_out;
077 if (out != null && out.getBufferSize() != 0)
078 out.clearBuffer();
079 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
080 }
081 } finally {
082 if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
083 }
084 }
085 }