net.sf.ehcache.constructs.web
Class ResponseHeadersNotModifiableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sf.ehcache.CacheException
net.sf.ehcache.constructs.web.ResponseHeadersNotModifiableException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AlreadyCommittedException
public class ResponseHeadersNotModifiableException
- extends net.sf.ehcache.CacheException
The 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 HttpServletResponse.setHeader(String, String) is ignored.
- The
ServletResponse.isCommitted().
- The
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 744 2008-08-16 20:10:49Z gregluck $
- Author:
- Greg Luck
- See Also:
- "SRV.8.3 in the Servlet 2.3 Specification",
Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ResponseHeadersNotModifiableException
public ResponseHeadersNotModifiableException()
- Constructor for the exception
ResponseHeadersNotModifiableException
public ResponseHeadersNotModifiableException(String message)
- Constructs an exception with the message given
- Parameters:
message - the message
Copyright © 2003-2011 Terracotta, Inc.. All Rights Reserved.