资源简介

这是一个参照书上,并进行相关改善,已经实现了的购物车程序,对于Ajax或JSP初学者来说有一定引导作用,希望对大家有帮助!

资源截图

代码片段和文件信息

package ajax.biz;
import java.sql.*;

public class Product {
     private String productId = null;
     private String productName = null;
     private float productPrice = 0;
     private int productsNum = 0;
     
     public Product(String productId){
      try {
  Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“)
  .newInstance();
  String url = “jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=bookstore“;
  String user = “sa“;
  String password = ““;
  Connection conn = DriverManager.getConnection(url user password);
  String sql = “select * from products where pid = ?“;
  ResultSet rs = null; 
             PreparedStatement pstmt = null;
             
             pstmt = conn.prepareStatement(sql);
             pstmt.setStr

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        574  2011-04-04 09:55  ShoppingCart\.classpath

     文件        309  2011-04-04 09:14  ShoppingCart\.mymetadata

     文件       1418  2011-04-04 09:54  ShoppingCart\.project

     文件        500  2011-04-04 09:14  ShoppingCart\.settings\.jsdtscope

     文件        330  2011-04-04 09:14  ShoppingCart\.settings\org.eclipse.jdt.core.prefs

     文件         49  2011-04-04 09:14  ShoppingCart\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2011-04-04 09:14  ShoppingCart\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       1967  2011-04-04 19:14  ShoppingCart\src\ajax\biz\Product.java

     文件       1710  2011-04-04 19:23  ShoppingCart\src\ajax\biz\ShoppingCart.java

     文件        356  2011-04-04 09:35  ShoppingCart\WebRoot\cart.css

     文件       1267  2011-04-05 15:00  ShoppingCart\WebRoot\cart.js

     文件       2192  2011-04-04 19:37  ShoppingCart\WebRoot\cart.jsp

     文件       1308  2011-04-04 18:58  ShoppingCart\WebRoot\DoCart.jsp

     文件       1812  2011-04-04 17:31  ShoppingCart\WebRoot\index.jsp

     文件         36  2011-04-04 09:14  ShoppingCart\WebRoot\meta-INF\MANIFEST.MF

     文件       2504  2011-04-04 19:14  ShoppingCart\WebRoot\WEB-INF\classes\ajax\biz\Product.class

     文件       2267  2011-04-04 19:23  ShoppingCart\WebRoot\WEB-INF\classes\ajax\biz\ShoppingCart.class

     文件     284752  2002-04-19 17:03  ShoppingCart\WebRoot\WEB-INF\lib\msbase.jar

     文件      64856  2002-04-19 17:03  ShoppingCart\WebRoot\WEB-INF\lib\mssqlserver.jar

     文件      59865  2002-04-22 09:38  ShoppingCart\WebRoot\WEB-INF\lib\msutil.jar

     文件        371  2011-04-04 09:14  ShoppingCart\WebRoot\WEB-INF\web.xml

     目录          0  2011-04-04 11:15  ShoppingCart\WebRoot\WEB-INF\classes\ajax\biz

     目录          0  2011-04-04 10:55  ShoppingCart\WebRoot\WEB-INF\classes\ajax

     目录          0  2011-04-04 11:15  ShoppingCart\src\ajax\biz

     目录          0  2011-04-04 10:55  ShoppingCart\WebRoot\WEB-INF\classes

     目录          0  2011-04-04 09:55  ShoppingCart\WebRoot\WEB-INF\lib

     目录          0  2011-04-04 10:55  ShoppingCart\src\ajax

     目录          0  2011-04-04 09:14  ShoppingCart\WebRoot\meta-INF

     目录          0  2011-04-04 09:14  ShoppingCart\WebRoot\WEB-INF

     目录          0  2011-04-04 09:14  ShoppingCart\.myeclipse

............此处省略7个文件信息

评论

共有 条评论