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

The Category Class

Now that you have products to put in it, you can create your Category object (see Listing 9.11). Again, most of it will look very familiar.

Listing 9.11. The Category Class
 package com.bfg.product; import java.util.Vector; import java.util.Set; import java.util.HashMap; import java.util.Iterator; import java.text.NumberFormat; import java.text.SimpleDateFormat; 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.ProductActivityException; import java.sql.*; import java.util.ResourceBundle; import org.apache.turbine.util.Log; public class Category { private static ResourceBundle sql_bundle = ResourceBundle.getBundle("com.bfg.product.SQLQueries"); ...

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