Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: STRUTS: c:set alternative to render dynamic links

Thread Tools

Re: STRUTS: c:set alternative to render dynamic links

Brock Heinz
Posts: n/a
Hey Jack,

I'm not sure what you mean when you say 'do it all in Struts' (but I'm
assuming you mean that you want to do all of the data rendering with
Struts tags rather than JSTL. Your direction (*that I am assuming*)
is backwards from what the Struts contributors and developers are
saying. They are urging developers to move towards using JSTL
exclusively in their applications:

But, if you want to just use Struts, I would ditch the <html:link ../>
tag and just use a good old fashion HTML <a></a> tag.

<logic:iterate id="person" name="findpersonresults">
<a href="/<bean:write name="person"
property="seq""/>Your Link Here (maybe use another <bean:write../></a>

Basically it boils down to this: the Struts tags are pretty weak.
The core developers know it, and much of the community knows it. Use
JSTL when possible and begin preparing for Java Server Faces (Craig
McClanahan is the founder of Struts while also being the Spec Lead for
faces). Here is the definitive mail archive for Struts questions:

Hope this helps.


Jack <(E-Mail Removed)> wrote in message news:<Xns93C86FF305BABneverinamillioncom@ >...
> Hi All!
> Currently I have a piece of code:
> <jsp:useBean id="paramMap" class="java.util.HashMap"/>
> <c:set target="${paramMap}" property="action" value="Edit"/>
> <nested:iterate id="person" name="findpersonresults">
> <tr>
> <c:set target="${paramMap}" property="personid"
> value="${person.seq}">
> <td><html:link action="/" name="paramMap">
> <nested:write name="person" property="seq"/></html:link></td>
> <td><nested:write name="person" property="name"/></td>
> </tr>
> </nested:iterate>
> What I want is to get rid of the JSTL references and do it all in struts...
> to put it simply, I want to render a link as:
> /<nested:write name="person"
> property="seq"/>
> Doesnt seem too efficient having to call the hashmap 100 (or whatever)
> times every time someone does a search, but of course I cant embed a
> nested:write in my html:link.
> Thanks
> J

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing rails render method outside of view / Decorating render Glenn Gillen Ruby 0 11-17-2006 02:30 PM
Quicktime Alternative, RealPlayer Alternative & Media Player Classic John Capleton Computer Support 3 12-05-2005 07:41 AM
Page.Render do not render complete page Lau Lei Cheong ASP .Net 1 05-15-2004 04:10 AM
<A href= links dont always render properly on my .aspx pages Brian Watkins ASP .Net 5 01-06-2004 06:10 PM
Re: STRUTS: c:set alternative to render dynamic links Wendy S Java 0 07-30-2003 03:03 PM