File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Simple links Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Simple links" Watch "Simple links" New topic
Author

Simple links

Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
I need to create a list of links, all to the same page but passing a single different parameter.

Using scriplets and not following struts I would just loop over something like


is it possible to do something similiar using
<html:link action=""> ?
if not, how do you implement something like this?

-Tad
John Smith
Ranch Hand

Joined: Sep 02, 2004
Posts: 61
Put a String array of the parameters on your request and use a logic:iterate loop to iterate through them. I find the html:link tag is mostly just convenient as you can acheive the same target protability by using a html:rewrite into a normal link ...



Not the cleanest solution but it's reliable, hope this is what you were after
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
"/action/myTarget" /


Does this reference an action in the struts-config file?

using the anchor tags I thought was "bad design" but if your referenceing an action inside the struts-config file instead of an actual jsp page I guess thats equivalent to keep the program "flow" inside the struts-config file?

Some what related question...

If you are creating a link to somewhere outside of your application (to say google or another company's homepage) is acceptable to use a regular anchor tag? or should create action inside the struts-config?

thanks for the help
-Tad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple links
 
Similar Threads
a question about sessions ...
extracting a filepath from an XML node
need to generate some numbers using loop, the number of times condition met
DisplayTags - Paging Styles
Need to display results from the Database with hyperlink functionality