Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 66443 invoked from network); 19 Jan 2011 23:16:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2011 23:16:30 -0000 Received: (qmail 78995 invoked by uid 500); 19 Jan 2011 23:16:28 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 78944 invoked by uid 500); 19 Jan 2011 23:16:28 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 78935 invoked by uid 99); 19 Jan 2011 23:16:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 23:16:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [200.23.76.22] (HELO smtp.afirme.com.mx) (200.23.76.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 23:16:20 +0000 X-AuditID: ac190116-0000000a00000c26-6d-4d3770ad6425 Received: from afiexnod2.afirme.net (afiexnod2.afirme.net [172.30.1.235]) by smtp.afirme.com.mx (Symantec Mail Security) with ESMTP id B12176BFA for ; Wed, 19 Jan 2011 17:15:57 -0600 (CST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Add a map to HttpRequest attributes Date: Wed, 19 Jan 2011 17:16:51 -0600 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Add a map to HttpRequest attributes Thread-Index: Acu4J4IYGDvmZUe0SDKKFwFhM1Ix4gABnwkg References: From: "Alfredo Manuel Osorio Martinez" To: "Struts Users Mailing List" X-Brightmail-Tracker: AAAAAA== X-Virus-Checked: Checked by ClamAV on apache.org What about iterating the map and put each attribute in the HttpRequest. Something like this: Map myMap =3D getMyMap(); Set> entrySet =3D myMap.entrySet(); for (Map.Entry entry : myMap.entrySet()) { request.setAttribute(entry.getKey(), entry.getValue()); } Alfredo Osorio -----Mensaje original----- De: Dave Evans [mailto:dsevans93@gmail.com]=20 Enviado el: Wednesday, January 19, 2011 4:21 PM Para: Struts Users Mailing List Asunto: Add a map to HttpRequest attributes Hello, I have a business layer method that returns a map of objects. I would like to put all of the keys and values of this map into the request attribute map, like this: HttpRequest.putAll(map); This of course doesn't work, as the request isn't a map and the attributes map isn't available as a map. Are there any Struts or Apache commons utils that will do this? Thanks, Dave --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org