Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: Setting/changing authorization header in Tomcat 5.*

Mark Thomas

2007-01-16

Replies:

Eugeny N Dzhurinsky wrote:
> Hello!
>
> Could somebody please advice what is a best way to implement a valve class,
> which will just add custom authorization header if request matches some
> conditions?

If you want to add a header then something like this should work but I
haven't tested it at all.

MessageBytes mb =
o.a.c.connector.Request.getCoyoteRequest().getMimeHeaders().addValue("HeaderName");
mb.setString("HeaderValue");

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.