users@glassfish.java.net

Unable to set ETag response header from a filter

From: <forums_at_java.net>
Date: Fri, 13 Jan 2012 23:01:24 -0600 (CST)

 I've been trying to set the ETag http response header from a filter, but my
setting is getting overidden. But if I set the response status to a 304 and
sendError() the etag will be sent:   response.setHeader("ETag",
eTag);response.sendError(HttpServletResponse.SC_NOT_MODIFIED);  
response.setHeader("ETag", eTag); chain.doFilter(request, response);
I've checked that the http-listener file cache is off, is there a setting
somewhere I can use? I am running over ssl, and read something that said to
try this in sun-web (which I have just renamed glassfish-web.xml), but still
not working. I'm able to set the Cache-Control header successfully in the
same place and I try to set ETag. <jsp-config>        <property
name="keepgenerated" value="true">            <description>Keep a copy
of the generated servlet class' java code.</description>       
</property>        <property name="securePagesWithPragma" value="false"
/></jsp-config>

--
[Message sent by forum member 'oversteer']
View Post: http://forums.java.net/node/882704