Reference no: EM132218385
Answer the following Question :
1. Design login.html which has ID and Password in text box with Login button and also Create Account link.
2. Create Account link goes to newAccount.html which has ID and Password in text box with Create button.
3. Create button in the newAccount.html will go to newAccount.java servlet which should store ID and password in the cookie then go back to login.html.
3. When user click Login button in the login.html page, move to login.java servlet that validates following:
3.1 Check if login name user type is same as what was stored in cookie. If not, move user to newAccount.html.
3.2 After login name matches, check if password is same as what was stored in cookie. If not, go back to client browser with proper HTTP error code to display your own message "Password incorrect. Please login again." You should not use your own own error page. Use the default error page from browser.
4. After successful login, user moves to ShoppingCart.java servlet page that displays two shopping cart items that has following items only for each dropdown list. "Orange", "Apple", "Banna". The cart should have price and qty for each item as textbox.
5. After user select a product from dropdown list, if user clicks "Get Price" button, you need to goto ShoppingCart.java servlet page to get unit price for each product user selected from productList session and then display shopping cart with price. You must keep all product and qty user entered before.
6. You must store shopping cart data in session. So, if user logs in from new browser or new tab, the existing shopping cart items must show with price and qty they entered before.
7. At the bottom of shopping cart, you need to show sub total, tax (8.75%), and grand total.