tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tremal Naik" <tremaln...@gmail.com>
Subject Re: Modifying the response
Date Thu, 02 Nov 2006 11:56:47 GMT
2006/11/2, Tremal Naik <tremalnaik@gmail.com>:
> 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", "https://cor319.whatever.com:8443/");
}

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

Do you think this is a correct way to proceed?

thanks

-- 
TREMALNAIK

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message