I would like to make one point that servlets are not intended to fetch data. Their only purpose is to provide for a controller block in the MVC architecture. Your classes for data access should take the responsibility of retreiving the data from the database. Your servlets should not have JDBC code mixed with them. It only makes the application difficult to debug.
If you are having a specific problem with accessing database, posting a relevant snippet of your code alongwith an exception stack trace, if any, would be helpful. I'd rather refrain myself from guesswork.
Happiness is good health and a bad memory.