Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Servlets%20Interview%20Questions%20and%20Answers

Question: Request parameter How to find whether a parameter exists in the request object?
Answer: 1.boolean hasFoo = !(request.getParameter("foo") == null || request.getParameter("foo").equals(""));
2. boolean hasParameter = request.getParameterMap().contains(theParameter);
(which works in Servlet 2.3+)
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook