problem in struts

Hi all, I am new for struts technology. And I need to call an action class from a link. Can anybody please tell me, is it possible to call an action class from a link. If yes then how, to write the tag in struts-config file.Thanks in advance.
[271 byte] By [anu1a] at [2007-11-27 9:46:24]
# 1
Check this out http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/actions/ForwardAction.htmlManuel Leiria
manuel.leiriaa at 2007-7-12 23:56:52 > top of Java-index,Java Essentials,New To Java...
# 2
Hi, Thanx for your reply. But I am not able solve the problem yet.
anu1a at 2007-7-12 23:56:52 > top of Java-index,Java Essentials,New To Java...
# 3

Hey anu, can u tell me more abt the problem. Like do you want the user to be able to execute functionality written in an action class on the click of a link, like:

http://localhost:8080/myApp/myActionClass

When clicking on above link you wish to execute action class method public ActionForward execute(ActionMapping mapping, ActionForm form,

HttpServletRequest request, HttpServletResponse response)

right?

If yes then you can write a tag in struts-config mentioning the mapping of a path to the class, like

<action-mappings>

<!-- Principal Actions -->

<action path="/myActionClass"

type="class name along with package name" scope="request" validate="false">

</action>

</action-mappings>

I mean, this can be one way of solving your problem. Do revert back in case I missed out something or you find some problem.

Message was edited by:

jdolphin

I wonder why the indentation is not coming proper even though while posting I take care it is indented.

Message was edited by:

jdolphin

jdolphina at 2007-7-12 23:56:52 > top of Java-index,Java Essentials,New To Java...
# 4
hi,<%@taglib uri="/WEB-INF/..../struts-html.tld" prefix="html" %><html:link action="/urAction" > Click </html:link>
drvijayy2k2a at 2007-7-12 23:56:53 > top of Java-index,Java Essentials,New To Java...
# 5
Hi All, Thanx for u t reply. My problem gets solves.Message was edited by: anu1
anu1a at 2007-7-12 23:56:53 > top of Java-index,Java Essentials,New To Java...
# 6
Hi All, Thanx for u t reply. My problem gets solves.Message was edited by: anu1
anu1a at 2007-7-12 23:56:53 > top of Java-index,Java Essentials,New To Java...