Re: Diagram of ActionServlet - open for comments

2001-07-10 Thread Chuck Amadi

Thanks Chuck

Jonathan Asbell wrote:

>Part 1.1.1Type: Plain Text (text/plain)
>  Encoding: quoted-printable
>
>Name: ActionServlet.gif
>ActionServlet.gif   Type: GIF Image (image/gif)
>Encoding: base64
> Download Status: Not downloaded with message

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.





Re: Diagram of ActionServlet - open for comments

2001-07-10 Thread Ted Husted

These are both very nice. As to the first one, that mentions
"struts-config" at the top, I would change the top caption to read 

"The Action classes you created which are registered with the
ActionMappings loaded from the struts-config.xml".

And the second to read 

"A request for ... registered in the mappings with the path ... "

The second diagram seems to imply that the Actions are registered with
the mappings and the forms, which isn't quite correct. Some of the
mappings may reference an Action, but it is the mappings that are
registered when the application loads. (Struts keeps a list of the
Actions it creates, but that doesn't happen until they are called.)

So I would just say at the top 

"The ActionMappings and ActionForm beans are registered when your server
... "

In the square, under doPost / doGet, 

2) -- may mean to say "Locale"

4) -- might say "fill it from the request" to avoid ambiguity

Under the Explanation, I would say 

1) The ActionServlet checks the ActionMappings for a mapping whose
"path" property matches the URI ...

2) The servlet asks the mapping for its associated ActionForm class. If
there is one, the object is created and filled from the request. 

3) The servlet asks the mapping for its associated Action class, creates
or reuses the appropriate Action object, and finally passes the
ActionMapping, ActionForm, and request objects to the Action's perform
method.

I'd be tempted to add a 2.1 to mention reset() and validate() and cover
all the bases.

2.1) Before populating the ActionForm bean, the servlet calls the bean's
reset() method. After filling the bean from the reqeust, the servlet
calls the bean's validate() method. If validate returns false, the
servlet forwards the ActionForm bean to the destination given by the
mapping's input property.

Otherwise, these are great!

-Ted.



Re: Diagram of ActionServlet - open for comments

2001-07-10 Thread Gregor Rayman

Point 4 could be described in more detail:

methods: reset and validate

--
gR




Re: Diagram of ActionServlet - open for comments

2001-07-10 Thread Gregor Rayman

"Ted Husted" <[EMAIL PROTECTED]> wrote:

> 2.1) Before populating the ActionForm bean, the servlet calls the bean's
> reset() method. After filling the bean from the reqeust, the servlet
> calls the bean's validate() method. If validate returns false, the
> servlet forwards the ActionForm bean to the destination given by the
> mapping's input property.

I mean, validate now returns ActionErrors and does not have to be called
at all, if set in web.xml

--
gR