It's simple realization of the web-application - internet shop. This shop has simple UI which done by CSS and JSP pages(HTML, JSPTL). Project has: authentic and authorization filter. Dao layer with two implementation: Lists and JDBC. Service layer with logic between Dao and Servlets. View layer with pages.
- Java 11
- Maven 4.0.0
- Tomcat 8.5.50
- Servlet 3.1
- MySQL 8.0.17
- Logger log4j 1.2.17
- JSTL 1.2
- Click "Inject" button.
- And after you can login as user with login - user and password - user.
- And as admin with login - admin and password - admin.
- Or you can register new user.
User can:
- watch item list
- add and delete items into his bucket
- create order from bucket with items
- delete his orders
Administrator can:
- add/delete(manage) items into item list
- watch and manage users list
- watch and manage orders list
- Open this project in IDE as Maven project
- Install and configure Tomcat:
- add artifact;
- add sdk 11;
- add sdk 11 in project structure;
- Install and configure MySQL:
- Run script from src/main/resources/init_db.sql in MySQL;
- In mate/academy/internetshop/factory/FactoryForAllDao.java class use your login and password to create a connection;
- Configure log4j.properties if you want to check log:
- change path in src/main/resources/log4j.properties to path where you want to create log file;
- Run project
- It can be running with SQL or with Lists implementation
- If you want change impl to list
- Change "BucketDao", "UserDao", "ItemDao", "OrderDao" in Factory from "JDBC impl" to "simple impl":
- EXAMPLE
- CHANGE FROM:
- public static BucketDao getBucketDao() {
- if (bucketDao == null) {
- bucketDao = new BucketDaoJdbcImpl(connection); }
- return bucketDao;
- }
- TO:
- public static BucketDao getBucketDao() {
- if (bucketDao == null) {
- bucketDao = new BucketDaoImpl(); }
- return bucketDao;
- }