KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openinventions > webappfilter > ResponseServletFilter


1 package com.openinventions.webappfilter;
2
3 import org.apache.commons.logging.*;
4 import javax.servlet.*;
5 import javax.servlet.http.*;
6
7 public class ResponseServletFilter implements javax.servlet.Filter JavaDoc {
8     private static final Log log = LogFactory.getLog(ServletFilter.class);
9
10     public void init(FilterConfig filterConfig) throws ServletException {
11     }
12     
13     public void destroy() {
14     }
15
16     public void doFilter (ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException {
17         request.setAttribute("com.openinventions.webappsecurity.Direction", "backward");
18     }
19
20 }
21 /* ====================================================================
22  * The MetaFramework License, Version 1.1
23  *
24  * Copyright (c) 2002 Ivar Chan. All rights
25  * reserved.
26  *
27  * Redistribution and use in source and binary forms, with or without
28  * modification, are permitted provided that the following conditions
29  * are met:
30  *
31  * 1. Redistributions of source code must retain the above copyright
32  * notice, this list of conditions and the following disclaimer.
33  *
34  * 2. Redistributions in binary form must reproduce the above copyright
35  * notice, this list of conditions and the following disclaimer in
36  * the documentation and/or other materials provided with the
37  * distribution.
38  *
39  * 3. The end-user documentation included with the redistribution,
40  * if any, must include the following acknowledgment:
41  * "This product includes software developed by
42  * Ivar Chan (http://www.openinventions.com/metaframework/)."
43  * Alternately, this acknowledgment may appear in the software itself,
44  * if and wherever such third-party acknowledgments normally appear.
45  *
46  * 4. The name "metaframework" must not be used to endorse or promote products
47  * derived from this software without prior written permission. For
48  * written permission, please contact ivarchan@acm.org.
49  *
50  * 5. Products derived from this software may not be called "metaframework",
51  * nor may "metaframework" appear in their name, without
52  * prior written permission of Ivar Chan.
53  *
54  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
55  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
56  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
57  * DISCLAIMED. IN NO EVENT SHALL THE IVAR CHAN BE LIABLE FOR ANY
58  * DIRECT, INDIRECT, INCIDENTAL,
59  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
60  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
61  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
62  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
63  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
64  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
65  * SUCH DAMAGE.
66  * ====================================================================
67  *
68  * This software consists of voluntary contributions made by many
69  * individuals. For more information on metaframework, please see
70  * <http://www.openinventions/metaframework/>.
71  */

72
73
74
Popular Tags