How to replace/add parameters of request object

Discussions

Web tier: servlets, JSP, Web frameworks: How to replace/add parameters of request object

  1. How to replace/add parameters of request object (3 messages)

    Can anybody help me on changing or adding new parameters to request(HttpServletRequest) object?
    I haven't found a method like

    setParameter(String argParamName,String argParamValue)

    Thanks...
  2. That is an unusual requirement.
    I had to achieve the same thing once while creating a base class to represent a JUnit test case to test a servlet. We were forced to write our own implementation of the Servlet interface and add the setParameter method as an additional method.
    What's your scenario like?
  3. We have some web beans which adjust its output according to a parameter "ActionType" , but before this web bean produces its output some times it is necessary to change "ActionType" to another value than submitted by the user. This is the case ...
  4. You can do it with Filters and RequestWrapper.
    If you would download netBeans you'd be able to see examples (just select advanced filter template)