anchor.diff:  							for (int i = 0; i < quantity; i++)
   								pstmt3.executeUpdate();
   							conn.commit();
  -							response.sendRedirect("http://localhost:8080/CSE135Project/categories.jsp");
  -							rs4.close();
  -							pstmt4.close();
   						}
   					
   						catch (SQLException e)
  -						{
  -	%>
  -						<t:message type="danger" message="<%=e.getMessage() %>"/>
  -	<%						conn.rollback();
  +						{			
  +							conn.rollback();
  +							if (conn != null)
  +								conn.close();
  +							if (pstmt1 != null)
  +								pstmt1.close();
  +							if (pstmt2 != null)
  +								pstmt2.close();
  +							if (pstmt3 != null)
  +								pstmt3.close();
  +							if (pstmt4 != null)
  +								pstmt4.close();
  +							if (rs1 != null)
  +								rs1.close();
  +							if (rs2 != null)
  +								rs2.close();
  +							if (rs4 != null)
  +								rs4.close();
  +							response.sendRedirect("productorder.jsp?error=yes");
  +						}
  +						
  +						finally
  +						{
  +							conn.setAutoCommit(true);
   							if (conn != null)
   								conn.close();
   							if (pstmt1 != null)
  
positive.code: 				ResultSet rs4 = null;
  			
  				String product = "" + request.getParameter("product");
  				String action = "" + request.getParameter("action");
  				int quantity;
  				
  				try
  
negative.code: 								rs4.close();
  						}
  						
  						response.sendRedirect("http://localhost:8080/CSE135Project/categories.jsp");
  					}
  				
  					//Display cart contents
  