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+) |
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
도움이 되었나요? 예 아니요
Most helpful rated by users:
- What is Servlet?
- Why is Servlet so popular?
- What is servlet container?
- When a client request is sent to the servlet container, how does the container choose which servlet to invoke?
- If a servlet is not properly initialized, what exception may be thrown?