public static void dumpServletContext ( ServletContext context , PrintStream output ) { if ( output == null ) { output = System . err ; } output . println ( "*** ServletContext " + context ) ; for ( Enumeration e = context . getAttributeNames ( ) ; e . hasMoreElements ( ) ; ) { String name = ( String ) e . nextElement ( ) ; output . println ( " attribute " + name + " = " + context . getAttribute ( name ) ) ; } }
Print attributes in the given ServletContext .