When using page caching with filters that wrap a servlet response, EAServer must have access to the response. To provide access to the response, the wrapper must implement a getResponse method that returns a ServletResponse object. To implement the wrapper, you can either:
Extend the Servlet 2.3 API javax.servlet.http.HttpServletResponseWrapper class, which implements the getResponse method, or
Extend the javax.servlet.http.HttpServletResponse class and implement the getResponse method yourself.
Also, EAServer caches a servlet response immediately after the servlet executes. Therefore, if a filter modifies a response after the servlet executes, the modifications are not saved to the cache.
For more information about creating and using filters, see Chapter 23, “Using Filters and Event Listeners,” in the EAServer Programmer’s Guide.
Copyright © 2005. Sybase Inc. All rights reserved. |