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