tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Modify request in a Vavle?
Date Mon, 03 May 2004 18:35:28 GMT

You can modify some things in a Valve, such as request headers.
Modifying the request content itself is trickier.  I haven't tried to do
that in a Valve, but since tomcat is open you can always modify the
connector if you're hell-bent on going this way.

Consider a Filter (javax.servlet.Filter) rather than a Valve if you need
to modify headers or otherwise customize the request.  A Filter in
combination with an HttpServletRequestWrapper is not only effective and
flexible, but also more portable than a Valve because it's not specific
to Tomcat.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Rui Zhang []
>Sent: Monday, May 03, 2004 2:34 PM
>Subject: Modify request in a Vavle?
>Hi there,
>  Is it possible to modify the content of a request (say, the SOAP
>message it carries) in a Tomcat valve? I was hoping to embed some info
>into the SOAP message and thus pass it to the subsequent Axis
>  I had a look at the Request structure Tomcat valve captures, but
>couldn't find any convenient way to achieve the above. Can any one give
>some suggestions?
>  Thank you very much.
>Best regards,
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message