It's good to move database access into a set of classes that are separate from JSPs. This kind of thing is common and is sometimes called MVC2:
The Servlet acts as a controller. It pulls data out of the HttpRequest and figures out what POJO to call. A "Plain Old Java Object" is not part of any framework, and I like them to have no J2EE imports at all - no session or request or response. The POJO can read or write databases or whatever it needs to do and return data for the next page. The controller forwards to a JSP which formats the response and does nothing else.
Does that make sense?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi