struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serge nana <>
Subject Re: Accessing User input in execute ( ) method
Date Tue, 28 Sep 2010 23:53:55 GMT

You don't need to have an ActionForm in order to invoke an Action class. An
ActionForm is a data transfer object (DTO) that allows you to transfer data
from the view to the controller( in this case your action). So, if you want
to use struts and you have a form to send to the server, i recommend you to
use ActionForm.

In the big picture though, an Action class is a Servlet sub-class. Just like
you can retrieve variables from the request object inside a doXXXX method,
so you can do the same inside the *execute()* method by calling

Hope this helps.

"Don't rely on luck to find a bug."

On Mon, Sep 27, 2010 at 5:24 AM, hareendra seneviratne <
> wrote:

> Hi all,
> I’m new to struts and getting to know it.
> Is it mandatory to have an ActionForm? Can we access the variables defined
> in *view* from *execute()* method without using an ActionForm?
> Thnks for ur replies   J

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message