JSP Incomplete Load

I have got a JSP page which connects to a database and displays information that has a weird behavior lately:

sometimes it displays data correctly

some other times it simply loads incompletely... like ending in the middle of a sentence.

JSP is compiled OK.

I think it might have something to do with the database not being fast enough for fetching data and feeding the JSP page but I have no clue how to solve this problem.

What can I do? Is there any Directive like "wait patiently"! haha

Really, any help is appreciated!

[565 byte] By [Gabriel.Galvaoa] at [2007-11-27 3:36:05]
# 1

I don't think it's a problem with the database but with your code. When I get problems like that ( a page loads only halfway; even the HTML source end in the middle of a tag way before the actual JSP code starts ) it's usually because of some exception.

Try looking through your logs to see if that particular JSP is throwing an exception. My guess is a NullPointerException or some malformed parameter to your SQL query...

nogoodatcodinga at 2007-7-12 8:39:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

This problem happens when you get an exception when the response has already been comitted: this happens when too much output was already generated and it is flushed to the browser. When the response is committed no redirect or forward can be performed anymore, so the webserver cannot send you to the error page to display the error, execution simply stops.

Like the previous poster suggested, the exception will be in the logs of the webserver.

gimbal2a at 2007-7-12 8:39:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Guys, thanks for the feedback.

Problem is solved.

Hope to explain it here so that other people won't waste the same amount of time that I have wasted.

The problem with me was that for a reason I don't know the embedded Tomcat that ships with Netbeans 5.5 wasn't spitting out the error message.

I've tried reading logs and all sorts of things but no chance.

What did I do? Switched to JBoss (which uses the same Tomcat, I know) but it was much more verbose and the exception came right in front of my nose.

Gabriel.Galvaoa at 2007-7-12 8:39:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
can anyone please help me through 100% same problem but it is happening to me in Oracle Application Server 10g R2. Can it be beacuse of same reason i.e anyone exprerienced this in Oracle App Server. Or is it matter of time out.Thanks.
mi1400@yahoo.coma at 2007-7-12 8:39:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...