📄 showtimejsp_0002ejsp_jsp.java
字号:
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class ShowtimeJSP_0002ejsp_jsp extends HttpJspBase {
// begin [file="/ShowtimeJSP.jsp";from=(7,0);to=(7,87)]
// end
static {
}
public ShowtimeJSP_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/ShowtimeJSP.jsp";from=(0,48);to=(7,0)]
out.write("\r\n<html>\r\n<head>\r\n<title>\r\nShowtimeJSP\r\n</title>\r\n</head>\r\n");
// end
// begin [file="/ShowtimeJSP.jsp";from=(7,0);to=(7,87)]
showtime.ShowtimeJSPBean showtimeJSPBeanId = null;
boolean _jspx_specialshowtimeJSPBeanId = false;
synchronized (session) {
showtimeJSPBeanId= (showtime.ShowtimeJSPBean)
pageContext.getAttribute("showtimeJSPBeanId",PageContext.SESSION_SCOPE);
if ( showtimeJSPBeanId == null ) {
_jspx_specialshowtimeJSPBeanId = true;
try {
showtimeJSPBeanId = (showtime.ShowtimeJSPBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "showtime.ShowtimeJSPBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"showtime.ShowtimeJSPBean", exc);
}
pageContext.setAttribute("showtimeJSPBeanId", showtimeJSPBeanId, PageContext.SESSION_SCOPE);
}
}
if(_jspx_specialshowtimeJSPBeanId == true) {
// end
// begin [file="/ShowtimeJSP.jsp";from=(7,0);to=(7,87)]
}
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(7,87);to=(8,0)]
out.write("\r\n");
// end
// begin [file="/ShowtimeJSP.jsp";from=(8,0);to=(8,57)]
JspRuntimeLibrary.introspect(pageContext.findAttribute("showtimeJSPBeanId"), request);
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(8,57);to=(13,1)]
out.write("\r\n<body bgcolor=\"#ffffc0\">\r\n <h1>\r\n 显示当前web服务器的时间\r\n </h1>\r\n ");
// end
// begin [file="/ShowtimeJSP.jsp";from=(13,3);to=(13,46)]
java.util.Date Mydate=new java.util.Date();
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(13,48);to=(14,2)]
out.write("\r\n ");
// end
// begin [file="/ShowtimeJSP.jsp";from=(14,5);to=(14,24)]
out.print(Mydate.getMonth()+1);
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(14,26);to=(15,2)]
out.write("月\r\n ");
// end
// begin [file="/ShowtimeJSP.jsp";from=(15,5);to=(15,21)]
out.print(Mydate.getDate());
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(15,23);to=(16,2)]
out.write("日\r\n ");
// end
// begin [file="/ShowtimeJSP.jsp";from=(16,5);to=(16,22)]
out.print(Mydate.getHours());
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(16,24);to=(17,2)]
out.write("时\r\n ");
// end
// begin [file="/ShowtimeJSP.jsp";from=(17,5);to=(17,25)]
out.print( Mydate.getMinutes());
// end
// HTML // begin [file="/ShowtimeJSP.jsp";from=(17,27);to=(40,0)]
out.write("分\r\n <HR>\r\n <H1>显示客户端时间</H1>\r\n <Script language='javaScript'>\r\n var clientDate=new Date();\r\n document.write(clientDate.getYear()+\"年\");\r\n document.write((clientDate.getMonth()+1)+\"月\");\r\n document.write(clientDate.getDate()+\"日\");\r\n document.write(clientDate.getHours()+\"时\");\r\n document.write(clientDate.getMinutes()+\"分\");\r\n </script>\r\n <HR>\r\n<HR>\r\n<p>请判断选择服务器和客户端的时间是否一致</p>\r\n<FORM ACTION=\"showtimejsp2.jsp\" METHOD=\"POST\">\r\n <INPUT TYPE=\"radio\" NAME=\"showtimejsp\" VALUE=\"Is Same.\">\r\n 是一致的<BR>\r\n <INPUT TYPE=\"radio\" NAME=\"showtimejsp\" VALUE=\"Isn't Same.\">\r\n 是不一致的<BR>\r\n<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"确定\">\r\n</form>\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -