A simple wallet implementation project where users can manage their wallet amount. This project was done using JSP and servlets.
Project Requirements :
Wallet project requirements:
1. Sing up page ("/signup", fields: name, email, password, confirm password, phone number, Method: POST
2. Sign in page ("/login", fields: email, password Method: POST)
3. Add money to wallet ("/addmoney", fields: cash, tip: just have an upper limit and accept whatever they add, Method: POST)
4. View wallet ("/wallet", information: Name, cash, Method: GET)
4. Use money ("/transact", fields: Usage Comments, Amount Method: POST)
Constraints:
1. Only logged in user can add/use money
2. Unauthorized to access to URLs should redirect user to Sign in page
3. Try to avoid scriptlet tags, use EL and JSTL instead.
4. Try to put as much as business away from JSP. Put it in java classes/servlets instead...
5. Add client and server side validations.
Technologies Used :
- JSP ( with JSTL and EL)
- Servlets
- JDBC ( for connecting to MySQL Database)
- MySQL
- CSS
- HTML
Some of the important things to learn from this project :
- Usage of JSP with Expression language and JSTL without using JSP scriptlets
- Usage of Servlets at server side
- Usage of servlet filter to check whether user authenticated or not.
- JDBC connection
- MySQL queries and usage of prepared statements to avoid SQL injection
- Accessing the resources(JSP's) which are inside the WEB-INF(protected area) using servlets.
- Session management to provide user login and logout functionality.
How to run this project :
- Create the database schema and table using the Db_Design_and_queries.txt(https://github.com/NageswaraRaoMaridu/wallet/blob/master/Db_Design_and_queries.txt)
- Clone the repository using the below command
- checkout master branch
git checkout master
- In eclipse, import this project as maven project
- Go to the Java class DbConnectionProvider.java and provide your databse settings.
- Configure Tomcat server
- Right click on project and then run on server.
- Access the application using the below link
Please feel free to add merge request with issue fixes/improvements.