How to retrive the prameters of the url while using <html:link> in struts?

Discussion in 'Java' started by vyshu, Apr 11, 2007.

  1. vyshu

    vyshu Guest

    hi,
    To start with,i will first explain my situation.
    I am iterating a map and printing the values as links using the
    <html:link> tag.
    this is my code,
    <bean:define name="usersession" property="theMap" id="myMap" />
    <logic:iterate id="mapEntry" name="myMap" >
    <html:link page="/existing_customer_entry.do"
    paramId="theMap" paramProperty="key" paramName="mapEntry">
    <bean:write name="mapEntry" property="value"/> </html:link>
    </logic:iterate>

    when the user click on the link i need to pass the value of the "key"
    attribute to my action servlet.
    Here the key attribute is passed through the url as
    "/existing_customer_entry.do?theMap=id3"

    I am using the page attribute.I hav configured my struts-config.xml as

    <action path="/existing_customer_entry" name="CustomeridForm"
    type="CustomeridAction">
    <forward name="customer_entry" path="/pages/customer_entry.jsp"/>
    </action>

    and in the action servlet "CustomeridAction" i am trying to retrive
    the value of the "theMap" as

    request.getParameter("theMap");

    but its not giving the desired result.i think the action servlet
    itself is not called here.

    any suggestions?

    thanks in advance,
    vysh
    vyshu, Apr 11, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    798
    Kevin Spencer
    May 17, 2005
  2. curwen
    Replies:
    3
    Views:
    36,273
    Wendy S
    Oct 9, 2003
  3. Suresh
    Replies:
    0
    Views:
    532
    Suresh
    Jun 2, 2006
  4. Bruno Alexandre
    Replies:
    5
    Views:
    170
    Bob Barrows
    Mar 3, 2004
  5. Kishore

    Passing prameters

    Kishore, Feb 10, 2005, in forum: ASP General
    Replies:
    1
    Views:
    98
    Ray Costanzo [MVP]
    Feb 10, 2005
Loading...

Share This Page