I am looking to put togeather a filter which would simulate the siteminder web agent. This web agent puts two variables into the header, "sm-userid" & "sm-userdomain"; I would like to simulate this behavior but have not found any documentatio on adding header values. Can it be done? Regards, Joshua
Hello Joshua, When you say "adding header values" do you mean "adding HTTP response hearder values"? If yes, then you can use the HttpServletResponse interface methods (addHeader, addIntHeader, addDataHeader) to modify or add headers to the response stream. And, yes this can be done in a Filter becuase the response and request objectives are passed to the doFilter method. Regards, Bryan
Joined: Jun 04, 2001
Bryan, Siteminder adds header values to the request. I would like to simulate this for our development environment. Unfortunately adding headers to the response will not help me here. I have another filter which is looking for the siteminder information using request.getHeader("foo"). Any ideas? Regards, Joshua
I believe you can extend HttpServletRequestWrapper to create a class that will "wrap" a request to add your special functionality. Presumably you would then forward the wrapped request instead of the original one. Have not tried this myself. Bill
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Using filter, is it possible to insert name/value pair into header?