📄 displaybook_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import com.entity.BookBean;
public final class displayBook_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
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;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
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("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("displayBook\r\n");
out.write("</title>\r\n");
out.write("</head>\r\n");
out.write("<body background=\"image/1.jpg\" text=\"red\">\r\n");
out.write("<center>\r\n");
out.write("\r\n");
out.write("<h1>\r\n");
out.write("欢迎来到我的通讯录!!\r\n");
out.write("</h1>\r\n");
out.write("<hr width=\"50%\"/>\r\n");
out.write("<h3>好友信息</h3>\r\n");
out.write("<table border=\"1\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td>姓名</td>\r\n");
out.write(" <td>性别</td>\r\n");
out.write(" <td>电话</td>\r\n");
out.write(" <td>手机</td>\r\n");
out.write(" <td>操作</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
ArrayList list=(ArrayList)request.getAttribute("books");
if(list!=null)
{
for(int i=0;i<list.size();i++)
{
BookBean book=(BookBean)list.get(i);
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td>");
out.print(book.getName() );
out.write("</td>\r\n");
out.write(" <td>");
out.print(book.getSex());
out.write("</td>\r\n");
out.write(" <td>");
out.print(book.getPhone() );
out.write("</td>\r\n");
out.write(" <td>");
out.print(book.getMobilePhone() );
out.write("</td>\r\n");
out.write(" <td>\r\n");
out.write(" <a href=\"bookservlet?type=del&BookId=");
out.print(book.getId());
out.write("\">删除</a>\r\n");
out.write(" <a href=\"updateBook.jsp?bookId=");
out.print(book.getId());
out.write("\">修改</a>\r\n");
out.write(" <a href=\"findBook.jsp?bookId=");
out.print(book.getId());
out.write("\">详细信息</a>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}
out.write("\r\n");
out.write("</table>\r\n");
out.write("<br />\r\n");
out.write("<a href=\"addBook.jsp\">添加新联系人</a> \r\n");
out.write("<a href=\"divpageBook.jsp\">分页显示</a> \r\n");
out.write("<a href=\"index.jsp\">退出</a>\r\n");
out.write("<br />\r\n");
out.write("<hr />\r\n");
out.write("分类查找好友\r\n");
out.write("<hr />\r\n");
out.write("<table border=\"1\">\r\n");
out.write("<tr>\r\n");
out.write("<td><a href=\"selectservlet?relation=1\">家长</a></td>\r\n");
out.write("<td><a href=\"selectservlet?relation=2\">领导</a></td>\r\n");
out.write("<td><a href=\"selectservlet?relation=3\">师长</a></td>\r\n");
out.write("<td><a href=\"selectservlet?relation=4\">朋友</a></td>\r\n");
out.write("<td><a href=\"selectservlet?relation=5\">同学</a></td>\r\n");
out.write("<td><a href=\"selectservlet?relation=6\">同事</a></td>\r\n");
out.write("</tr>\r\n");
out.write("\r\n");
out.write("</table>\r\n");
out.write("\r\n");
out.write("</center>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -