001 package jsp.tagplugin;
002
003 import javax.servlet.*;
004 import javax.servlet.http.*;
005 import javax.servlet.jsp.*;
006
007 public final class choose_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 private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_forEach_var_end_begin;
013 private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_choose;
014 private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_when_test;
015 private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_otherwise;
016
017 public Object getDependants() {
018 return _jspx_dependants;
019 }
020
021 public void _jspInit() {
022 _jspx_tagPool_c_forEach_var_end_begin = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
023 _jspx_tagPool_c_choose = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
024 _jspx_tagPool_c_when_test = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
025 _jspx_tagPool_c_otherwise = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
026 }
027
028 public void _jspDestroy() {
029 _jspx_tagPool_c_forEach_var_end_begin.release();
030 _jspx_tagPool_c_choose.release();
031 _jspx_tagPool_c_when_test.release();
032 _jspx_tagPool_c_otherwise.release();
033 }
034
035 public void _jspService(HttpServletRequest request, HttpServletResponse response)
036 throws java.io.IOException, ServletException {
037
038 JspFactory _jspxFactory = null;
039 PageContext pageContext = null;
040 HttpSession session = null;
041 ServletContext application = null;
042 ServletConfig config = null;
043 JspWriter out = null;
044 Object page = this;
045 JspWriter _jspx_out = null;
046 PageContext _jspx_page_context = null;
047
048
049 try {
050 _jspxFactory = JspFactory.getDefaultFactory();
051 response.setContentType("text/html");
052 pageContext = _jspxFactory.getPageContext(this, request, response,
053 null, true, 8192, true);
054 _jspx_page_context = pageContext;
055 application = pageContext.getServletContext();
056 config = pageContext.getServletConfig();
057 session = pageContext.getSession();
058 out = pageContext.getOut();
059 _jspx_out = out;
060
061 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>Tag Examples - choose</title>\n </head>\n <body>\n <h1>Tag Plugin Examples - <c:choose></h1>\n\n <hr>\n </br>\n <a href=\"notes.html\">Plugin Introductory Notes<font <font color=\"#0000FF\"></\na>\n <br/>\n");
062 out.write(" <a href=\"howto.html\">Brief Instructions for Writing Plugins<font color=\"#000\n0\nFF\"></a>\n <br/> <br/>\n <hr>\n\n <font color=\"#000000\"/>\n </br>\n\n \n\n ");
063 if (_jspx_meth_c_forEach_0(_jspx_page_context))
064 return;
065 out.write("\n </body>\n</html> \n");
066 } catch (Throwable t) {
067 if (!(t instanceof SkipPageException)){
068 out = _jspx_out;
069 if (out != null && out.getBufferSize() != 0)
070 out.clearBuffer();
071 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
072 }
073 } finally {
074 if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
075 }
076 }
077
078 private boolean _jspx_meth_c_forEach_0(PageContext _jspx_page_context)
079 throws Throwable {
080 PageContext pageContext = _jspx_page_context;
081 JspWriter out = _jspx_page_context.getOut();
082 // c:forEach
083 org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_forEach_0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _jspx_tagPool_c_forEach_var_end_begin.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
084 _jspx_th_c_forEach_0.setPageContext(_jspx_page_context);
085 _jspx_th_c_forEach_0.setParent(null);
086 _jspx_th_c_forEach_0.setVar("index");
087 _jspx_th_c_forEach_0.setBegin(0);
088 _jspx_th_c_forEach_0.setEnd(4);
089 int[] _jspx_push_body_count_c_forEach_0 = new int[] { 0 };
090 try {
091 int _jspx_eval_c_forEach_0 = _jspx_th_c_forEach_0.doStartTag();
092 if (_jspx_eval_c_forEach_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
093 do {
094 out.write("\n # ");
095 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${index}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
096 out.write(": \n ");
097 if (_jspx_meth_c_choose_0(_jspx_th_c_forEach_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
098 return true;
099 out.write("\n ");
100 int evalDoAfterBody = _jspx_th_c_forEach_0.doAfterBody();
101 if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
102 break;
103 } while (true);
104 }
105 if (_jspx_th_c_forEach_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
106 return true;
107 }
108 } catch (Throwable _jspx_exception) {
109 while (_jspx_push_body_count_c_forEach_0[0]-- > 0)
110 out = _jspx_page_context.popBody();
111 _jspx_th_c_forEach_0.doCatch(_jspx_exception);
112 } finally {
113 _jspx_th_c_forEach_0.doFinally();
114 _jspx_tagPool_c_forEach_var_end_begin.reuse(_jspx_th_c_forEach_0);
115 }
116 return false;
117 }
118
119 private boolean _jspx_meth_c_choose_0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_forEach_0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_forEach_0)
120 throws Throwable {
121 PageContext pageContext = _jspx_page_context;
122 JspWriter out = _jspx_page_context.getOut();
123 // c:choose
124 org.apache.taglibs.standard.tag.common.core.ChooseTag _jspx_th_c_choose_0 = (org.apache.taglibs.standard.tag.common.core.ChooseTag) _jspx_tagPool_c_choose.get(org.apache.taglibs.standard.tag.common.core.ChooseTag.class);
125 _jspx_th_c_choose_0.setPageContext(_jspx_page_context);
126 _jspx_th_c_choose_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_forEach_0);
127 int _jspx_eval_c_choose_0 = _jspx_th_c_choose_0.doStartTag();
128 if (_jspx_eval_c_choose_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
129 do {
130 out.write('\n');
131 out.write(' ');
132 if (_jspx_meth_c_when_0(_jspx_th_c_choose_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
133 return true;
134 out.write('\n');
135 out.write(' ');
136 if (_jspx_meth_c_when_1(_jspx_th_c_choose_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
137 return true;
138 out.write('\n');
139 out.write(' ');
140 if (_jspx_meth_c_when_2(_jspx_th_c_choose_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
141 return true;
142 out.write('\n');
143 out.write(' ');
144 if (_jspx_meth_c_otherwise_0(_jspx_th_c_choose_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
145 return true;
146 out.write("\n ");
147 int evalDoAfterBody = _jspx_th_c_choose_0.doAfterBody();
148 if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
149 break;
150 } while (true);
151 }
152 if (_jspx_th_c_choose_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
153 _jspx_tagPool_c_choose.reuse(_jspx_th_c_choose_0);
154 return true;
155 }
156 _jspx_tagPool_c_choose.reuse(_jspx_th_c_choose_0);
157 return false;
158 }
159
160 private boolean _jspx_meth_c_when_0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_choose_0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_forEach_0)
161 throws Throwable {
162 PageContext pageContext = _jspx_page_context;
163 JspWriter out = _jspx_page_context.getOut();
164 // c:when
165 org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_when_0 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _jspx_tagPool_c_when_test.get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class);
166 _jspx_th_c_when_0.setPageContext(_jspx_page_context);
167 _jspx_th_c_when_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_choose_0);
168 _jspx_th_c_when_0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${index == 1}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue());
169 int _jspx_eval_c_when_0 = _jspx_th_c_when_0.doStartTag();
170 if (_jspx_eval_c_when_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
171 do {
172 out.write("\n One!</br>\n\t");
173 int evalDoAfterBody = _jspx_th_c_when_0.doAfterBody();
174 if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
175 break;
176 } while (true);
177 }
178 if (_jspx_th_c_when_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
179 _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_0);
180 return true;
181 }
182 _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_0);
183 return false;
184 }
185
186 private boolean _jspx_meth_c_when_1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_choose_0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_forEach_0)
187 throws Throwable {
188 PageContext pageContext = _jspx_page_context;
189 JspWriter out = _jspx_page_context.getOut();
190 // c:when
191 org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_when_1 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _jspx_tagPool_c_when_test.get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class);
192 _jspx_th_c_when_1.setPageContext(_jspx_page_context);
193 _jspx_th_c_when_1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_choose_0);
194 _jspx_th_c_when_1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${index == 4}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue());
195 int _jspx_eval_c_when_1 = _jspx_th_c_when_1.doStartTag();
196 if (_jspx_eval_c_when_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
197 do {
198 out.write("\n Four!</br>\n\t");
199 int evalDoAfterBody = _jspx_th_c_when_1.doAfterBody();
200 if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
201 break;
202 } while (true);
203 }
204 if (_jspx_th_c_when_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
205 _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_1);
206 return true;
207 }
208 _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_1);
209 return false;
210 }
211
212 private boolean _jspx_meth_c_when_2(javax.servlet.jsp.tagext.JspTag _jspx_th_c_choose_0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_forEach_0)
213 throws Throwable {
214 PageContext pageContext = _jspx_page_context;
215 JspWriter out = _jspx_page_context.getOut();
216 // c:when
217 org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_when_2 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _jspx_tagPool_c_when_test.get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class);
218 _jspx_th_c_when_2.setPageContext(_jspx_page_context);
219 _jspx_th_c_when_2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_choose_0);
220 _jspx_th_c_when_2.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${index == 3}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue());
221 int _jspx_eval_c_when_2 = _jspx_th_c_when_2.doStartTag();
222 if (_jspx_eval_c_when_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
223 do {
224 out.write("\n Three!</br>\n\t");
225 int evalDoAfterBody = _jspx_th_c_when_2.doAfterBody();
226 if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
227 break;
228 } while (true);
229 }
230 if (_jspx_th_c_when_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
231 _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_2);
232 return true;
233 }
234 _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_2);
235 return false;
236 }
237
238 private boolean _jspx_meth_c_otherwise_0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_choose_0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_forEach_0)
239 throws Throwable {
240 PageContext pageContext = _jspx_page_context;
241 JspWriter out = _jspx_page_context.getOut();
242 // c:otherwise
243 org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_otherwise_0 = (org.apache.taglibs.standard.tag.common.core.OtherwiseTag) _jspx_tagPool_c_otherwise.get(org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
244 _jspx_th_c_otherwise_0.setPageContext(_jspx_page_context);
245 _jspx_th_c_otherwise_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_choose_0);
246 int _jspx_eval_c_otherwise_0 = _jspx_th_c_otherwise_0.doStartTag();
247 if (_jspx_eval_c_otherwise_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
248 do {
249 out.write("\n Huh?</br>\n\t");
250 int evalDoAfterBody = _jspx_th_c_otherwise_0.doAfterBody();
251 if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
252 break;
253 } while (true);
254 }
255 if (_jspx_th_c_otherwise_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
256 _jspx_tagPool_c_otherwise.reuse(_jspx_th_c_otherwise_0);
257 return true;
258 }
259 _jspx_tagPool_c_otherwise.reuse(_jspx_th_c_otherwise_0);
260 return false;
261 }
262 }