/** * Returns a map with all request attributes.<p> * * @param req the request * * @return the attribute map */ public static Map<String, Object> getAtrributeMap(ServletRequest req) { if (req instanceof CmsFlexRequest) { return ((CmsFlexRequest)req).getAttributeMap(); } Map<String, Object> attrs = new HashMap<String, Object>(); Enumeration<String> atrrEnum = CmsCollectionsGenericWrapper.enumeration(req.getAttributeNames()); while (atrrEnum.hasMoreElements()) { String key = atrrEnum.nextElement(); Object value = req.getAttribute(key); attrs.put(key, value); } return attrs; }