net.sf.ehcache.constructs.web

Class ResponseHeadersNotModifiableException

public class ResponseHeadersNotModifiableException extends CacheException

The javax.servlet.http.HttpServletResponse#setHeader(String, String) method sets a response header with the given name and value.

If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

In some cases, the javax.servlet.http.HttpServletResponse#setHeader(String, String) is ignored.

  1. The javax.servlet.ServletResponse#isCommitted().
  2. The javax.servlet.RequestDispatcher#include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method was used to call the resource.
Ehcache-constructs may set the "Accept-Encoding" header to "gzip". If the response is committed before it has a change to do this, the client may receive gzipped content, but not the gzip header. This will cause an error in Internet Explorer. Mozilla will recognise the content and ungzip it.

If this situation occurs, rather than continue, this exception is thrown.

Version: $Id: ResponseHeadersNotModifiableException.java 59 2006-04-30 03:41:39Z gregluck $

Author: Greg Luck

See Also: "SRV.8.3 in the Servlet 2.3 Specification"

Constructor Summary
ResponseHeadersNotModifiableException()
Constructor for the exception
ResponseHeadersNotModifiableException(String message)
Constructs an exception with the message given

Constructor Detail

ResponseHeadersNotModifiableException

public ResponseHeadersNotModifiableException()
Constructor for the exception

ResponseHeadersNotModifiableException

public ResponseHeadersNotModifiableException(String message)
Constructs an exception with the message given

Parameters: message the message