Hi Nikita,

Here is some code snippet which will help you.


java.util.Map paramMap = new java.util.HashMap();
                                       paramMap.put("id",id);
paramMap.put("locationId",locationId); pageContext.setAttribute("paramMap",paramMap);

<td><html:link action="sopView.do" name="paramMap"><bean:message key="common.label.view"/> </html:link></td>


Inside Action

String sopId = request.getParameter("id");

Sony

Nikita Desai wrote:
Hi,
I have one problem regarding how to retrieve value of hashmap parameter action action of struts.

In jsp page I have code like this

<%
    java.util.HashMap params = new java.util.HashMap();
   params.put("var1","1");
   params.put("var2","10");
    params.put("var3","1");
    request.setAttribute("paramsName",params);
%>

<html:link name="paramsName" paramId="paramsName" paramName="paramsName" action="/ListAction.do" >
    List Handler Param
</html:link>

In ListAction.java I have to retrieve the value of var1, var2 and var3. I am unable to retrieve these values. Can anybody can help me in this and can give sample code to how to retrieve these values.
Regards
Nikita Disclaimer : This message and any attachments (hereinafter referred to as the Said Information) are intended solely for the addressee. The Said Information is confidential and may be privileged and is also prohibited from disclosure. Access, use, copying, distribution or e-use of the Said Information by anyone except the addressee is unauthorized. If you are not the intended addressee, please destroy all copies of the Said Information in your possession and also delete the same from your computer. Any views expressed in the Said Information are those of the individual sender except where the sender, with due authority of CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India Ltd. specifically states them to be the views of CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India Ltd. Nothing contained in the Said Information is capable or intended to create any legally binding obligations on the sender CRISIL Ltd./CRISIL MarketWire Ltd./Global Data Services of India L
 td. who accept no responsibility, whatsoever, for loss or damage from the use 
of  the Said Information including damage from viruses.

------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.3/360 - Release Date: 09/06/2006



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to