KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jsp > indexSub_jsp


1 package org.apache.jsp;
2
3 import javax.servlet.*;
4 import javax.servlet.http.*;
5 import javax.servlet.jsp.*;
6 import org.apache.jasper.runtime.*;
7
8 public class indexSub_jsp extends HttpJspBase {
9
10
11   private static java.util.Vector JavaDoc _jspx_includes;
12
13   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_choose;
14   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_when_test;
15   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_redirect_url;
16   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_otherwise;
17   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_import_var_url;
18   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_x_parse_xml_var;
19   private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_x_set_var_select;
20
21   public indexSub_jsp() {
22     _jspx_tagPool_c_choose = new org.apache.jasper.runtime.TagHandlerPool();
23     _jspx_tagPool_c_when_test = new org.apache.jasper.runtime.TagHandlerPool();
24     _jspx_tagPool_c_redirect_url = new org.apache.jasper.runtime.TagHandlerPool();
25     _jspx_tagPool_c_otherwise = new org.apache.jasper.runtime.TagHandlerPool();
26     _jspx_tagPool_c_import_var_url = new org.apache.jasper.runtime.TagHandlerPool();
27     _jspx_tagPool_x_parse_xml_var = new org.apache.jasper.runtime.TagHandlerPool();
28     _jspx_tagPool_x_set_var_select = new org.apache.jasper.runtime.TagHandlerPool();
29   }
30
31   public java.util.List JavaDoc getIncludes() {
32     return _jspx_includes;
33   }
34
35   public void _jspDestroy() {
36     _jspx_tagPool_c_choose.release();
37     _jspx_tagPool_c_when_test.release();
38     _jspx_tagPool_c_redirect_url.release();
39     _jspx_tagPool_c_otherwise.release();
40     _jspx_tagPool_c_import_var_url.release();
41     _jspx_tagPool_x_parse_xml_var.release();
42     _jspx_tagPool_x_set_var_select.release();
43   }
44
45   public void _jspService(HttpServletRequest request, HttpServletResponse response)
46         throws java.io.IOException JavaDoc, ServletException {
47
48     JspFactory _jspxFactory = null;
49     javax.servlet.jsp.PageContext JavaDoc pageContext = null;
50     HttpSession session = null;
51     ServletContext application = null;
52     ServletConfig config = null;
53     JspWriter out = null;
54     Object JavaDoc page = this;
55     JspWriter _jspx_out = null;
56
57
58     try {
59       _jspxFactory = JspFactory.getDefaultFactory();
60       response.setContentType("text/html;charset=ISO-8859-1");
61       pageContext = _jspxFactory.getPageContext(this, request, response,
62                 null, true, 8192, true);
63       application = pageContext.getServletContext();
64       config = pageContext.getServletConfig();
65       session = pageContext.getSession();
66       out = pageContext.getOut();
67       _jspx_out = out;
68
69       out.write("\r\n");
70       out.write("\r\n\r\n");
71       out.write("<!-- cas : -->\r\n");
72       out.write("<!-- 1.l'utilisateur vient juste de se logger, alors -->\r\n");
73       out.write("<!-- on recharge tous les cadres pour rafraichir -->\r\n");
74       out.write("<!-- l'affichage. -->\r\n");
75       out.write("<!-- 2.l'utilisateur n'est pas loggé, alors on redirige -->\r\n");
76       out.write("<!-- vers la page de login. -->\r\n");
77       out.write("<!-- 3.l'utilisateur est loggé, alors on redirige vers -->\r\n");
78       out.write("<!-- la premiére rubrique du menu. -->\r\n");
79       /* ---- c:choose ---- */
80       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);
81       _jspx_th_c_choose_0.setPageContext(pageContext);
82       _jspx_th_c_choose_0.setParent(null);
83       int _jspx_eval_c_choose_0 = _jspx_th_c_choose_0.doStartTag();
84       if (_jspx_eval_c_choose_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
85         do {
86           out.write("\r\n\t");
87           out.write("<!-- cas 1 -->\r\n\t");
88           if (_jspx_meth_c_when_0(_jspx_th_c_choose_0, pageContext))
89             return;
90           out.write("\r\n\t");
91           out.write("<!-- cas 2 -->\r\n\t");
92           if (_jspx_meth_c_when_1(_jspx_th_c_choose_0, pageContext))
93             return;
94           out.write("\r\n\t");
95           out.write("<!-- cas 3 -->\r\n\t");
96           /* ---- c:otherwise ---- */
97           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);
98           _jspx_th_c_otherwise_0.setPageContext(pageContext);
99           _jspx_th_c_otherwise_0.setParent(_jspx_th_c_choose_0);
100           int _jspx_eval_c_otherwise_0 = _jspx_th_c_otherwise_0.doStartTag();
101           if (_jspx_eval_c_otherwise_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
102             do {
103               out.write("\r\n\t\t");
104               out.write("<!-- recherche la page à afficher par defaut dans le menu.xml -->\r\n\t\t");
105               /* ---- c:import ---- */
106               org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 = (org.apache.taglibs.standard.tag.el.core.ImportTag) _jspx_tagPool_c_import_var_url.get(org.apache.taglibs.standard.tag.el.core.ImportTag.class);
107               _jspx_th_c_import_0.setPageContext(pageContext);
108               _jspx_th_c_import_0.setParent(_jspx_th_c_otherwise_0);
109               _jspx_th_c_import_0.setUrl("/xml/menu.xml");
110               _jspx_th_c_import_0.setVar("xml");
111               try {
112                 int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag();
113                 if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
114                   return;
115               } catch (Throwable JavaDoc _jspx_exception) {
116                 _jspx_th_c_import_0.doCatch(_jspx_exception);
117               } finally {
118                 _jspx_th_c_import_0.doFinally();
119                 _jspx_tagPool_c_import_var_url.reuse(_jspx_th_c_import_0);
120               }
121               out.write("\r\n\t\t");
122               /* ---- x:parse ---- */
123               org.apache.taglibs.standard.tag.el.xml.ParseTag _jspx_th_x_parse_0 = (org.apache.taglibs.standard.tag.el.xml.ParseTag) _jspx_tagPool_x_parse_xml_var.get(org.apache.taglibs.standard.tag.el.xml.ParseTag.class);
124               _jspx_th_x_parse_0.setPageContext(pageContext);
125               _jspx_th_x_parse_0.setParent(_jspx_th_c_otherwise_0);
126               _jspx_th_x_parse_0.setXml("${xml}");
127               _jspx_th_x_parse_0.setVar("doc");
128               int _jspx_eval_x_parse_0 = _jspx_th_x_parse_0.doStartTag();
129               if (_jspx_th_x_parse_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
130                 return;
131               _jspx_tagPool_x_parse_xml_var.reuse(_jspx_th_x_parse_0);
132               out.write("\t\t\t\r\n\t\t");
133               if (_jspx_meth_x_set_0(_jspx_th_c_otherwise_0, pageContext))
134                 return;
135               out.write("\r\n\t\t");
136               if (_jspx_meth_c_redirect_1(_jspx_th_c_otherwise_0, pageContext))
137                 return;
138               out.write("\r\n\t");
139               int evalDoAfterBody = _jspx_th_c_otherwise_0.doAfterBody();
140               if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
141                 break;
142             } while (true);
143           }
144           if (_jspx_th_c_otherwise_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
145             return;
146           _jspx_tagPool_c_otherwise.reuse(_jspx_th_c_otherwise_0);
147           out.write("\r\n");
148           int evalDoAfterBody = _jspx_th_c_choose_0.doAfterBody();
149           if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
150             break;
151         } while (true);
152       }
153       if (_jspx_th_c_choose_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
154         return;
155       _jspx_tagPool_c_choose.reuse(_jspx_th_c_choose_0);
156     } catch (Throwable JavaDoc t) {
157       out = _jspx_out;
158       if (out != null && out.getBufferSize() != 0)
159         out.clearBuffer();
160       if (pageContext != null) pageContext.handlePageException(t);
161     } finally {
162       if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
163     }
164   }
165
166   private boolean _jspx_meth_c_when_0(javax.servlet.jsp.tagext.Tag JavaDoc _jspx_th_c_choose_0, javax.servlet.jsp.PageContext JavaDoc pageContext)
167           throws Throwable JavaDoc {
168     JspWriter out = pageContext.getOut();
169     /* ---- c:when ---- */
170     org.apache.taglibs.standard.tag.el.core.WhenTag _jspx_th_c_when_0 = (org.apache.taglibs.standard.tag.el.core.WhenTag) _jspx_tagPool_c_when_test.get(org.apache.taglibs.standard.tag.el.core.WhenTag.class);
171     _jspx_th_c_when_0.setPageContext(pageContext);
172     _jspx_th_c_when_0.setParent(_jspx_th_c_choose_0);
173     _jspx_th_c_when_0.setTest("${reload!=null}");
174     int _jspx_eval_c_when_0 = _jspx_th_c_when_0.doStartTag();
175     if (_jspx_eval_c_when_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
176       do {
177         out.write("\r\n\t\t");
178         out.write("<script language=\"JavaScript\">\r\n\t\t\t// recharge tout le cadre\r\n\t\t\tparent.document.location.reload();\r\n\t\t");
179         out.write("</script>\r\n\t");
180         int evalDoAfterBody = _jspx_th_c_when_0.doAfterBody();
181         if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
182           break;
183       } while (true);
184     }
185     if (_jspx_th_c_when_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
186       return true;
187     _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_0);
188     return false;
189   }
190
191   private boolean _jspx_meth_c_when_1(javax.servlet.jsp.tagext.Tag JavaDoc _jspx_th_c_choose_0, javax.servlet.jsp.PageContext JavaDoc pageContext)
192           throws Throwable JavaDoc {
193     JspWriter out = pageContext.getOut();
194     /* ---- c:when ---- */
195     org.apache.taglibs.standard.tag.el.core.WhenTag _jspx_th_c_when_1 = (org.apache.taglibs.standard.tag.el.core.WhenTag) _jspx_tagPool_c_when_test.get(org.apache.taglibs.standard.tag.el.core.WhenTag.class);
196     _jspx_th_c_when_1.setPageContext(pageContext);
197     _jspx_th_c_when_1.setParent(_jspx_th_c_choose_0);
198     _jspx_th_c_when_1.setTest("${userLogin==null}");
199     int _jspx_eval_c_when_1 = _jspx_th_c_when_1.doStartTag();
200     if (_jspx_eval_c_when_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
201       do {
202         out.write("\t\t\r\n\t\t");
203         if (_jspx_meth_c_redirect_0(_jspx_th_c_when_1, pageContext))
204           return true;
205         out.write("\r\n\t");
206         int evalDoAfterBody = _jspx_th_c_when_1.doAfterBody();
207         if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
208           break;
209       } while (true);
210     }
211     if (_jspx_th_c_when_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
212       return true;
213     _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_1);
214     return false;
215   }
216
217   private boolean _jspx_meth_c_redirect_0(javax.servlet.jsp.tagext.Tag JavaDoc _jspx_th_c_when_1, javax.servlet.jsp.PageContext JavaDoc pageContext)
218           throws Throwable JavaDoc {
219     JspWriter out = pageContext.getOut();
220     /* ---- c:redirect ---- */
221     org.apache.taglibs.standard.tag.el.core.RedirectTag _jspx_th_c_redirect_0 = (org.apache.taglibs.standard.tag.el.core.RedirectTag) _jspx_tagPool_c_redirect_url.get(org.apache.taglibs.standard.tag.el.core.RedirectTag.class);
222     _jspx_th_c_redirect_0.setPageContext(pageContext);
223     _jspx_th_c_redirect_0.setParent(_jspx_th_c_when_1);
224     _jspx_th_c_redirect_0.setUrl("login.x");
225     int _jspx_eval_c_redirect_0 = _jspx_th_c_redirect_0.doStartTag();
226     if (_jspx_th_c_redirect_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
227       return true;
228     _jspx_tagPool_c_redirect_url.reuse(_jspx_th_c_redirect_0);
229     return false;
230   }
231
232   private boolean _jspx_meth_x_set_0(javax.servlet.jsp.tagext.Tag JavaDoc _jspx_th_c_otherwise_0, javax.servlet.jsp.PageContext JavaDoc pageContext)
233           throws Throwable JavaDoc {
234     JspWriter out = pageContext.getOut();
235     /* ---- x:set ---- */
236     org.apache.taglibs.standard.tag.common.xml.SetTag _jspx_th_x_set_0 = (org.apache.taglibs.standard.tag.common.xml.SetTag) _jspx_tagPool_x_set_var_select.get(org.apache.taglibs.standard.tag.common.xml.SetTag.class);
237     _jspx_th_x_set_0.setPageContext(pageContext);
238     _jspx_th_x_set_0.setParent(_jspx_th_c_otherwise_0);
239     _jspx_th_x_set_0.setVar("defaultUrl");
240     _jspx_th_x_set_0.setSelect("string($doc/menu-bar/menu[1]/menu-item[1]/@link)");
241     int _jspx_eval_x_set_0 = _jspx_th_x_set_0.doStartTag();
242     if (_jspx_th_x_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
243       return true;
244     _jspx_tagPool_x_set_var_select.reuse(_jspx_th_x_set_0);
245     return false;
246   }
247
248   private boolean _jspx_meth_c_redirect_1(javax.servlet.jsp.tagext.Tag JavaDoc _jspx_th_c_otherwise_0, javax.servlet.jsp.PageContext JavaDoc pageContext)
249           throws Throwable JavaDoc {
250     JspWriter out = pageContext.getOut();
251     /* ---- c:redirect ---- */
252     org.apache.taglibs.standard.tag.el.core.RedirectTag _jspx_th_c_redirect_1 = (org.apache.taglibs.standard.tag.el.core.RedirectTag) _jspx_tagPool_c_redirect_url.get(org.apache.taglibs.standard.tag.el.core.RedirectTag.class);
253     _jspx_th_c_redirect_1.setPageContext(pageContext);
254     _jspx_th_c_redirect_1.setParent(_jspx_th_c_otherwise_0);
255     _jspx_th_c_redirect_1.setUrl("${defaultUrl}");
256     int _jspx_eval_c_redirect_1 = _jspx_th_c_redirect_1.doStartTag();
257     if (_jspx_th_c_redirect_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
258       return true;
259     _jspx_tagPool_c_redirect_url.reuse(_jspx_th_c_redirect_1);
260     return false;
261   }
262 }
263
Popular Tags