home *** CD-ROM | disk | FTP | other *** search
Wrap
package org.apache.jsp.jsp2.jspattribute; 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 javax.servlet.jsp.tagext.JspFragment; import javax.servlet.jsp.tagext.JspTag; import jsp2.examples.simpletag.ShuffleSimpleTag; import jsp2.examples.simpletag.TileSimpleTag; import org.apache.jasper.runtime.HttpJspBase; import org.apache.jasper.runtime.JspSourceDependent; public final class shuffle_jsp extends HttpJspBase implements JspSourceDependent { private static Vector _jspx_dependants = new Vector(1); 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 Examples - Shuffle Example</title>\r\n </head>\r\n <body>\r\n <h1>JSP 2.0 Examples - Shuffle Example</h1>\r\n <hr>\r\n <p>Try reloading the page a few times. Both the rows and the columns\r\n are shuffled and appear different each time.</p>\r\n <p>Here's how the code works. The SimpleTag handler called \r\n <my:shuffle> accepts three attributes. Each attribute is a \r\n"); out.write(" JSP Fragment, meaning it is a fragment of JSP code that can be\r\n dynamically executed by the shuffle tag handler on demand. The \r\n shuffle tag handler executes the three fragments in a random order.\r\n To shuffle both the rows and the columns, the shuffle tag is used\r\n with itself as a parameter.</p>\r\n <hr>\r\n <blockquote>\r\n <font color=\"#ffffff\">\r\n <table>\r\n "); if (!this._jspx_meth_my_shuffle_0(pageContext)) { out.write("\r\n </table>\r\n </font>\r\n </blockquote>\r\n </body>\r\n</html>\r\n"); return; } } 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); return; } } return; } finally { if (_jspxFactory != null) { _jspxFactory.releasePageContext(_jspx_page_context); } } } private boolean _jspx_meth_my_shuffle_0(PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); ShuffleSimpleTag _jspx_th_my_shuffle_0 = new ShuffleSimpleTag(); _jspx_th_my_shuffle_0.setJspContext(_jspx_page_context); JspFragment _jspx_temp0 = new shuffle_jspHelper(this, 0, _jspx_page_context, _jspx_th_my_shuffle_0, (int[])null); _jspx_th_my_shuffle_0.setFragment1(_jspx_temp0); JspFragment _jspx_temp4 = new shuffle_jspHelper(this, 4, _jspx_page_context, _jspx_th_my_shuffle_0, (int[])null); _jspx_th_my_shuffle_0.setFragment2(_jspx_temp4); JspFragment _jspx_temp8 = new shuffle_jspHelper(this, 8, _jspx_page_context, _jspx_th_my_shuffle_0, (int[])null); _jspx_th_my_shuffle_0.setFragment3(_jspx_temp8); _jspx_th_my_shuffle_0.doTag(); return false; } private boolean _jspx_meth_my_shuffle_1(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); ShuffleSimpleTag _jspx_th_my_shuffle_1 = new ShuffleSimpleTag(); _jspx_th_my_shuffle_1.setJspContext(_jspx_page_context); _jspx_th_my_shuffle_1.setParent(_jspx_parent); JspFragment _jspx_temp1 = new shuffle_jspHelper(this, 1, _jspx_page_context, _jspx_th_my_shuffle_1, (int[])null); _jspx_th_my_shuffle_1.setFragment1(_jspx_temp1); JspFragment _jspx_temp2 = new shuffle_jspHelper(this, 2, _jspx_page_context, _jspx_th_my_shuffle_1, (int[])null); _jspx_th_my_shuffle_1.setFragment2(_jspx_temp2); JspFragment _jspx_temp3 = new shuffle_jspHelper(this, 3, _jspx_page_context, _jspx_th_my_shuffle_1, (int[])null); _jspx_th_my_shuffle_1.setFragment3(_jspx_temp3); _jspx_th_my_shuffle_1.doTag(); return false; } private boolean _jspx_meth_my_tile_0(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_0 = new TileSimpleTag(); _jspx_th_my_tile_0.setJspContext(_jspx_page_context); _jspx_th_my_tile_0.setParent(_jspx_parent); _jspx_th_my_tile_0.setColor("#ff0000"); _jspx_th_my_tile_0.setLabel("A"); _jspx_th_my_tile_0.doTag(); return false; } private boolean _jspx_meth_my_tile_1(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_1 = new TileSimpleTag(); _jspx_th_my_tile_1.setJspContext(_jspx_page_context); _jspx_th_my_tile_1.setParent(_jspx_parent); _jspx_th_my_tile_1.setColor("#00ff00"); _jspx_th_my_tile_1.setLabel("B"); _jspx_th_my_tile_1.doTag(); return false; } private boolean _jspx_meth_my_tile_2(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_2 = new TileSimpleTag(); _jspx_th_my_tile_2.setJspContext(_jspx_page_context); _jspx_th_my_tile_2.setParent(_jspx_parent); _jspx_th_my_tile_2.setColor("#0000ff"); _jspx_th_my_tile_2.setLabel("C"); _jspx_th_my_tile_2.doTag(); return false; } private boolean _jspx_meth_my_shuffle_2(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); ShuffleSimpleTag _jspx_th_my_shuffle_2 = new ShuffleSimpleTag(); _jspx_th_my_shuffle_2.setJspContext(_jspx_page_context); _jspx_th_my_shuffle_2.setParent(_jspx_parent); JspFragment _jspx_temp5 = new shuffle_jspHelper(this, 5, _jspx_page_context, _jspx_th_my_shuffle_2, (int[])null); _jspx_th_my_shuffle_2.setFragment1(_jspx_temp5); JspFragment _jspx_temp6 = new shuffle_jspHelper(this, 6, _jspx_page_context, _jspx_th_my_shuffle_2, (int[])null); _jspx_th_my_shuffle_2.setFragment2(_jspx_temp6); JspFragment _jspx_temp7 = new shuffle_jspHelper(this, 7, _jspx_page_context, _jspx_th_my_shuffle_2, (int[])null); _jspx_th_my_shuffle_2.setFragment3(_jspx_temp7); _jspx_th_my_shuffle_2.doTag(); return false; } private boolean _jspx_meth_my_tile_3(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_3 = new TileSimpleTag(); _jspx_th_my_tile_3.setJspContext(_jspx_page_context); _jspx_th_my_tile_3.setParent(_jspx_parent); _jspx_th_my_tile_3.setColor("#ff0000"); _jspx_th_my_tile_3.setLabel("1"); _jspx_th_my_tile_3.doTag(); return false; } private boolean _jspx_meth_my_tile_4(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_4 = new TileSimpleTag(); _jspx_th_my_tile_4.setJspContext(_jspx_page_context); _jspx_th_my_tile_4.setParent(_jspx_parent); _jspx_th_my_tile_4.setColor("#00ff00"); _jspx_th_my_tile_4.setLabel("2"); _jspx_th_my_tile_4.doTag(); return false; } private boolean _jspx_meth_my_tile_5(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_5 = new TileSimpleTag(); _jspx_th_my_tile_5.setJspContext(_jspx_page_context); _jspx_th_my_tile_5.setParent(_jspx_parent); _jspx_th_my_tile_5.setColor("#0000ff"); _jspx_th_my_tile_5.setLabel("3"); _jspx_th_my_tile_5.doTag(); return false; } private boolean _jspx_meth_my_shuffle_3(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); ShuffleSimpleTag _jspx_th_my_shuffle_3 = new ShuffleSimpleTag(); _jspx_th_my_shuffle_3.setJspContext(_jspx_page_context); _jspx_th_my_shuffle_3.setParent(_jspx_parent); JspFragment _jspx_temp9 = new shuffle_jspHelper(this, 9, _jspx_page_context, _jspx_th_my_shuffle_3, (int[])null); _jspx_th_my_shuffle_3.setFragment1(_jspx_temp9); JspFragment _jspx_temp10 = new shuffle_jspHelper(this, 10, _jspx_page_context, _jspx_th_my_shuffle_3, (int[])null); _jspx_th_my_shuffle_3.setFragment2(_jspx_temp10); JspFragment _jspx_temp11 = new shuffle_jspHelper(this, 11, _jspx_page_context, _jspx_th_my_shuffle_3, (int[])null); _jspx_th_my_shuffle_3.setFragment3(_jspx_temp11); _jspx_th_my_shuffle_3.doTag(); return false; } private boolean _jspx_meth_my_tile_6(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_6 = new TileSimpleTag(); _jspx_th_my_tile_6.setJspContext(_jspx_page_context); _jspx_th_my_tile_6.setParent(_jspx_parent); _jspx_th_my_tile_6.setColor("#ff0000"); _jspx_th_my_tile_6.setLabel("!"); _jspx_th_my_tile_6.doTag(); return false; } private boolean _jspx_meth_my_tile_7(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_7 = new TileSimpleTag(); _jspx_th_my_tile_7.setJspContext(_jspx_page_context); _jspx_th_my_tile_7.setParent(_jspx_parent); _jspx_th_my_tile_7.setColor("#00ff00"); _jspx_th_my_tile_7.setLabel("@"); _jspx_th_my_tile_7.doTag(); return false; } private boolean _jspx_meth_my_tile_8(JspTag _jspx_parent, PageContext _jspx_page_context) throws Throwable { JspWriter out = _jspx_page_context.getOut(); TileSimpleTag _jspx_th_my_tile_8 = new TileSimpleTag(); _jspx_th_my_tile_8.setJspContext(_jspx_page_context); _jspx_th_my_tile_8.setParent(_jspx_parent); _jspx_th_my_tile_8.setColor("#0000ff"); _jspx_th_my_tile_8.setLabel("#"); _jspx_th_my_tile_8.doTag(); return false; } // $FF: synthetic method static boolean access$000(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_shuffle_1(x1, x2); } // $FF: synthetic method static boolean access$100(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_0(x1, x2); } // $FF: synthetic method static boolean access$200(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_1(x1, x2); } // $FF: synthetic method static boolean access$300(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_2(x1, x2); } // $FF: synthetic method static boolean access$400(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_shuffle_2(x1, x2); } // $FF: synthetic method static boolean access$500(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_3(x1, x2); } // $FF: synthetic method static boolean access$600(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_4(x1, x2); } // $FF: synthetic method static boolean access$700(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_5(x1, x2); } // $FF: synthetic method static boolean access$800(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_shuffle_3(x1, x2); } // $FF: synthetic method static boolean access$900(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_6(x1, x2); } // $FF: synthetic method static boolean access$1000(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_7(x1, x2); } // $FF: synthetic method static boolean access$1100(shuffle_jsp x0, JspTag x1, PageContext x2) throws Throwable { return x0._jspx_meth_my_tile_8(x1, x2); } static { _jspx_dependants.add("/WEB-INF/jsp2/jsp2-example-taglib.tld"); } }