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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.