aspose file tools
The moose likes Struts and the fly likes Specifying Request Parameter in [html:link] Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Specifying Request Parameter in [html:link]" Watch "Specifying Request Parameter in [html:link]" New topic
Author

Specifying Request Parameter in [html:link]

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 568
I want to attach a single parameter with a literal value to html:link. But it seems that I need to create a bean to store the value and give the name of that bean to the paramName attribute. Can we just simply type a literal String value in the html:link tag? It doesn't make sense to go through a big circle in order to do such a simple task?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You could simply specify the parameter like this:

<html:link page="/myAction.do?parm1=foo" >click here</html:link>

If you still want to use the other method, it really isn't that hard:

<bean:define id="fooString" value="foo" />
<html:link action="myAction" paramId="parm1" paramName="fooString" >click here</html:link>
[ October 07, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Specifying Request Parameter in [html:link]
 
Similar Threads
Struts and request
Confused, with tags attributes.
html:Link not able to retrieve ActionForward
struts html:link
How can i get session value in my JSP page using JSTL