The problem may be many,
-You are not getting or need long wait to get DB connection
-Any exception was thrown
-An eternal loop
and so on ..
The better way to find out what went wrong is to find it from
tomcat logs or may be you start server from command prompt and see what or How your webapp behaves, (My be using some System.out lines )..