At 7:11 PM +0100 7/4/05, Miles, AJ \(Alistair\) wrote:
Hi all,
A struts-config.xml file is a great way to formally specify a REST
API. However, with struts 1.2 you cannot configure separate action
mappings for GET vs POST requests to the same resource. What about
adding a 'method' attribute to the 'action' element?
I don't think I've ever seen anything like this come up. The only
hassle is that the mappings are actually stored in a true Map by
their path, so one would have to monkey with some pretty core code to
support what is now essentially a compound key (path + method).
Also, one should clearly define the rules for fallback scenarios if
an unmapped method is used -- is that an error? Should Struts be
able to resolve a "default" mapping for a given path when an
unspecified method is used?
I'd like to suggest that this is something which would be good to
implement first in a pluggable manner, but that would reveal the kind
of "undercooked" state of plugging in behavior at that level of
Struts (ModuleConfig/ModuleConfigFactory). It could be done, but
reviewing that leads me to think we should aim to improve that also.
Of course, there don't seem to have been many complaints about its
relative obtuseness (obtusity?) Is anyone actually using custom
ModuleConfig implementations?
Joe
Cheers,
Alistair.
P.S. Sorry if this has come up already, I'm new to this list.
---
Alistair Miles
Research Associate
CCLRC - Rutherford Appleton Laboratory
Building R1 Room 1.60
Fermi Avenue
Chilton
Didcot
Oxfordshire OX11 0QX
United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 (0)1235 445440
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]