1 23 24 package org.apache.catalina.deploy; 25 26 public final class Test { 27 28 public static void main(String args[]) { 29 30 String list[] = null; 31 32 System.out.println("Creating new collection"); 33 SecurityCollection collection = new SecurityCollection(); 34 35 System.out.println("Adding GET and POST methods"); 36 collection.addMethod("GET"); 37 collection.addMethod("POST"); 38 39 System.out.println("Currently defined methods:"); 40 list = collection.findMethods(); 41 for (int i = 0; i < list.length; i++) 42 System.out.println(" " + list[i]); 43 System.out.println("Is DELETE included? " + 44 collection.findMethod("DELETE")); 45 System.out.println("Is POST included? " + 46 collection.findMethod("POST")); 47 48 System.out.println("Removing POST method"); 49 collection.removeMethod("POST"); 50 51 System.out.println("Currently defined methods:"); 52 list = collection.findMethods(); 53 for (int i = 0; i < list.length; i++) 54 System.out.println(" " + list[i]); 55 System.out.println("Is DELETE included? " + 56 collection.findMethod("DELETE")); 57 System.out.println("Is POST included? " + 58 collection.findMethod("POST")); 59 60 } 61 62 } 63 | Popular Tags |