Hi,
I have a curious problem. More academic at this point than anything else.
I am writing a login
servlet.
We are required by our client to not allow the user / customer to see any exceptions at all. Users need simply be redirected to a 'temporary difficulties' html page.
So, in addition to other checks, we've put in a method-wide try - catch in the doPost method that logs the error and redirects the user in case something untoward occurs.
Now, in updating and tweaking the code, I made an error in logic that was caught only in runtime. I was trying to call methods for an object before instantiation. No problem. It is now fixed.
But the question is, why was the runtime NullPointerException not caught? Why did it spit up to the browser level immediately? I even tried catching the NPE explicitly, to no effect.
Any thoughts on this?
I can post code snippets if anyone thinks them relevant.
Sanjay