01: package org.apache.catalina.deploy;
02:
03: public final class Test {
04:
05: public static void main(String args[]) {
06:
07: String list[] = null;
08:
09: System.out.println("Creating new collection");
10: SecurityCollection collection = new SecurityCollection();
11:
12: System.out.println("Adding GET and POST methods");
13: collection.addMethod("GET");
14: collection.addMethod("POST");
15:
16: System.out.println("Currently defined methods:");
17: list = collection.findMethods();
18: for (int i = 0; i < list.length; i++)
19: System.out.println(" " + list[i]);
20: System.out.println("Is DELETE included? "
21: + collection.findMethod("DELETE"));
22: System.out.println("Is POST included? "
23: + collection.findMethod("POST"));
24:
25: System.out.println("Removing POST method");
26: collection.removeMethod("POST");
27:
28: System.out.println("Currently defined methods:");
29: list = collection.findMethods();
30: for (int i = 0; i < list.length; i++)
31: System.out.println(" " + list[i]);
32: System.out.println("Is DELETE included? "
33: + collection.findMethod("DELETE"));
34: System.out.println("Is POST included? "
35: + collection.findMethod("POST"));
36:
37: }
38:
39: }
|