struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abdullah Jibaly" <Abdullah.Jib...@aeroxchange.com>
Subject RE: trouble passing multiple parameters using <html:link>
Date Wed, 22 Jun 2005 20:54:36 GMT
Try it step by step. Before passing a map, pass the values hardcoded:

<html:link action="/partDetailView?storeNo=123&storeName=TheStore">Click Here</html:link>

And make sure that works. If it does, put storeNo and storeName into the storeInfo bean (you
dont have to use scriptlets):

<jsp:useBean id="storeInfo" class="java.util.HashMap">
<c:set target="storeInfo" property="storeNo" value="123" />
<c:set target="storeInfo" property="storeName" value="TheStore" />

And test again (I probably have an error somewhere so make sure to check the syntax).

Regards,
Abdullah

-----Original Message-----
From: Phani [mailto:phanidhar_j@yahoo.com]
Sent: Wednesday, June 22, 2005 1:30 PM
To: struts-user@jakarta.apache.org
Subject: trouble passing multiple parameters using <html:link>


Here is my code in the JSP page:

<bean:define id="param1"
name="stockingStoreSalesReviewForm"
property="storeNumber"/>

<bean:define id="param2"
name="stockingStoreSalesReviewForm"
property="storeName"/>
	
<%
   java.util.HashMap params = new java.util.HashMap();
   params.put("storeNo",param1);
   params.put("storeName",param2);
   pageContext.setAttribute("storeInfo", params);
%>

<html:link action="/partDetailView"
paramName="storeInfo" scope="page"> Click Here
</html:link>


In the Action class:

String storeNumber =
(String)request.getParameter("storeNo");


I am getting null in the storeNumber.

What went wrong!! Any help appreciated...


Thanks.


		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

---------------------------------------------------------------------
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


Mime
View raw message