tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tremal Naik" <>
Subject Re: Modifying the response
Date Thu, 02 Nov 2006 11:56:47 GMT
2006/11/2, Tremal Naik <>:
> I'd like to filter the response to strip the unnecessary query string
> from the Location header. Should I use a Valve or a Filter or what?

I noticed that I can change the header Location after the invoke()
call in a Valve:

getNext().invoke(request, response);
String location = response.getHeader("Location");
if (location != null)
		response.setHeader("Location", "");

I don't get an IllegalStateException as I expected. Why?

Do you think this is a correct way to proceed?



To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message