PDA

View Full Version : Getting Blank Page on getting a servlet exception


milindpatil
03-04-2009, 12:45 PM
Hi,

In my project i have a jsp which goes to error page jsp in case of exceptions or errors. Now if i try to get a null pointer exception (doing this - String test = null; int a = test.length() ) in the error page jsp i am getting a blank screen, instead of a null pointer exception or 500 servlet exception.

So flow should be like this:

main jsp (if error) -> error page jsp (if error) --> servlet exception

I am using resin as the webserver and have enabled jsp filtering.
Also i am not able to do the view source of the blank page.

Please help with as to why such a thing should happen in the first place. :confused:
Thanks

shyam
03-04-2009, 07:02 PM
what do you have in the error-page jsp? whatever it is you should be able to view the source of the generated html..

milindpatil
03-05-2009, 02:06 PM
Sorry cannot post the jsp code its work related (against company policy :o). But I am sure the coding is not the problem in my case.

In short i am doing this:
From main jsp if error or exception occurs i catch it and populate an error linklist with the description of error message and some code for type of error, which is passed to the error page jsp. Now error Page jsp reads the Linklist and displays the message(s).

My situation is if i try to put a bug in the error page jsp it should give some servlet exception in screen. Instead its giving a blank screen.

Is there some limitation for the servlet response. I have heard from a friend that if response is less than 200 bites then its scraped. :confused: :confused:

Balu Sadhasivam
03-07-2009, 08:33 PM
Do you get any errors in log ? may be exception in error page itself..

200 bytes is very less indeed.. and default buffer size for jsp is 8kb.