01: package winstone.testApplication.filters;
02:
03: import java.io.IOException;
04:
05: import javax.servlet.Filter;
06: import javax.servlet.FilterChain;
07: import javax.servlet.FilterConfig;
08: import javax.servlet.ServletException;
09: import javax.servlet.ServletOutputStream;
10: import javax.servlet.ServletRequest;
11: import javax.servlet.ServletResponse;
12:
13: public class WriteAfterServletFilter implements Filter {
14:
15: public void init(FilterConfig filterConfig) throws ServletException {
16: }
17:
18: public void destroy() {
19: }
20:
21: public void doFilter(ServletRequest request,
22: ServletResponse response, FilterChain chain)
23: throws IOException, ServletException {
24: chain.doFilter(request, response);
25: ServletOutputStream os = response.getOutputStream();
26: os.print("Hello");
27: }
28:
29: }
|