public static Map createSessionScopeMap ( PageContext pContext ) { final PageContext context = pContext ; return new EnumeratedMap ( ) { public Enumeration enumerateKeys ( ) { return context . getAttributeNamesInScope ( PageContext . SESSION_SCOPE ) ; } public Object getValue ( Object pKey ) { if ( pKey instanceof String ) { return context . getAttribute ( ( String ) pKey , PageContext . SESSION_SCOPE ) ; } else { return null ; } } public boolean isMutable ( ) { return true ; } } ; }
Creates the Map that wraps session - scoped attributes