<%@page import="org.apache.jasper.tagplugins.jstl.core.Out"%> <%@page import="java.util.Date"%> <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <Meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>首页</title> </head> <body> <%! public void test(){ int a=0; } %> <% for(int i=0;i<5;i++){ out.write(i+""); } %> <%-- Date date=new Date(); out.write(date.toLocaleString()); --%> 你好,JSP </body> </html>
index_jsp.java
final class index_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { ; } void _jspService(final javax.servlet.http.HttpServletRequest request,final javax.servlet.http.HttpServletResponse response) throws java.io.IOException,javax.servlet.ServletException { javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; javax.servlet.ServletContext application; javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = ; javax.servlet.jsp.PageContext _jspx_page_context = ; try { response.setContentType("text/html; charset=utf-8"); pageContext = _jspxFactory.getPageContext(,request,response,null,1)">true,8192,1)">true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("\r\n"); out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<Meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n"); out.write("<title>首页</title>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write('\r'); out.write('\n'); ); } out.write('\r'); out.write("你好,JSP\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } (java.io.IOException e) {} if (_jspx_page_context != ) _jspx_page_context.handlePageException(t); else throw ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
@H_301_0@