Re: Browser got incomplete html

2003-03-25 Thread Steven J. Owens
On Mon, Mar 24, 2003 at 09:25:36PM +, Jon Wingfield wrote:
> Have a look in the tomcat log files. Either catalina.out or
> localhost_log..txt. I'll bet there's an exception in one of those.
> If a jsp scriptlet or custom tag throws an uncaught exception Tomcat may
> not be able to forward to any predefined error pages because part of the
> response has already been flushed back to the client (browser). So, what
> you get is an IllegalStateException in the logs and a half-formed page
> in the browser.

 I've run into this fairly often.  I've also seen that sometimes
the exception is mysteriously swallowed, not printed to the log.  Most
often this seems to crop up with a bracket {} mis-configuration in
try/catch or if/else blocks.

 I've gotten to the point where, if I see an incomplete page, I
check the log, skim the page source to see if I can spot a bracket
mis-configuration, and then throw: 

try {
  ...
} catch (Throwable t) {
  t.printStackTrace(); 
}

 ...around the whole thing temporarily, to see if I can get an
exception stack trace to see what problem is actually causing the
behavior.

 I've also found it helpful on occasion to crack open the
generated java source and see if it indents properly in emacs/JDE.

Steven J. Owens
[EMAIL PROTECTED]

"I'm going to make broad, sweeping generalizations and strong,
 declarative statements, because otherwise I'll be here all night and
 this document will be four times longer and much less fun to read.
 Take it all with a grain of salt." - Me at http://darksleep.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Browser got incomplete html

2003-03-24 Thread Jon Wingfield
Have a look in the tomcat log files. Either catalina.out or
localhost_log..txt. I'll bet there's an exception in one of those.
If a jsp scriptlet or custom tag throws an uncaught exception Tomcat may
not be able to forward to any predefined error pages because part of the
response has already been flushed back to the client (browser). So, what
you get is an IllegalStateException in the logs and a half-formed page
in the browser.

Hope this helps,

Jon

Xiaoling Chen wrote:
> Hello,
> 
> I met this problem. My html page showed incompletely.
> Sometimes html tag like " half of the whole result showed. I read the source of the html,
> it seems browser got imcomplete html.
> 
> I'm using Tomcat4.1.18, Apache1.3.12 and mod_Jk2
> OS is solaris8.
> 
> Thanks for any help
> 
> Regards,
> Xiaoling 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Browser got incomplete html

2003-03-24 Thread Xiaoling Chen
Hello,

I met this problem. My html page showed incompletely.
Sometimes html tag like "