struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <>
Subject RE: Action Form Bean required ???
Date Wed, 04 Jun 2003 11:42:14 GMT
I am doing this for some of my screens - these being the listview screens -
where Im not taking in much in the way of info from the user, and hadnt
bothered to create an actionForm but just grabbed what I needed straight
from the request. Your probably better off having an action form however -
in most cases David's criticism is valid.

One 'gotcha' with not using an actionform is when you are using multipart
forms. Struts is nice enough to wrap multipart requests in a
MultipartRequestWrapper with the POSTed parameters available *but* it
populates this wrapper from the same method that populates the actionForm.
No action form means no MultipartRequestWrapper population, which means
request.getParameter will return null for all except those parameters
appended to the url to which the form was submitted. Of course that only
affects multipart forms which yourd only be using if that page needs file

-----Original Message-----
From: David Chelimsky []
Sent: Wednesday, 4 June 2003 19:20
To: Struts Users Mailing List
Subject: Re: Action Form Bean required ???

You could access all of the form properties in your Action with
request.getParameter("paramName"); but why would you ever do that? Using
the rest of the framework without FormBeans is like pushing your car
down the street instead of just starting the engine....

Tran Nguyen Thanh Bao wrote:

>Dear all,
>I'm a new user of Struts. If I dont have Action Form Bean for each form in
my application, is there any problem ? I've already tried to test with no
Action Form Bean (basing on Struts examples, just remove Action Form Bean),
but not successful.
>Can I do that in some way ? Pls give me some advises from you, experienced
users :)
>Best Regards,
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message