KyaPoocha.com

Huge Collection of Interview Questions


How do I find whether a parameter exists in the request object? 

boolean hasFoo = !(request.getParameter(”foo”) == null
|| request.getParameter(”foo”).equals(”"));

or

boolean hasParameter =
request.getParameterMap().contains(theParameter);
//(which works in Servlet 2.3+)



If you liked this question/asnwer, make sure you
Subscribe to KyaPoocha.com RSS feed!


BOOKMARK THIS : BlinkList | del.icio.us | Digg it | Furl | reddit | StumbleUpon | Yahoo MyWeb |