文件名称:webshopping
介绍说明--下载内容均来自于网络,请自行研究使用
一个简单网上商城系统。实现有购物车等。
1.设计一个Item类,包括:一个商品对像,一个数量,一个小计
2.设计一个servlet类
先从session中取,看有没有Hashmap类,这是一个购物车
Hashmap类结构
键 值
商品id Item类
从session中取出HashMap:
1.先看session中有没有,有则取出,没有则创建
2.看HashMap中的键有没有这个商品的id号,如果表示第二次购买,则数量加1,没有则新建一个HashMap类
3.跳转页面-->显示购物车详细-A simple online store system. Realization of shopping carts.
Design an Item class, including: a commodity like a number, a small meter
(2) design a servlet class
Start the session to take to see if there Hashmap class, which is a shopping cart
The structure of the HashMap class
Key value
Goods the id the Item class
Remove the HashMap from the session:
A. Look at the session there, remove, did not create
2. HashMap key id of the commodity, if the second purchase, the number 1, does not create a new HashMap class
Jump page-> show cart in detail
1.设计一个Item类,包括:一个商品对像,一个数量,一个小计
2.设计一个servlet类
先从session中取,看有没有Hashmap类,这是一个购物车
Hashmap类结构
键 值
商品id Item类
从session中取出HashMap:
1.先看session中有没有,有则取出,没有则创建
2.看HashMap中的键有没有这个商品的id号,如果表示第二次购买,则数量加1,没有则新建一个HashMap类
3.跳转页面-->显示购物车详细-A simple online store system. Realization of shopping carts.
Design an Item class, including: a commodity like a number, a small meter
(2) design a servlet class
Start the session to take to see if there Hashmap class, which is a shopping cart
The structure of the HashMap class
Key value
Goods the id the Item class
Remove the HashMap from the session:
A. Look at the session there, remove, did not create
2. HashMap key id of the commodity, if the second purchase, the number 1, does not create a new HashMap class
Jump page-> show cart in detail
(系统自动生成,下载前可以参看下载内容)
下载文件列表
网上购物系统4\mysql-connector-java-5.0.6-bin.jar
.............\workspace\.metadata\.lock
.............\.........\.........\.log
.............\.........\.........\.plugins\com.genuitec.eclipse.desktop\dialog_settings.xml
.............\.........\.........\........\.....................easie.tomcat.myeclipse\tomcat\conf\catalina.policy
.............\.........\.........\........\...........................................\......\....\catalina.properties
.............\.........\.........\........\...........................................\......\....\context.xml
.............\.........\.........\........\...........................................\......\....\logging.properties
.............\.........\.........\........\...........................................\......\....\server.xml
.............\.........\.........\........\...........................................\......\....\tomcat-users.xml
.............\.........\.........\........\...........................................\......\....\web.xml
.............\.........\.........\........\...........................................\......\temp\safeToDelete.tmp
.............\.........\.........\........\...........................................\......\webapps\newsys\firstPage.jsp
.............\.........\.........\........\...........................................\......\.......\......\images\head.gif
.............\.........\.........\........\...........................................\......\.......\......\......\left.jpg
.............\.........\.........\........\...........................................\......\.......\......\index.jsp
.............\.........\.........\........\...........................................\......\.......\......\login.jsp
.............\.........\.........\........\...........................................\......\.......\......\META-INF\MANIFEST.MF
.............\.........\.........\........\...........................................\......\.......\......\WEB-INF\classes\com\icss\bean\Admin.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\....\News.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\....\NewType.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\dao\DBHelper.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\servlet\ShowFirsPage.class
.............\.........\.........\........\...........................................\......\.......\......\.......\lib\mysql-connector-java-5.0.6-bin.jar
.............\.........\.........\........\...........................................\......\.......\......\.......\web.xml
.............\.........\.........\........\...........................................\......\.......\Test\a.jsp
.............\.........\.........\........\...........................................\......\.......\....\b.jsp
.............\.........\.........\........\...........................................\......\.......\....\c.jsp
.............\.........\.........\........\...........................................\......\.......\....\EL1.jsp
.............\.........\.........\........\...........................................\......\.......\....\EL2.jsp
.............\.........\.........\........\...........................................\......\.......\....\index.jsp
.............\.........\.........\........\...........................................\......\.......\....\META-INF\MANIFEST.MF
.............\.........\.........\........\...........................................\......\.......\....\WEB-INF\classes\com\icss\bean\Student.class
.............\.........\.........\........\...........................................\......\.......\....\.......\web.xml
.............\.........\.........\........\...........................................
.............\workspace\.metadata\.lock
.............\.........\.........\.log
.............\.........\.........\.plugins\com.genuitec.eclipse.desktop\dialog_settings.xml
.............\.........\.........\........\.....................easie.tomcat.myeclipse\tomcat\conf\catalina.policy
.............\.........\.........\........\...........................................\......\....\catalina.properties
.............\.........\.........\........\...........................................\......\....\context.xml
.............\.........\.........\........\...........................................\......\....\logging.properties
.............\.........\.........\........\...........................................\......\....\server.xml
.............\.........\.........\........\...........................................\......\....\tomcat-users.xml
.............\.........\.........\........\...........................................\......\....\web.xml
.............\.........\.........\........\...........................................\......\temp\safeToDelete.tmp
.............\.........\.........\........\...........................................\......\webapps\newsys\firstPage.jsp
.............\.........\.........\........\...........................................\......\.......\......\images\head.gif
.............\.........\.........\........\...........................................\......\.......\......\......\left.jpg
.............\.........\.........\........\...........................................\......\.......\......\index.jsp
.............\.........\.........\........\...........................................\......\.......\......\login.jsp
.............\.........\.........\........\...........................................\......\.......\......\META-INF\MANIFEST.MF
.............\.........\.........\........\...........................................\......\.......\......\WEB-INF\classes\com\icss\bean\Admin.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\....\News.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\....\NewType.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\dao\DBHelper.class
.............\.........\.........\........\...........................................\......\.......\......\.......\.......\...\....\servlet\ShowFirsPage.class
.............\.........\.........\........\...........................................\......\.......\......\.......\lib\mysql-connector-java-5.0.6-bin.jar
.............\.........\.........\........\...........................................\......\.......\......\.......\web.xml
.............\.........\.........\........\...........................................\......\.......\Test\a.jsp
.............\.........\.........\........\...........................................\......\.......\....\b.jsp
.............\.........\.........\........\...........................................\......\.......\....\c.jsp
.............\.........\.........\........\...........................................\......\.......\....\EL1.jsp
.............\.........\.........\........\...........................................\......\.......\....\EL2.jsp
.............\.........\.........\........\...........................................\......\.......\....\index.jsp
.............\.........\.........\........\...........................................\......\.......\....\META-INF\MANIFEST.MF
.............\.........\.........\........\...........................................\......\.......\....\WEB-INF\classes\com\icss\bean\Student.class
.............\.........\.........\........\...........................................\......\.......\....\.......\web.xml
.............\.........\.........\........\...........................................