//Retrieve the database connection info from the deployment descriptor
String dbUrl = getServletContext().getInitParameter("DbUrl");
String dbUsername = getServletContext().getInitParameter("DbUserName");
String dbPassword = getServletContext().getInitParameter("DbPassword");
User user = null; //this will hold the User object for the customer making the purchase
String loggedInUser = null; //this will hold the name of the user logged in to the session
//only process the checkout if the user is logged in
if (request.getSession().getAttribute("username") != null) {
//retrieve the name of the user logged in from the session data