Struts and <html:link>

S

Steve Mai

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
 
S

Sudsy

Steve said:
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top