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 / config_jsp.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-05-17  |  4.4 KB  |  76 lines

  1. package org.apache.jsp.jsp2.misc;
  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.  
  19. public final class config_jsp extends HttpJspBase implements JspSourceDependent {
  20.    private static Vector _jspx_dependants = new Vector(3);
  21.  
  22.    public List getDependants() {
  23.       return _jspx_dependants;
  24.    }
  25.  
  26.    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
  27.       JspFactory _jspxFactory = null;
  28.       PageContext pageContext = null;
  29.       HttpSession session = null;
  30.       ServletContext application = null;
  31.       ServletConfig config = null;
  32.       JspWriter out = null;
  33.       JspWriter _jspx_out = null;
  34.       PageContext _jspx_page_context = null;
  35.  
  36.       try {
  37.          _jspxFactory = JspFactory.getDefaultFactory();
  38.          response.setContentType("text/html;charset=ISO-8859-1");
  39.          pageContext = _jspxFactory.getPageContext(this, request, response, (String)null, true, 8192, true);
  40.          _jspx_page_context = pageContext;
  41.          application = pageContext.getServletContext();
  42.          config = pageContext.getServletConfig();
  43.          session = pageContext.getSession();
  44.          out = pageContext.getOut();
  45.          out.write("<hr>\r\n<center>\r\nThis banner included with <include-prelude>\r\n</center>\r\n<hr>\r\n");
  46.          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    <h1>JSP 2.0 Examples - JSP Configuration</h1>\r\n    <hr>\r\n    <p>Using a <jsp-property-group> element in the web.xml \r\n    deployment descriptor, this JSP page has been configured in the\r\n    following ways:</p>\r\n    <ul>\r\n      <li>Uses <include-prelude> to include the top banner.</li>\r\n      <li>Uses <include-coda> to include the bottom banner.</li>\r\n      <li>Uses <scripting-invalid> true to disable \r\n");
  47.          out.write("\t  <% scripting %> elements</li>\r\n      <li>Uses <el-ignored> true to disable ");
  48.          out.write("${EL}");
  49.          out.write(" elements</li>\r\n      <li>Uses <page-encoding> ISO-8859-1 to set the page encoding (though this is the default anyway)</li>\r\n    </ul>\r\n    There are various other configuration options that can be used.\r\n\r\n");
  50.          out.write("<hr>\r\n<center>\r\nThis banner included with <include-coda>\r\n</center>\r\n<hr>\r\n");
  51.       } catch (Throwable t) {
  52.          if (!(t instanceof SkipPageException)) {
  53.             if (_jspx_out != null && _jspx_out.getBufferSize() != 0) {
  54.                _jspx_out.clearBuffer();
  55.             }
  56.  
  57.             if (_jspx_page_context != null) {
  58.                _jspx_page_context.handlePageException(t);
  59.             }
  60.          }
  61.       } finally {
  62.          if (_jspxFactory != null) {
  63.             _jspxFactory.releasePageContext(_jspx_page_context);
  64.          }
  65.  
  66.       }
  67.  
  68.    }
  69.  
  70.    static {
  71.       _jspx_dependants.add("/jsp2/misc/prelude.jspf");
  72.       _jspx_dependants.add("/WEB-INF/jsp2/jsp2-example-taglib.tld");
  73.       _jspx_dependants.add("/jsp2/misc/coda.jspf");
  74.    }
  75. }
  76.