How to set a parameter in a HttpServletRequest?

后端 未结 7 896
感动是毒
感动是毒 2021-02-01 03:16

I am using a javax.servlet.http.HttpServletRequest to implement a web application.

I have no problem to get the parameter of a request using the getParamete

7条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 03:31

    Sorry, but why not use the following construction:

    request.getParameterMap().put(parameterName, new String[] {parameterValue});
    

提交回复
热议问题