File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes encryption servlet filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "encryption servlet filter" Watch "encryption servlet filter" New topic
Author

encryption servlet filter

peter cooke
Ranch Hand

Joined: Mar 16, 2004
Posts: 314
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.

Any Suggestions


CIAO Peter M. Cooke
Darren Edwards
Ranch Hand

Joined: Aug 17, 2005
Posts: 69
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: encryption servlet filter
 
Similar Threads
setParameter
stylesheet messed up in richfaces JSF page
Simulating "request.setRequest"
how to set parameter and value from strutsconfig.xml file
A form with manu submit buttons