HttpServletRequest - SetParameter

encoding, java, servlets

Solution

No, there is not.

You can only change attributes, not parameters.

The only way to achieve something similar would be to wrap the request (with a class that returns something else for getParameter).

Related curiosity: There is a bug in some servlet containers that would let you do `request.getParameterValues(name)[0] = "newValue"`, but this can only lead to inconsistencies.

Problem

I know that I can use `HttpServletRequest.getParameter()` to get the URL parameter values. Is there an equivalent method with which I can set/replace the value?

Original source