/*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/7.0.47
* Generated at: 2017-12-15 08:20:01 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class list_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
private javax.el.ExpressionFactory _el_expressionfactory;
private org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
public void _jspDestroy() {
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, 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("<script type=\"text/javascript\" src=\"js/jquery-2.1.4.min.js\"></script>\r\n");
out.write("<script type=\"text/javascript\">\r\n");
out.write("/* 当页面加载的时候请求ajax 数据回显到页面 \r\n");
out.write(" * \r\n");
out.write(" */\r\n");
out.write("$(function(){\r\n");
out.write("\talert('hello !');\r\n");
out.write("\t/* 请求数据 */\r\n");
out.write("\t$.ajax({\r\n");
out.write("\t\ttype:\"post\",\r\n");
out.write("\t\turl:\"findAll\",\r\n");
out.write("\t\tdataType:\"json\",\r\n");
out.write("\t\tsuccess:function(data){\r\n");
out.write("\t\t\t/* 循环遍历对象赋值到table */\r\n");
out.write("\t\t\tfor(var i=0;i<data.length;i++){\r\n");
out.write("\t\t\t\tvar con = \"<tr><td>\"+data[i].id+\"</td><td>\"+data[i].name+\"</td><td>\"+data[i].password+\"</td></tr>\";\r\n");
out.write("\t\t\t\t/* 将每次循环的数据添加到表格上 */\r\n");
out.write("\t\t\t\t$(\"#tab\").append(con);\r\n");
out.write("\t\t\t}\r\n");
out.write("\t\t\t\r\n");
out.write("\t\t}\r\n");
out.write("\t})\r\n");
out.write("\t\r\n");
out.write("\t\r\n");
out.write("}) \r\n");
out.write("\r\n");
out.write("</script>\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("\t<table id=\"tab\">\r\n");
out.write("\t\r\n");
out.write("\t\t<tr>\r\n");
out.write("\t\t\t<td>ID</td>\r\n");
out.write("\t\t\t<td>NAME</td>\r\n");
out.write("\t\t\t<td>PWD</td>\r\n");
out.write("\t\t</tr>\r\n");
out.write("\t\t\r\n");
out.write("\t</table>\r\n");
out.write("\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)
try { out.clearBuffer(); } catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}