O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Credit Cards and the Wallet

Now that you have addresses, you can write the wallet. A lot of the credit card code (see Listing 11.11) is very similar to the address code. I'm just going to discuss the areas that are different.

Listing 11.11. CreditCard.java
 package com.bfg.customer; import java.util.Vector; import java.util.HashMap; import java.util.Iterator; import org.apache.turbine.services.db.TurbineDB; import org.apache.turbine.util.db.pool.DBConnection; import org.apache.turbine.util.TurbineConfig; import com.bfg.exceptions.CustomerActivityException; import java.sql.*; import java.util.ResourceBundle; import org.apache.log4j.Category; import javax.naming.NamingException; import javax.naming.Context; import javax.naming.InitialContext; import ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required