The best implementation of this is to have one class that both your servlets and
jsp's have access to for each table in your database with variables corresponding to each field in your database. Each time you need access to the database, use only this class. That way, you can synchronize on that class and you'll never have to worry about having bad data, especially when adding new data or updating. Just doing selects, it isn't as big of a deal, but it is still much more managable having just one class that both servlets and the jsp has access to.