• Post Reply Bookmark Topic Watch Topic
  • New Topic

changing the value of a Header parameter

 
Javoso Torso
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

In a web app I am trying to change the value of some headers parameters.

The users first authenticate themself in another system and that system forward to my system with the information about the user in the header from where I can get the attributes with "request.getHeader".

For the logout I would like to clean up all that parameters.

Any way of doing this?

Thanks,
Javo
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can do this by wrapping the request in a filter.

I may have an example of how to do this but won't be able to look for it until the end of the business day (GMT - 5).
In the mean time google on HttpServletRequestWrapper and you may find some instructions for doing this...
 
Javoso Torso
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben!

I was searching for a while and I think I am comming (I hope) to a result soon...

Regards,
Javo
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/359641/Servlets/java/Setting-headers-Http-Request

There's the thread with a link to the sample app.

The app actually wraps the response object, not the request object but the concept is the same.

It should be more than enough to get you going.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!