home *** CD-ROM | disk | FTP | other *** search
Wrap
package org.apache.jsp.dates; import dates.JspCalendar; 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.jsp.JspFactory; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.SkipPageException; import org.apache.jasper.runtime.HttpJspBase; import org.apache.jasper.runtime.JspRuntimeLibrary; import org.apache.jasper.runtime.JspSourceDependent; public final class date_jsp extends HttpJspBase implements JspSourceDependent { private static Vector _jspx_dependants; public List getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = 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, false, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); out = pageContext.getOut(); 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\r\n\r\n<body bgcolor=\"white\">\r\n"); JspCalendar clock = null; synchronized(pageContext) { clock = (JspCalendar)_jspx_page_context.getAttribute("clock", 1); if (clock == null) { clock = new JspCalendar(); _jspx_page_context.setAttribute("clock", clock, 1); } } out.write("\r\n\r\n<font size=4>\r\n<ul>\r\n<li>\tDay of month: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getDayOfMonth())); out.write("\r\n<li>\tYear: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getYear())); out.write("\r\n<li>\tMonth: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getMonth())); out.write("\r\n<li>\tTime: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getTime())); out.write("\r\n<li>\tDate: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getDate())); out.write("\r\n<li>\tDay: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getDay())); out.write("\r\n<li>\tDay Of Year: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getDayOfYear())); out.write("\r\n<li>\tWeek Of Year: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getWeekOfYear())); out.write("\r\n<li>\tera: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getEra())); out.write("\r\n<li>\tDST Offset: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getDSTOffset())); out.write("\r\n<li>\tZone Offset: is "); out.write(JspRuntimeLibrary.toString(((JspCalendar)pageContext.findAttribute("clock")).getZoneOffset())); out.write("\r\n</ul>\r\n</font>\r\n\r\n</body>\r\n</html>\r\n"); } 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); } } } finally { if (_jspxFactory != null) { _jspxFactory.releasePageContext(_jspx_page_context); } } } }