Share this page 

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


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