001 package jsp.checkbox;
002
003 import javax.servlet.*;
004 import javax.servlet.http.*;
005 import javax.servlet.jsp.*;
006
007 public final class checkresult_jsp extends org.apache.jasper.runtime.HttpJspBase
008 implements org.apache.jasper.runtime.JspSourceDependent {
009
010 String[] fruits;
011 private static java.util.List _jspx_dependants;
012
013 public Object getDependants() {
014 return _jspx_dependants;
015 }
016
017 public void _jspService(HttpServletRequest request, HttpServletResponse response)
018 throws java.io.IOException, ServletException {
019
020 JspFactory _jspxFactory = null;
021 PageContext pageContext = null;
022 HttpSession session = null;
023 ServletContext application = null;
024 ServletConfig config = null;
025 JspWriter out = null;
026 Object page = this;
027 JspWriter _jspx_out = null;
028 PageContext _jspx_page_context = null;
029
030
031 try {
032 _jspxFactory = JspFactory.getDefaultFactory();
033 response.setContentType("text/html");
034 pageContext = _jspxFactory.getPageContext(this, request, response,
035 null, true, 8192, true);
036 _jspx_page_context = pageContext;
037 application = pageContext.getServletContext();
038 config = pageContext.getServletConfig();
039 session = pageContext.getSession();
040 out = pageContext.getOut();
041 _jspx_out = out;
042
043 out.write("<html>\n<!--\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<body bgcolor=\"white\">\n<font size=5 color=\"red\">\n");
044 out.write('\n');
045 checkbox.CheckTest foo = null;
046 synchronized (_jspx_page_context) {
047 foo = (checkbox.CheckTest) _jspx_page_context.getAttribute("foo", PageContext.PAGE_SCOPE);
048 if (foo == null){
049 foo = new checkbox.CheckTest();
050 _jspx_page_context.setAttribute("foo", foo, PageContext.PAGE_SCOPE);
051 }
052 }
053 out.write('\n');
054 out.write('\n');
055 org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(_jspx_page_context.findAttribute("foo"), "fruit", request.getParameter("fruit"), request, "fruit", false);
056 out.write("\n<hr>\nThe checked fruits (got using request) are: <br>\n");
057
058 fruits = request.getParameterValues("fruit");
059
060 out.write("\n<ul>\n");
061
062 if (fruits != null) {
063 for (int i = 0; i < fruits.length; i++) {
064
065 out.write("\n<li>\n");
066
067 out.println (util.HTMLFilter.filter(fruits[i]));
068 }
069 } else out.println ("none selected");
070
071 out.write("\n</ul>\n<br>\n<hr>\n\nThe checked fruits (got using beans) are <br>\n\n");
072
073 fruits = foo.getFruit();
074
075 out.write("\n<ul>\n");
076
077 if (!fruits[0].equals("1")) {
078 for (int i = 0; i < fruits.length; i++) {
079
080 out.write("\n<li>\n");
081
082 out.println (util.HTMLFilter.filter(fruits[i]));
083 }
084 } else out.println ("none selected");
085
086 out.write("\n</ul>\n</font>\n</body>\n</html>\n");
087 } catch (Throwable t) {
088 if (!(t instanceof SkipPageException)){
089 out = _jspx_out;
090 if (out != null && out.getBufferSize() != 0)
091 out.clearBuffer();
092 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
093 }
094 } finally {
095 if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
096 }
097 }
098 }