boolean hasFoo = !(request.getParameter("foo") == null || request.getParameter("foo").equals(""));
Tom Paris adds:
boolean hasParameter = request.getParameterMap().contains(theParameter);
(which works in Servlet 2.3+)
It seems like the right code would be:
boolean containsKey = request.getParameterMap().containsKey(param);
It would also be possible to ask for a value of the supplied key(param) using
boolean containsKey = request.getParameterMap().containsValue(param);