all i wanted to do was add some debug parameters to my servlet and now i'm totally confused!!!
if (req.getParameter("debug".equals("y")
{
out.println("hello"
}
if the parameter is not set at all then i get a nullpointer exception *sometimes*. i say sometimes as i was using it at near the bottom of my doGet method fine but when i moved it up a bit i ran in to these problems.
am i supposed to catch any null pointer exception every time? if this is the case then i will live with it, but why did it work ok before??
if (req.getParameter("debug".equals("y")
{
out.println("hello"
}
if the parameter is not set at all then i get a nullpointer exception *sometimes*. i say sometimes as i was using it at near the bottom of my doGet method fine but when i moved it up a bit i ran in to these problems.
am i supposed to catch any null pointer exception every time? if this is the case then i will live with it, but why did it work ok before??