Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 84498 invoked from network); 26 May 2003 22:41:54 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 26 May 2003 22:41:54 -0000 Received: (qmail 17798 invoked by uid 97); 26 May 2003 22:44:09 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@nagoya.betaversion.org Received: (qmail 17791 invoked from network); 26 May 2003 22:44:09 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 26 May 2003 22:44:09 -0000 Received: (qmail 82555 invoked by uid 500); 26 May 2003 22:41:36 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 82544 invoked from network); 26 May 2003 22:41:35 -0000 Received: from mta01-svc.ntlworld.com (62.253.162.41) by daedalus.apache.org with SMTP; 26 May 2003 22:41:35 -0000 Received: from talk21.com ([80.4.6.198]) by mta01-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20030526224141.OZLL2283.mta01-svc.ntlworld.com@talk21.com> for ; Mon, 26 May 2003 23:41:41 +0100 Date: Tue, 27 May 2003 00:41:38 +0200 Subject: Re: multiple parameter and map Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Mark Lowe To: "Struts Users Mailing List" Content-Transfer-Encoding: 7bit In-Reply-To: <000001c323d3$0d87c8a0$a017d8d9@pardo> Message-Id: <363FEBB8-8FCB-11D7-8571-0003937DAEC0@talk21.com> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You need to get the map to an available context //in your scriplet or action servlet Map map = new HashMap(); map.put("nombre", ((prueba)muestraProfesores).getNombre()); map.put("apellido1",((prueba)muestraProfesores).getApellido1()); map.put("apellido2",((prueba)muestraProfesores).getApellido2()); request.setAttribute("myMap",map); // or better in pageContext //jsp Hi everybody! > > I want to pass to an action from the view 3 parameter, I read on the > documentation that I have to put in a map, and then with a link and > paramName, send to the action. > I do this but in the action I get always null instead the parameter > That is what I do .. > > > > > > > > > > >
name="muestraProfesores" property="nombre"/> > name="muestraProfesores" property="apellido1"/> > name="muestraProfesores" property="apellido2"/> > > > <% Map map = new HashMap(); > map.put("nombre", ((prueba)muestraProfesores).getNombre()); > > map.put("apellido1",((prueba)muestraProfesores).getApellido1()); > > map.put("apellido2",((prueba)muestraProfesores).getApellido2()); > %> > > paramName="map" target="princAdmin"> Edicion de profesor > action="/vistaProfesores.do?method=borra" paramName="map" > target="princAdmin"> Borra este profesor
>
> > in the action I retrieve the values with ... > > (String)request.getParameter("nombre"); > (String)request.getParameter("apellido1"); > (String)request.getParameter("apellido2"); > > What am I doing wrong? > > PD: is there another possibility rather than use a map to pass > multiple > request parameter? (and not using JSTL). > > Thanks a lot!!! > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: struts-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org