You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Weissman, Alan" <al...@solspark.com> on 2003/04/21 21:24:05 UTC

HTML Link -> Action class - > JSP

I am in my first week or so of Struts and haven't been able to find a good
solution to this situation:

I have a JSP that has an HTML link to a JSP.  The JSP has some code in it
that invokes a method, gets a response, and puts that response in the page.

I would like to find a way to convert this to the Struts paradigm where my
HTML link would call an Action class (without an ActionForm I assume), that
action class invokes the method, puts the result in the request as an
attribute, and forwards to a JSP.

How can this be achieved?

Thanks in advance,
Alan

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: HTML Link -> Action class - > JSP

Posted by Ian Hunter <ih...@hunterweb.net>.
Check this out:
http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/actions/For
wardAction.html

Also, since you said "The JSP has some code in it that invokes a method,
gets a response, and puts that response in the page" it sounds like the JSP
itself should either be an action or a custom tag.

----- Original Message -----
From: "Weissman, Alan" <al...@solspark.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, April 21, 2003 3:24 PM
Subject: HTML Link -> Action class - > JSP


> I am in my first week or so of Struts and haven't been able to find a good
> solution to this situation:
>
> I have a JSP that has an HTML link to a JSP.  The JSP has some code in it
> that invokes a method, gets a response, and puts that response in the
page.
>
> I would like to find a way to convert this to the Struts paradigm where my
> HTML link would call an Action class (without an ActionForm I assume),
that
> action class invokes the method, puts the result in the request as an
> attribute, and forwards to a JSP.
>
> How can this be achieved?
>
> Thanks in advance,
> Alan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org