I think your code is to connect database with the databean. Why not just test your bean separately in your test environment. Or you can open your bean and find out those realted commands which connect to the database and replace it into you jsp and test if you can connect the database directly in your jsp.