package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import bookshop.DataAccess;
import java.util.*;
public final class main_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=GB2312");
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("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("index\r\n");
out.write("</title>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<center>\r\n");
out.write("<h1>\r\n");
out.write("欢迎光临图书世界!\r\n");
out.write("</h1>\r\n");
out.write("</center>\r\n");
out.write("<form action=\"\" method=\"POST\">\r\n");
out.write(" <table align=\"center\" width=\"75%\">\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("\r\n");
out.write(" ");
session.setAttribute("books",null);
DataAccess da=new DataAccess();
ResultSet rs=da.GetProducts("select * from bookInfo");
if(rs!=null)
{
while(rs.next())
{
String[] books=new String[4];
books[0]=rs.getString(1);
books[1]=rs.getString(2);
books[2]=rs.getString(3);
books[3]=rs.getString(4);
out.write("\r\n");
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td>");
out.print(books[0] );
out.write("</td>\r\n");
out.write(" <td>");
out.print(books[1] );
out.write("</td>\r\n");
out.write(" <td>");
out.print(books[2] );
out.write("</td>\r\n");
out.write(" <td>");
out.print(books[3] );
out.write("</td>\r\n");
out.write(" <td><a href=\"/bookModule/buyservlet?book=");
out.print(books[0] );
out.write("\">加入购物车</a></td>\r\n");
out.write(" </tr>\r\n");
out.write("\r\n");
out.write(" ");
}}
out.write("\r\n");
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td colspan=\"5\">\r\n");
out.write(" <input type=\"button\" value=\"查看商品库存\" onclick=\"window.location.href('display.jsp')\"/>\r\n");
out.write(" <input type=\"button\" value=\"查看购物车\" onclick=\"window.location.href('showInfo.jsp')\"/>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("</form>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
out.write("\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);
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
JavaWeb做的购物车
共94个文件
class:15个
java:12个
jsp~1~:4个
需积分: 9 55 下载量 125 浏览量
2008-03-07
08:17:12
上传
评论 1
收藏 173KB RAR 举报
温馨提示
初学,用java做的购物车,欢迎讨论!
资源推荐
资源详情
资源评论
收起资源包目录
bookShop.rar (94个子文件)
bookShop
bak
bookshop
buyServlet.java~11~ 2KB
DataAccess.java~1~ 1KB
buyServlet.java~13~ 4KB
buyServlet.java~12~ 4KB
buyServlet.java~8~ 2KB
buyServlet.java~10~ 2KB
buyServlet.java~6~ 2KB
buyServlet.java~9~ 2KB
buyServlet.java~7~ 2KB
buyServlet.java~4~ 2KB
buyServlet.java~5~ 2KB
bookModule
index.jsp~19~ 1KB
main.jsp~5~ 420B
index.jsp~21~ 1KB
index.jsp~20~ 1KB
showInfo.jsp~5~ 1KB
main.jsp~10~ 1KB
display.jsp~1~ 187B
showInfo.jsp~1~ 188B
WEB-INF
web.xml~153~ 1KB
web.xml~155~ 1KB
web.xml~149~ 575B
web.xml~157~ 1KB
web.xml~150~ 575B
web.xml~151~ 1KB
web.xml~154~ 575B
web.xml~156~ 575B
web.xml~148~ 1KB
web.xml~152~ 575B
index.jsp~23~ 1KB
index.jsp~26~ 1KB
index.jsp~22~ 1KB
info.jsp~1~ 331B
showInfo.jsp~6~ 1KB
main.jsp~6~ 422B
main.jsp~2~ 1KB
main.jsp~8~ 1KB
index.jsp~27~ 1KB
showInfo.jsp~3~ 1KB
showInfo.jsp~7~ 1KB
showInfo.jsp~9~ 1KB
main.jsp~7~ 401B
index.jsp~24~ 1KB
showInfo.jsp~4~ 1KB
showInfo.jsp~10~ 1KB
main.jsp~9~ 1KB
showInfo.jsp~8~ 1KB
showInfo.jsp~2~ 1KB
index.jsp~25~ 1KB
main.jsp~3~ 710B
index.jsp~28~ 1KB
main.jsp~4~ 720B
main.jsp~1~ 184B
bookModule
WEB-INF
web.xml 575B
classes
bookshop
DataAccess.class 1KB
BaseDao.class 2KB
buyServlet.class 3KB
main.jsp 1KB
display.jsp 992B
showInfo.jsp 1KB
books_Data.MDF 1024KB
bookShop.jpx.local~ 3KB
src
bookshop
buyServlet.java 4KB
BaseDao.java 1KB
DataAccess.java 1KB
buyServlet.jbx 37B
classes
bookshop
DataAccess.class 1KB
BaseDao.class 2KB
buyServlet.class 3KB
package cache
bookshop.dep2 4KB
Generated Source
.jsp
bookModule
org
apache
jsp
info_jsp.java 2KB
display_jsp.java 3KB
index_jsp.java 3KB
main_jsp.java 3KB
showInfo_jsp.java 3KB
jsp cache
bookModule
package cache
org.apache.jsp.dep2 5KB
org
apache
jsp
index_jsp.class 4KB
info_jsp.class 3KB
showInfo_jsp.class 4KB
display_jsp.class 4KB
main_jsp.class 4KB
bookShop.jpx 9KB
books_Log.LDF 1024KB
bookShop.jpx.local 3KB
Tomcat
work
bookModule
tldCache.ser 44B
org
apache
jsp
index_jsp.class 5KB
display_jsp.java 4KB
index_jsp.java 4KB
main_jsp.java 4KB
showInfo_jsp.class 5KB
showInfo_jsp.java 4KB
display_jsp.class 4KB
main_jsp.class 5KB
webapps
Servlet.library 227B
共 94 条
- 1
资源评论
qq350861146
- 粉丝: 1
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功