You get the NullPointerExceptions when you try to refer to un-initialized references. Make sure all your references are initialized. If you are reading the request parameters make sure you perform a null check before using the parameter value.
i.e.:
or more effectively;
In the above code I use an empty
string to avoid null refernce.
You can't throw NullPointerExceptions around because they are Runtime Exceptions and should never occure if you take necessary care to avoide them.
[ September 06, 2006: Message edited by: Isuru Sampath ]