tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: action servlet
Date Thu, 13 Jul 2000 17:07:44 GMT
Quaini Michele wrote:

> Hello
>
> I would like my action servlet to "serve" mutiple actions of the same page
>
> I think I should use a pattern called command
>
> Could any kind soul send me an example on how to implement the command
> pattern
> on an Struts - Action servlet ?
>

(You might want to discuss this on the STRUTS-USER list because it is specific
to Struts).

I'm not quite clear on what kind of behavior you are asking for.

If you mean "I want to have more than one form on my page", that is easy to
do.  Simply use more than one <struts:form> tag (just like you would use more
than one <form> tag in straight HTML), each with its own action URI.    If you
use extension mapping as the Struts example application does (everything that
ends with ".do" goes to the controller servlet), then you get what you asked
for.

If you mean "I want more than one action to happen on a single form submit", I
would suggest that you make the initial action that is requested responsible
for calling all of the subordinate actions that need to occur.  In such a
case, the subordinate "actions" need not be implementations of the Action
interface -- they can just be beans that have public methods to do the things
you need.

>
> many thanks
>
> michele

Craig



Mime
View raw message