On 7/18/06, mosho <[EMAIL PROTECTED]> wrote:

Hi all,

I am struts 1.1.
My requirement is to have links which will call one action and each link
will have unique identifier to get data.
For example, something lilke this:
home.do?action=link1
action parameter will keep changing. How can I do this?

I would like to use one action class for all the link and have different
action forwards.

See this http://wiki.apache.org/struts/EventActionDispatcher You will
define a separate method for every "action" parameter of your link.
Oh, you are using 1.1. You can either extract EventActionDispatcher
from 1.2.9, or you can use good old DispatchAction.

Is there a way to set the parameter for html:link tag and then use that
parameter in the action mapping to find the relevant forward.

http://struts.apache.org/1.x/struts-taglib/tlddoc/html/link.html

=== cut here ===
To specify a single parameter, use the paramId attribute to define the
name of the request parameter to be submitted. To specify the
corresponding value, use one of the following approaches:

   * Specify only the paramName attribute - The named JSP bean
(optionally scoped by the value of the paramScope attribute) must
identify a value that can be converted to a String.
   * Specify both the paramName and paramProperty attributes - The
specified property getter method will be called on the JSP bean
identified by the paramName (and optional paramScope) attributes, in
order to select a value that can be converted to a String.
=== cut here ===

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to