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

  1. package org.apache.jsp.cal;
  2.  
  3. import cal.TableBean;
  4. import java.io.IOException;
  5. import java.util.List;
  6. import java.util.Vector;
  7. import javax.servlet.ServletConfig;
  8. import javax.servlet.ServletContext;
  9. import javax.servlet.ServletException;
  10. import javax.servlet.http.HttpServletRequest;
  11. import javax.servlet.http.HttpServletResponse;
  12. import javax.servlet.http.HttpSession;
  13. import javax.servlet.jsp.JspFactory;
  14. import javax.servlet.jsp.JspWriter;
  15. import javax.servlet.jsp.PageContext;
  16. import javax.servlet.jsp.SkipPageException;
  17. import org.apache.jasper.runtime.HttpJspBase;
  18. import org.apache.jasper.runtime.JspSourceDependent;
  19.  
  20. public final class cal2_jsp extends HttpJspBase implements JspSourceDependent {
  21.    private static Vector _jspx_dependants;
  22.  
  23.    public List getDependants() {
  24.       return _jspx_dependants;
  25.    }
  26.  
  27.    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
  28.       JspFactory _jspxFactory = null;
  29.       PageContext pageContext = null;
  30.       HttpSession session = null;
  31.       ServletContext application = null;
  32.       ServletConfig config = null;
  33.       JspWriter out = null;
  34.       JspWriter _jspx_out = null;
  35.       PageContext _jspx_page_context = null;
  36.  
  37.       try {
  38.          _jspxFactory = JspFactory.getDefaultFactory();
  39.          response.setContentType("text/html");
  40.          pageContext = _jspxFactory.getPageContext(this, request, response, (String)null, true, 8192, true);
  41.          _jspx_page_context = pageContext;
  42.          application = pageContext.getServletContext();
  43.          config = pageContext.getServletConfig();
  44.          session = pageContext.getSession();
  45.          out = pageContext.getOut();
  46.          out.write("<HTML>\r\n<!--\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<HEAD><TITLE> \r\n\tCalendar: A JSP APPLICATION\r\n</TITLE></HEAD>\r\n\r\n\r\n<BODY BGCOLOR=\"white\">\r\n");
  47.          TableBean table = null;
  48.          synchronized(session) {
  49.             table = (TableBean)_jspx_page_context.getAttribute("table", 3);
  50.             if (table == null) {
  51.                table = new TableBean();
  52.                _jspx_page_context.setAttribute("table", table, 3);
  53.             }
  54.          }
  55.  
  56.          out.write("\r\n\r\n");
  57.          String time = request.getParameter("time");
  58.          out.write("\r\n\r\n<FONT SIZE=5> Please add the following event:\r\n<BR> <h3> Date ");
  59.          out.print(table.getDate());
  60.          out.write("\r\n<BR> Time ");
  61.          out.print(time);
  62.          out.write(" </h3>\r\n</FONT>\r\n<FORM METHOD=POST ACTION=cal1.jsp>\r\n<BR> \r\n<BR> <INPUT NAME=\"date\" TYPE=HIDDEN VALUE=\"current\">\r\n<BR> <INPUT NAME=\"time\" TYPE=HIDDEN VALUE=");
  63.          out.print(time);
  64.          out.write("\r\n<BR> <h2> Description of the event <INPUT NAME=\"description\" TYPE=TEXT SIZE=20> </h2>\r\n<BR> <INPUT TYPE=SUBMIT VALUE=\"submit\">\r\n</FORM>\r\n\r\n</BODY>\r\n</HTML>\r\n\r\n");
  65.       } catch (Throwable t) {
  66.          if (!(t instanceof SkipPageException)) {
  67.             if (_jspx_out != null && _jspx_out.getBufferSize() != 0) {
  68.                _jspx_out.clearBuffer();
  69.             }
  70.  
  71.             if (_jspx_page_context != null) {
  72.                _jspx_page_context.handlePageException(t);
  73.             }
  74.          }
  75.       } finally {
  76.          if (_jspxFactory != null) {
  77.             _jspxFactory.releasePageContext(_jspx_page_context);
  78.          }
  79.  
  80.       }
  81.  
  82.    }
  83. }
  84.