Java – you can add the available parameters of a request (HttpServletRequest)
•
Java
I want to intercept a request in a filter / servlet and add some parameters However, the request does not expose an error in the "setparameter" method and parameter mapping indicating that it is locked Is there any way I can try?
Solution
Subclass httpservletrequestwrapper and override the getparameter method This class is described as follows:
In the filter, wrap the request in an instance of your subclass
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码