Struts and <html:link>

Discussion in 'Java' started by Steve Mai, May 4, 2004.

  1. Steve Mai

    Steve Mai Guest

    Greetings,
    I hope this is the right forum for struts questions.

    I am trying to add a "hard-coded" value to a link using the html:link tag.
    I want to use this tag, so I can use the 'forward' attribute to lookup a
    globally defined template.

    Here is what I want to do:
    <html:link forward="/auth/forgotPassword" paramId="forgotPassword"
    paramName="TRUE">Click here</html:link>

    I understand that the paramName attribute is supposed to be used to retrieve
    a dynamic value from a bean, but I do not need a dynamic value. I need
    simply need the value of true, in order to achieve the following output:

    <a href="/auth/login.jsp?forgotPassword=true">Click here</a>

    Any suggestions?

    Thanks,
    --steve
     
    Steve Mai, May 4, 2004
    #1
    1. Advertising

  2. Steve Mai

    Sudsy Guest

    Steve Mai wrote:
    > Greetings,
    > I hope this is the right forum for struts questions.
    >
    > I am trying to add a "hard-coded" value to a link using the html:link tag.
    > I want to use this tag, so I can use the 'forward' attribute to lookup a
    > globally defined template.
    >
    > Here is what I want to do:
    > <html:link forward="/auth/forgotPassword" paramId="forgotPassword"
    > paramName="TRUE">Click here</html:link>
    >
    > I understand that the paramName attribute is supposed to be used to retrieve
    > a dynamic value from a bean, but I do not need a dynamic value. I need
    > simply need the value of true, in order to achieve the following output:
    >
    > <a href="/auth/login.jsp?forgotPassword=true">Click here</a>
    >
    > Any suggestions?


    What if you did this?

    <bean:define id="forgotPassword" value="TRUE" />
    <html:link forward="/auth/forgotPassword"
    paramName="forgotPassword">Click Here</html:link>
     
    Sudsy, May 5, 2004
    #2
    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:
    944
    Kevin Spencer
    May 17, 2005
  2. Katie Wright
    Replies:
    8
    Views:
    4,371
    Andrea Desole
    Jan 7, 2005
  3. curwen
    Replies:
    3
    Views:
    36,439
    Wendy S
    Oct 9, 2003
  4. Replies:
    1
    Views:
    6,115
    Andrew T.
    Jul 10, 2006
  5. vyshu
    Replies:
    0
    Views:
    395
    vyshu
    Apr 11, 2007
Loading...

Share This Page