home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / choose_jsp.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-05-17  |  6.0 KB  |  133 lines

  1. package org.apache.jsp.tagplugin;
  2.  
  3. import java.io.IOException;
  4. import java.util.List;
  5. import java.util.Vector;
  6. import javax.servlet.ServletConfig;
  7. import javax.servlet.ServletContext;
  8. import javax.servlet.ServletException;
  9. import javax.servlet.http.HttpServletRequest;
  10. import javax.servlet.http.HttpServletResponse;
  11. import javax.servlet.http.HttpSession;
  12. import javax.servlet.jsp.JspFactory;
  13. import javax.servlet.jsp.JspWriter;
  14. import javax.servlet.jsp.PageContext;
  15. import javax.servlet.jsp.SkipPageException;
  16. import org.apache.jasper.runtime.HttpJspBase;
  17. import org.apache.jasper.runtime.JspSourceDependent;
  18. import org.apache.jasper.runtime.PageContextImpl;
  19. import org.apache.jasper.runtime.ProtectedFunctionMapper;
  20. import org.apache.jasper.runtime.TagHandlerPool;
  21.  
  22. public final class choose_jsp extends HttpJspBase implements JspSourceDependent {
  23.    private static Vector _jspx_dependants;
  24.    private TagHandlerPool _jspx_tagPool_c_forEach_var_end_begin;
  25.    private TagHandlerPool _jspx_tagPool_c_choose;
  26.    private TagHandlerPool _jspx_tagPool_c_when_test;
  27.    private TagHandlerPool _jspx_tagPool_c_otherwise;
  28.    // $FF: synthetic field
  29.    static Class class$java$lang$String;
  30.    // $FF: synthetic field
  31.    static Class class$java$lang$Boolean;
  32.  
  33.    public List getDependants() {
  34.       return _jspx_dependants;
  35.    }
  36.  
  37.    public void _jspInit() {
  38.       this._jspx_tagPool_c_forEach_var_end_begin = TagHandlerPool.getTagHandlerPool(this.getServletConfig());
  39.       this._jspx_tagPool_c_choose = TagHandlerPool.getTagHandlerPool(this.getServletConfig());
  40.       this._jspx_tagPool_c_when_test = TagHandlerPool.getTagHandlerPool(this.getServletConfig());
  41.       this._jspx_tagPool_c_otherwise = TagHandlerPool.getTagHandlerPool(this.getServletConfig());
  42.    }
  43.  
  44.    public void _jspDestroy() {
  45.       this._jspx_tagPool_c_forEach_var_end_begin.release();
  46.       this._jspx_tagPool_c_choose.release();
  47.       this._jspx_tagPool_c_when_test.release();
  48.       this._jspx_tagPool_c_otherwise.release();
  49.    }
  50.  
  51.    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
  52.       JspFactory _jspxFactory = null;
  53.       PageContext pageContext = null;
  54.       HttpSession session = null;
  55.       ServletContext application = null;
  56.       ServletConfig config = null;
  57.       JspWriter out = null;
  58.       JspWriter _jspx_out = null;
  59.       PageContext _jspx_page_context = null;
  60.  
  61.       try {
  62.          _jspxFactory = JspFactory.getDefaultFactory();
  63.          response.setContentType("text/html");
  64.          pageContext = _jspxFactory.getPageContext(this, request, response, (String)null, true, 8192, true);
  65.          _jspx_page_context = pageContext;
  66.          application = pageContext.getServletContext();
  67.          config = pageContext.getServletConfig();
  68.          session = pageContext.getSession();
  69.          out = pageContext.getOut();
  70.          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<html>\r\n  <head>\r\n    <title>Tag Examples - choose</title>\r\n  </head>\r\n  <body>\r\n    <h1>Tag Plugin Examples - <c:choose></h1>\r\n\r\n    <hr>\r\n    </br>\r\n    <a href=\"notes.html\">Plugin Introductory Notes<font <font color=\"#0000FF\"></\r\na>\r\n    <br/>\r\n    <a href=\"howto.html\">Brief Instructions for Writing Plugins<font color=\"#000\r\n0\r\nFF\"></a>\r\n    <br/> <br/>\r\n    <hr>\r\n\r\n    <font color=\"#000000\"/>\r\n    </br>\r\n");
  71.          out.write("\r\n    \r\n\r\n    ");
  72.  
  73.          for(int _jspx_temp0 = 0; _jspx_temp0 <= 4; ++_jspx_temp0) {
  74.             _jspx_page_context.setAttribute("index", String.valueOf(_jspx_temp0));
  75.             out.write("\r\n      # ");
  76.             out.write((String)PageContextImpl.proprietaryEvaluate("${index}", class$java$lang$String == null ? (class$java$lang$String = class$("java.lang.String")) : class$java$lang$String, _jspx_page_context, (ProtectedFunctionMapper)null, false));
  77.             out.write(": \r\n      ");
  78.             out.write(13);
  79.             out.write(10);
  80.             out.write(9);
  81.             if ((Boolean)PageContextImpl.proprietaryEvaluate("${index == 1}", class$java$lang$Boolean == null ? (class$java$lang$Boolean = class$("java.lang.Boolean")) : class$java$lang$Boolean, _jspx_page_context, (ProtectedFunctionMapper)null, false)) {
  82.                out.write("\r\n          One!</br>\r\n\t");
  83.                out.write(13);
  84.                out.write(10);
  85.                out.write(9);
  86.             } else if ((Boolean)PageContextImpl.proprietaryEvaluate("${index == 4}", class$java$lang$Boolean == null ? (class$java$lang$Boolean = class$("java.lang.Boolean")) : class$java$lang$Boolean, _jspx_page_context, (ProtectedFunctionMapper)null, false)) {
  87.                out.write("\r\n          Four!</br>\r\n\t");
  88.                out.write(13);
  89.                out.write(10);
  90.                out.write(9);
  91.             } else if ((Boolean)PageContextImpl.proprietaryEvaluate("${index == 3}", class$java$lang$Boolean == null ? (class$java$lang$Boolean = class$("java.lang.Boolean")) : class$java$lang$Boolean, _jspx_page_context, (ProtectedFunctionMapper)null, false)) {
  92.                out.write("\r\n          Three!</br>\r\n\t");
  93.                out.write(13);
  94.                out.write(10);
  95.                out.write(9);
  96.             } else {
  97.                out.write("\r\n          Huh?</br>\r\n\t");
  98.                out.write("\r\n      ");
  99.             }
  100.  
  101.             out.write("\r\n    ");
  102.          }
  103.  
  104.          out.write("\r\n  </body>\r\n</html> \r\n");
  105.       } catch (Throwable t) {
  106.          if (!(t instanceof SkipPageException)) {
  107.             if (_jspx_out != null && _jspx_out.getBufferSize() != 0) {
  108.                _jspx_out.clearBuffer();
  109.             }
  110.  
  111.             if (_jspx_page_context != null) {
  112.                _jspx_page_context.handlePageException(t);
  113.             }
  114.          }
  115.       } finally {
  116.          if (_jspxFactory != null) {
  117.             _jspxFactory.releasePageContext(_jspx_page_context);
  118.          }
  119.  
  120.       }
  121.  
  122.    }
  123.  
  124.    // $FF: synthetic method
  125.    static Class class$(String x0) {
  126.       try {
  127.          return Class.forName(x0);
  128.       } catch (ClassNotFoundException x1) {
  129.          throw new NoClassDefFoundError(x1.getMessage());
  130.       }
  131.    }
  132. }
  133.