Results 1 to 1 of 1
-
Servlet - Checking the existance of a field in HttpServletRequest
The method below can be used in a Servlet to check if a field is present in the request object. Which means it can be used to check if the form or the page that posted to your current Servlet, contains the required field or not.
Java Code:public isDefined(HttpServletRequest req, String fieldNameToSearchFor) { return req.getParameterMap().containsKey(fieldNameToSearchFor); }
Similar Threads
-
checking if there are equal numbers
By nalinda in forum New To JavaReplies: 1Last Post: 11-18-2007, 06:21 AM -
need help checking monthlyRate entry
By lowpro in forum New To JavaReplies: 1Last Post: 11-17-2007, 05:15 AM -
javax.servlet.ServletException: Wrapper cannot find servlet class util.t2
By osval in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 03:47 PM -
HttpServletRequest request size
By Ed in forum Java ServletReplies: 2Last Post: 07-02-2007, 02:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks