struts- not able to get value in action [execute method] while use

Discussion in 'Java' started by a.sivakaminathan@gmail.com, Jul 21, 2008.

  1. Guest

    hello,

    In struts when from is submit then values are get in action
    method

    but through html:link values are not able to get

    but it possible only through pass in url as pass.do?
    id=999&value=ford


    can any body tell about problem

    regards
    sivakaminathan
     
    , Jul 21, 2008
    #1
    1. Advertising

  2. Evans Guest

    Re: struts- not able to get value in action [execute method] while

    Please write in your local language to increase your chances of
    getting any help.

    --
    Evans
    http://www.jroller.com/evans
     
    Evans, Jul 21, 2008
    #2
    1. Advertising

  3. Donkey Hot Guest

    Re: struts- not able to get value in action [execute method] while use html:link

    wrote in news:91c563d1-bf7e-493b-a08c-
    :

    > hello,
    >
    > In struts when from is submit then values are get in action
    > method
    >
    > but through html:link values are not able to get
    >
    > but it possible only through pass in url as pass.do?
    > id=999&value=ford
    >
    >
    > can any body tell about problem
    >
    > regards
    > sivakaminathan


    <html:link /> does not pass the form to Action, you have to your http
    parameters or html:link's "name" attribute.


    Example of the former:


    <html:link action="/system/editAdministrator.do?action=view&login=
    ${admin.login}" scope="page">
    <c:eek:ut value="${admin.name}" />
    </html:link>


    Example of the latter:

    <bean:define id="login" name="admin" property="login"/>
    <%
    java.util.HashMap params = new java.util.HashMap();
    params.put("login", login);
    pageContext.setAttribute("linkParameters", params);
    %>

    <html:link action="/system/editAdministrator.do?action=view"
    scope="page" name="linkParameters" >
    <c:eek:ut value="${admin.name}" />
    </html:link>

    Then in the Action you get the value by calling

    request.getParameter("login")


    Examples need use struts-el tags to work.
     
    Donkey Hot, Jul 21, 2008
    #3
  4. Arne Vajhøj Guest

    Re: struts- not able to get value in action [execute method] while

    Evans wrote:
    > Please write in your local language to increase your chances of
    > getting any help.


    Not funny.

    Arne
     
    Arne Vajhøj, Jul 23, 2008
    #4
    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. Joe Bloggs
    Replies:
    1
    Views:
    844
    Sudsy
    Aug 3, 2003
  2. rjweytens
    Replies:
    6
    Views:
    16,143
    rjweytens
    Jun 25, 2004
  3. Replies:
    0
    Views:
    1,247
  4. runescience

    Struts mapping action to action???

    runescience, Feb 6, 2006, in forum: Java
    Replies:
    3
    Views:
    1,866
    runescience
    Feb 7, 2006
  5. sed_y
    Replies:
    0
    Views:
    1,025
    sed_y
    Feb 15, 2012
Loading...

Share This Page