Title: Message
ServletActionContext does not implement Action... It's a helper for accessing Servlet objects like the request, response, etc.
 
ActionSupport is just a base implementation of the Action Interface and some of the optional Interfaces (ValidationAware, Validateable, LocaleAware). There are already helper classes for these Interfaces, as well, and,if you look at the code for ActionSupport you'll see that it's only delegating to these helpers. If you want to implement Action and the other Interfaces directly, it should be painfully easy to do so, as you can just delegate to these same helper classes.
 
Jason
-----Original Message-----
From: Thompson, Kris [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 4:29 PM
To: Opensymphony-Webwork (E-mail)
Subject: [OS-webwork] WebWork2 best practices for creating Action Classes

Looks like there are 3 common ways to create a WW2 action class

Extending ActionSupport, extending ServletActionContext or implementing Action

When should each one be called?

IMO

ActionSupport seems to be the best specially for web implementations while still keeping developers away from the http response and request

Action seems fine, more bare bones but doesnt have some of the helper features like addFieldError that ActionSupport has

ServletActionContext I guess should be considered a "last ditch choice".  IF you must have access to the request or reponse then it is fine.



What is everyone elses opinion on those?  Am I missing any other common ways to create Action classes?

Thanks

Reply via email to