In a Servlet, check if Form Field is presentTag(s): Servlet/JSP

public isDefined(HttpServletRequest req, String fieldNameToSearchFor) {
   return req.getParameterMap().containsKey(fieldNameToSearchFor);
}



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2011
[ home ]