📄 list2ejsp.java
字号:
import hell.*;
import ejb.*;
import java.util.*;
import javax.ejb.*;
import java.math.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import java.rmi.RemoteException;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class list2ejsp extends HttpJspBase {
static {
}
public list2ejsp( ) {
}
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="/list.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/list.jsp";from=(1,144);to=(53,0)]
out.write("\r\n\r\n<html>\r\n<head>\r\n<title>BookStore Online</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody {\r\n\tmargin-top: 0px;\r\n}\r\n.style2 {font-family: monospace, sans-serif, \"·\\u00BD\\u00D5\\u00FD\\u00CA\\u00E6\\u00CC\\u00E5\", \"·\\u00BD\\u00D5\\u00FD\\u00D2\\u00A6\\u00CC\\u00E5\"}\r\n.style4 {\r\n\tfont-size: 24px;\r\n\tfont-weight: bold;\r\n}\r\n.style5 {font-family: monospace, sans-serif, \"·\\u00BD\\u00D5\\u00FD\\u00CA\\u00E6\\u00CC\\u00E5\", \"·\\u00BD\\u00D5\\u00FD\\u00D2\\u00A6\\u00CC\\u00E5\"; font-size: 18px; }\r\na:link {\r\n\ttext-decoration: none;\r\n\tcolor: #FF6600;\r\n}\r\na:visited {\r\n\ttext-decoration: none;\r\n}\r\na:hover {\r\n\ttext-decoration: underline;\r\n}\r\na:active {\r\n\ttext-decoration: none;\r\n}\r\n-->\r\n</head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"><style type=\"text/css\">\r\n.STYLE6 {font-weight: bold}\r\n.STYLE6 {font-family: monospace, sans-serif, \"·\\u00BD\\u00D5\\u00FD\\u00CA\\u00E6\\u00CC\\u00E5\", \"·\\u00BD\\u00D5\\u00FD\\u00D2\\u00A6\\u00CC\\u00E5\"; font-size: 18px; font-weight: bold; }\r\n</style>\r\n<body bgcolor=\"#ffffff\">\r\n<div align=\"center\"></div>\r\n<hr>\r\n<table width=\"936\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#CCCCCC\">\r\n<tr>\r\n<td width=\"131\" class=\"style5\"><div align=\"center\"><a href=\"index.jsp\" class=\"style5\"><strong>用户登陆</strong></a></div></td>\r\n<td width=\"178\" class=\"style5\"><div align=\"center\"><a href=\"booklist.jsp\" class=\"style5\"><strong>在线购物</strong></a></div></td>\r\n<td width=\"239\" class=\"style5\"><div align=\"center\"><a href=\"cart.jsp\" class=\"style5\"><strong>我的购物车</strong></a></div>\r\n<div align=\"center\"></div></td>\r\n<td width=\"378\" align=\"right\" class=\"style5\"><div align=\"center\"><a href=\"list.jsp\" class=\"style5\"><strong>我的订单</strong></a></div></td>\r\n</tr>\r\n</table>\r\n<table width=\"936\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#CCCCCC\">\r\n<tr>\r\n<td width=\"546\" valign=\"top\"><div align=\"center\"><p> </p>\r\n<br>\r\n<a class=\"title\">订单信息</a>\r\n");
// end
// begin [file="/list.jsp";from=(53,2);to=(81,0)]
Mylist mylist= (Mylist)session.getAttribute("Mylist");
if (mylist==null){
try {
InitialContext ic = new InitialContext();
Object objRef = ic.lookup("Mylist");
MylistHome home = (MylistHome)PortableRemoteObject.narrow(objRef, MylistHome.class);
mylist = home.create();
} catch (RemoteException ex) {
System.out.println("Couldn't create Mylist bean."+ ex.getMessage());
} catch (CreateException ex) {
System.out.println("Couldn't create Mylist bean."+ ex.getMessage());
} catch (NamingException ex) {
System.out.println("Unable to lookup home: "+ "Mylist "+ ex.getMessage());
}
session.setAttribute("Mylist",mylist);
}
String userId=(String)session.getAttribute("userId");
if ( userId != null && userId.length() > 0 ) {
try{
Vector v = mylist.DfindListTablebyuserId(userId);
if (v==null){
out.println("<hl>!</hl>") ;
}
else{
out.print("共 "+v.size()+" 条记录");
// end
// HTML // begin [file="/list.jsp";from=(81,2);to=(91,0)]
out.write("\r\n<table width=\"100%\" height=\"48\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" >\r\n<tr>\r\n <td width=\"100\" height=\"18\"><span class=\"style4\">订单号</span></td>\r\n <td width=\"100\"><span class=\"style4\">书号 </span></td>\r\n <td width=\"200\"><span class=\"style4\">书名</span></td>\r\n <td width=\"100\"><span class=\"style4\">作者 </span></td>\r\n <td width=\"1000\"><span class=\"style4\">详细内容 </span></td>\r\n <td width=\"150\"><span class=\"style4\">价格 </span></td>\r\n </tr>\r\n");
// end
// begin [file="/list.jsp";from=(91,2);to=(93,73)]
for (int i = 0; i < v.size(); i++){
String TableId =((ListDetail)v.elementAt(i)).getTableId();
// end
// HTML // begin [file="/list.jsp";from=(93,75);to=(95,74)]
out.write("\r\n<tr>\r\n <td height=\"22\"><span class=\"style6\"><a href = \"v.jsp?TableId=");
// end
// begin [file="/list.jsp";from=(95,77);to=(95,84)]
out.print(TableId);
// end
// HTML // begin [file="/list.jsp";from=(95,86);to=(95,91)]
out.write("\"</a>");
// end
// begin [file="/list.jsp";from=(95,94);to=(95,101)]
out.print(TableId);
// end
// HTML // begin [file="/list.jsp";from=(95,103);to=(96,37)]
out.write(" </span></td>\r\n <td><span class=\"style6\">");
// end
// begin [file="/list.jsp";from=(96,40);to=(96,80)]
out.print(((ListDetail)v.elementAt(i)).getBookId());
// end
// HTML // begin [file="/list.jsp";from=(96,82);to=(97,37)]
out.write(" </span></td>\r\n <td><span class=\"style6\">");
// end
// begin [file="/list.jsp";from=(97,40);to=(97,82)]
out.print(((ListDetail)v.elementAt(i)).getBookName());
// end
// HTML // begin [file="/list.jsp";from=(97,84);to=(98,37)]
out.write(" </span></td>\r\n <td><span class=\"style6\">");
// end
// begin [file="/list.jsp";from=(98,40);to=(98,84)]
out.print(((ListDetail)v.elementAt(i)).getBookAuthor());
// end
// HTML // begin [file="/list.jsp";from=(98,86);to=(99,37)]
out.write(" </span></td>\r\n <td><span class=\"style6\">");
// end
// begin [file="/list.jsp";from=(99,40);to=(99,84)]
out.print(((ListDetail)v.elementAt(i)).getBookDetail());
// end
// HTML // begin [file="/list.jsp";from=(99,86);to=(100,37)]
out.write(" </span></td>\r\n <td><span class=\"style6\">");
// end
// begin [file="/list.jsp";from=(100,40);to=(100,83)]
out.print(((ListDetail)v.elementAt(i)).getBookMoney());
// end
// HTML // begin [file="/list.jsp";from=(100,85);to=(102,0)]
out.write(" </span></td>\r\n </tr>\r\n");
// end
// begin [file="/list.jsp";from=(102,2);to=(102,3)]
}
// end
// HTML // begin [file="/list.jsp";from=(102,5);to=(106,2)]
out.write("\r\n</table>\r\n</td>\r\n </tr>\r\n ");
// end
// begin [file="/list.jsp";from=(106,4);to=(113,0)]
}
} catch (Exception ee){
out.println("<hl></hl>") ;
}
}
// end
// HTML // begin [file="/list.jsp";from=(113,2);to=(117,0)]
out.write("\r\n</table>\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 + -