You should put it like this if (request.getParameter("modify") != NULL) { if (request.getParameter("modify").equals("yes") { < your action here > } else { < your action here > } } else { < your action if the parameter is empty here > }
Otherwise you can end up with a NullPointerException from reading a NULL parameter. /Christopher > -----Original Message----- > From: Rama [mailto:[EMAIL PROTECTED]] > Sent: den 4 december 2001 11:17 > To: [EMAIL PROTECTED] > Subject: request.getParameter problem > > > Hi, > > it seems that request.getParameter does not always successful in POST > method. > is there any way to make it 100% successful? > > i'm using tomcat 4.01. > > if (request.getParameter("modify").equals("yes")) { > out.write("modify listings"); > } > > > Rama > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>