How can an HttpServletRequest parameter (especially in JSP) be unset or removed (like in PHP using the unset($_POST['index']) function)? I have tried the following.
Map requestMap=request.getParameterMap();
requestMap.remove("index");
but it says
No modifications are allowed to a locked ParameterMap
Is there a way to unset request parameters?
AFAIK, not within the JSP itself (or any Servlet for that matter).
But you could write a Filter that wrapped the current Request in a way that replaces the parameter map.