An Online Bookstore implemented in Java that provides a platform for seller and buyer to trade.
一个用Java实现的买卖家在线交易书籍的网上书店。
- Java: JDK 1.7.0_79
- Server: Jetty 8
- Database: MySQL 5.1
- IDE: eclipse-jee-mars
One way to depoly this program is just to put Directory OnlineBookstore into webapp in Tomcat's or Jetty's Directory, while the other way is for debugging:
- setup MySQL 5.1 and start MySQL service;
- create a database named 'online_bookstore' and run online_bookstore.sql to import data;
- if you want to change the username and password of database, you can rewrite them in OperDB.java.
- import OnlineBookstore into IDE;
- select the JDK bin's installing path for the project while not using JRE;
- install Jetty plugin in eclipse;
- right click the project and click Run As -> Run Jetty. Be careful that Jetty's version should be '8.x.x', or annotations of WebServlet would not work and servlets' path cannot be found.
- you can also change the port and the context of this project(server) in Run As -> Run Configuration.
http://localhost/OnlineBookstore/SearchClServlet?dowhat=searchByRand
- use simple Java Servlet to get/forward request and send response.
- use MVC pattern to decouple View(JSP) from Controller(XXXClServlet) and Model(XXXBeanCl and XXXBean).
- create 6 key tables to undertake the tasks of all the bussinesses.For details you can reach online_bookstore.sql.
If you want to learn more about the development of this project, you can visit 网上书店简介.pdf and 网上书店开发文档.pdf.