Review, Run and Understand the Sample Java Web application.
The current code, uses Java JSP and Servlets to allow a user to login to their account and view credit card data stored in the database. The functionality is relatively simple but several PCI compliance rules have been violated that will prevent the application from being approved by a PCI software auditor.
You should first load up the application, populate the database and make sure the application is working in your environment as expected. The application uses the Java Derby relational database. The script used to populate the application is attached in your project folder as well as the Java web project itself. You should be able to open the existing project using Netbeans. However; you may need to load the Derby drivers to the libraries for the project.
You can create a new database connection by clicking the services folder and then right mouse-click on Databases select new connection. You can then create a connection for the SDEV425 database. Below is a screen capture that represents my configuration.
2
There are some tutorials on the Internet on using the Derby database within Netbeans. (e.g. https://netbeans.org/kb/docs/ide/java-db.html) The key is making sure you have the drivers in the library of your project and you run the scrips to populate the tables. To execute a command in the database from within Netbeans you right click the connection and select execute command. A window will then pop-up for that connection and you can execute any command, including all of those database scripts provided to you.
3
Once you have the database loaded, you can try the application. (This assumes you have properly installed the Java EE when you installed Netbeans).
To launch the application, just highlight the java project you loaded (SDEV425_HW4) and click the green arrow. Once launched, your glassfish server will start and your default browser will be invoked. The application will automatically launch and the home page will be displayed.
You can (and definitely should) review the database script to see the current users and associated passwords. As a test, you can click the Sign in link and enter this account information
Email: james.robertson@umuc.edu Password: mypassword