Hello; I am writing a servlet filter that decrypts parameter=value on the way in, and encrypts things on the way out.
I can find lots of things on the internet that say this is what servlet filters are ment to do.
I can get the request parameter/values then encrypt/decrypt the name-value pair.
I am missing how to swap out the old parameter name-value pair for the new parameter name-value pair in the request. I don't want to change my parameters to attributes, because so many other classes depend on getParameter.
CIAO Peter M. Cooke
posted 10 years ago
You are not allowed to set parameters directly, but you can work around this.
Write your own wrapper subclass of HttpServletRequest that overrides the getParameter/s method/s. Your subclassed version can return the encrypted values either on the fly or from a precomputed cache.