1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts.scripting;
23
24
25 import java.util.Properties;
26
27
28 import org.apache.commons.logging.Log;
29 import org.apache.commons.logging.LogFactory;
30
31
32 import org.apache.bsf.BSFManager;
33
34
35 /**
36 * Tests to make sure the filtering system is working.
37 */
38 public class TestFilter implements BSFManagerFilter {
39
40 /** Logging instance. */
41 private static final Log LOG = LogFactory.getLog(TestFilter.class);
42
43 /**
44 * Initializes the filter.
45 *
46 * @param name The name of the filter
47 * @param props The properties
48 */
49 public void init(String name, Properties props) {
50 LOG.info("Initializing TestFilter");
51 }
52
53 /**
54 * Applies the filter.
55 *
56 * @param mgr The bsf manager
57 * @return The bsf manager
58 */
59 public BSFManager apply(BSFManager mgr) {
60 LOG.info("Filtering in TestFilter");
61 return mgr;
62 }
63 }