servletsaemsling

How to add or update request parameter in SlingHttpServletRequest | AEM


I have one use case where in servlet I need to process some data coming in SlingHttpServletRequest request parameter and some data retrieve from cookie. So I get remaining data from cookie and trying to add those data into request object and want to send the request object for further process. But unfortunately I am not able to update the SlingHttpServletRequest object parameters. Please help on this scenario.


Solution

  • I found below blogs where I found my answer and it resolved my issue.

    1. https://www.ocpsoft.org/opensource/how-to-safely-add-modify-servlet-request-parameter-values/
    2. https://nofluffjuststuff.com/blog/lincoln_baxter_iii/2010/02/how_to_safely_add__modify_servlet_request_parameter_values