You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Don Brown <mr...@twdata.org> on 2006/07/25 00:15:12 UTC
Re: DefaultActionMapper compatablity switch [was: Re: [s2] Roadmap
(was Tag it and Roll it?)]
David Evans wrote:
> I was looking in DefaultActionMapper and am wondering about the
> compatibilityMode switch functionality. In getMapping compatibilityMode
> is used to see whether to check for the ! method idiom. I assume this is
> because it will eventually be removed because wildcard mappings make it
> redundant. But in the constructor, the PrefixTrie that's being set up is
> also checking the compatibilityMode switch to see if it should add a
> node for the "method:" prefix. Should that be there? Is there someway in
> which you can use wildcards in your mapping in order to replace the
> parameter prefix? So that the button the user clicks will determine
> which method is run?
The problem we are addressing is the ability to explicitly specify the method to
be invoked from the URL. Instead, users should use wildcards where this
functionality is necessary. To replace the method: prefix, you would instead
use "action:foo!input", then use a wildcard in your "foo" action name to support
the method call. In this way, the developer has to specifically allow this,
rather than the framework keeping that door (hole?) open.
Don
>
> dave
>
>
>> But, if no one is interested in working on the new API now, it should
>> not be framed as an impediment to a stable Struts 2.0 release. We
>> should judge each distribution on terms of what we have done, not on
>> what we would like to do.
>>
>> -Ted.
>>
>>
>> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
>>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
>>>> -1 on changing the versioning scheme.
>>>>
>>>> But, I would be open to something like
>>>>
>>>> * Struts 2.0 == "WebWork transtional release"
>>>> * Struts 2.1 == "new API release"
>>>> * Struts 3.x == "phase 2 - the best of breed release"
>>> ...with pointers on what to consider if users should upgrade or not,
>>> and a clear explanation of what to expect in the near future. This
>>> could address Tim's initial concern (which I think is valid):
>>>
>>> "Users who don't keep completely up to date with the latest goings on will see
>>> this as the latest and greatest and start migrating to it, only to
>>> have a very rude surprise when large changes occur in 2.1, or a 3.0
>>> arrives months later."
>>>
>>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
>>> communicated on the front page, on a simple table. This would be
>>> similar to how Tomcat explains why they have three versions. Very
>>> straightforward and easy to digest.
>>>
>>> Hubert
>>>
>>>
>>>> IMHO, all the users, including ourselves, are served best when we
>>>> release early and release often.
>>>>
>>>> -Ted.
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/24/06, Bob Lee <cr...@crazybob.org> wrote:
> I'd much rather annotate methods which can be called than specify them in
> XML.
Feel free to do so then.
> Also, this doesn't pose much of a security risk in practice as it only
> applies to public, no-arg methods which return String in actions.
Going back to the Rough Spots document, the other consideration is
that the idiom creates a lot of special-case code. Since the idiom
doesn't provide any functionality that can't be achieved with
configuration, annotation, or wildcards, there's little reason to
carry around the extra code.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Jason Carreira <fo...@opensymphony.com>.
> I'd much rather annotate methods which can be called
> than specify them in
> XML.
>
> Also, this doesn't pose much of a security risk in
> practice as it only
> applies to public, no-arg methods which return String
> in actions.
>
> Bob
>
No-arg, yes, but it will convert anything else to a String on the return.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75497#75497
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Bob Lee <cr...@crazybob.org>.
I'd much rather annotate methods which can be called than specify them in
XML.
Also, this doesn't pose much of a security risk in practice as it only
applies to public, no-arg methods which return String in actions.
Bob
On 7/24/06, Ted Husted <hu...@apache.org> wrote:
>
> On 7/24/06, Don Brown <mr...@twdata.org> wrote:
> > The problem is that prefix allows anyone to specify the method to be
> called on
> > the action through the URL, any URL. I'd argue it is a security
> concern, so the
> > developer should have to work at explicitly allowing a method to be
> arbitrarily
> > called.
>
> Yes, since the action mapping allows you to specify a method
> explicitedly, the ! or method: URL syntax, decreases security without
> increasing functionality. Without wildcards, it simply reduces the
> number of action mappings.
>
> Even without the wildcard functionality, it should just be a matter of
> adding an action mapping for each alias. (Which is where we might
> start to find "extends" useful.)
>
> If all action methods were members of framework-specific Action
> classes, security might be less of a concern. But, since we allow POJO
> action classes, we should be more security conscious, and force
> developers to declare which methods can be action methods.
>
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/24/06, Don Brown <mr...@twdata.org> wrote:
> The problem is that prefix allows anyone to specify the method to be called on
> the action through the URL, any URL. I'd argue it is a security concern, so the
> developer should have to work at explicitly allowing a method to be arbitrarily
> called.
Yes, since the action mapping allows you to specify a method
explicitedly, the ! or method: URL syntax, decreases security without
increasing functionality. Without wildcards, it simply reduces the
number of action mappings.
Even without the wildcard functionality, it should just be a matter of
adding an action mapping for each alias. (Which is where we might
start to find "extends" useful.)
If all action methods were members of framework-specific Action
classes, security might be less of a concern. But, since we allow POJO
action classes, we should be more security conscious, and force
developers to declare which methods can be action methods.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Sorry about the double-post, thought I hit cancel in time :)
Speaking of @Remotable... might that make a good tie-in for the DWR
integration, or indeed any other AJAX-type integration? Kill two birds
with one stone is what I'm getting at... marks a method as available for
DWR/AJAX remoting, as well as URL-based invocation?
Frank
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
On Tue, July 25, 2006 4:03 pm, Frank W. Zammetti wrote:
> @Callable or @Executable, so it's more explicit? Maybe even @Remotable?
> (nah, probably not)
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> On Tue, July 25, 2006 3:59 pm, Jason Carreira wrote:
>>>
>>>
>>> Works for me. What should we call this annotation?
>>> @Published?
>>
>> @Action to mark it as an Action method?
>> ---------------------------------------------------------------------
>> Posted via Jive Forums
>> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75682#75682
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
@Callable or @Executable, so it's more explicit? Maybe even @Remotable?
(nah, probably not)
Frank
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
On Tue, July 25, 2006 3:59 pm, Jason Carreira wrote:
>>
>>
>> Works for me. What should we call this annotation?
>> @Published?
>
> @Action to mark it as an Action method?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75682#75682
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/25/06, Ted Husted <hu...@apache.org> wrote:
> On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> > @Action to mark it as an Action method?
>
> Stripes uses the annontation @DefaultHandler where we would configure
> a default action, which might imply the annotation @Handler for what
> we are talking about here.
>
> * http://stripes.mc4j.org/confluence/display/stripes/Annotation+Reference
Or, in practice, would we not be binding a URL to the method, and
therefore be using
@UrlBinding
So that
@UrlBinding("delete")
String delete() { ... }}
would be the equivalant of
action name="delete" class="example.CrudAction" method="delete">
Of course, we might also want to do something like
@Handler
String delete() { ... }}
to imply an action named "delete"
(I expect Tim would be the resident expert on this subject.)
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity swi
Posted by Don Brown <do...@gmail.com>.
Another reason why returning Results directly would be nice is it
would make it much easier to add zero-config Action scripting support.
Here is a case where you would want to write Actions in a scripting
language like Groovy or Javascript, but not want any external
configuration. Conventions, combined with returned Results, would
make it easy to write a Ruby-on-Rails-style controllers, and the lack
of a compilation step for Actions would really speed up development.
Again, not for every application, but at least this way it would be possible.
Don
On 7/26/06, Jason Carreira <fo...@opensymphony.com> wrote:
> > > Oh please no... please no abstract methods with
> > magic implementations. What happens when you go to
> > debug the class?
> >
> > The debugger would step from your action into the
> > result. You rave
> > about Hibernate and AOP; how do you debug those?
> >
>
> It's one of the biggest problems with them. Well, not so much Hibernate 'cause I don't find myself in stack traces with Hibernate proxies in the middle, but AOP interceptor / proxies are in there all the time and it's a pain. At least there they are wrapping my implementation, so I can see where my code was and get to it. The AOP interceptor code can also be stepped into. In this case you'd have magically runtime-created classes with implementations that aren't backed by any source code.
>
> > If you get an exception in your result, the action
> > that led to it will
> > be in the stack trace; that's more than you can say
> > about the current
> > state of affairs.
>
> How often do you get an exception in the result that isn't some obscure FM template issue? Seems like a non-issue to me.
>
> >
> > Some people want a simpler, more or less flexible
> > approach in addition
> > to the current one, and there's nothing wrong with
> > that; I was just
> > responding with some brainstorming. Feel free to
> > throw out better
> > ideas.
> >
> > Bob
> >
>
> Let's just not take away from what we have to chase some "agile" manifesto that hasn't proven itself in production. Rails is nifty and all, but the stuff I've seen built with it isn't exactly rocket science.
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75939#75939
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity swi
Posted by Ted Husted <hu...@apache.org>.
On 7/25/06, Bob Lee <cr...@crazybob.org> wrote:
> Some people want a simpler, more or less flexible approach in addition
> to the current one, and there's nothing wrong with that; I was just
> responding with some brainstorming. Feel free to throw out better
> ideas.
Maybe it's time to open a ticket for this, where we can summarize the
comments, and decide when or if we want to do it.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity swi
Posted by Jason Carreira <fo...@opensymphony.com>.
> > Oh please no... please no abstract methods with
> magic implementations. What happens when you go to
> debug the class?
>
> The debugger would step from your action into the
> result. You rave
> about Hibernate and AOP; how do you debug those?
>
It's one of the biggest problems with them. Well, not so much Hibernate 'cause I don't find myself in stack traces with Hibernate proxies in the middle, but AOP interceptor / proxies are in there all the time and it's a pain. At least there they are wrapping my implementation, so I can see where my code was and get to it. The AOP interceptor code can also be stepped into. In this case you'd have magically runtime-created classes with implementations that aren't backed by any source code.
> If you get an exception in your result, the action
> that led to it will
> be in the stack trace; that's more than you can say
> about the current
> state of affairs.
How often do you get an exception in the result that isn't some obscure FM template issue? Seems like a non-issue to me.
>
> Some people want a simpler, more or less flexible
> approach in addition
> to the current one, and there's nothing wrong with
> that; I was just
> responding with some brainstorming. Feel free to
> throw out better
> ideas.
>
> Bob
>
Let's just not take away from what we have to chase some "agile" manifesto that hasn't proven itself in production. Rails is nifty and all, but the stuff I've seen built with it isn't exactly rocket science.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75939#75939
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity swi
Posted by Bob Lee <cr...@crazybob.org>.
On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> What happened to not coupling code to the framework?
That's one of many factors that should impact a design decision.
> Oh please no... please no abstract methods with magic implementations. What happens when you go to debug the class?
The debugger would step from your action into the result. You rave
about Hibernate and AOP; how do you debug those?
If you get an exception in your result, the action that led to it will
be in the stack trace; that's more than you can say about the current
state of affairs.
Some people want a simpler, more or less flexible approach in addition
to the current one, and there's nothing wrong with that; I was just
responding with some brainstorming. Feel free to throw out better
ideas.
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity swi
Posted by Jason Carreira <fo...@opensymphony.com>.
> Instead of returning a Result object, we can also
> consider calling out to a
> result method. This is how Rails works. For example:
>
> class FooAction ... {
>
> Foo foo = new Foo(); // populated from request
> parameters.
> public void create() {
> if (foo.isValid())
> redirectTo("ListFoos");
> else
> chainTo("NewFoo");
> ...
> }
>
> These methods could be inherited from a base class,
> statically imported, or
> something else.
>
What happened to not coupling code to the framework?
> If you like annotations, we should also consider
> abstract methods which
> could be implemented by Struts at run time:
>
> class FooAction ... {
>
> Foo foo = new Foo(); // populated from request
> parameters.
> public void create() {
> if (foo.isValid())
> listFoos();
> else
> newFoo();
> @Redirect("ListFoos")
> abstract void listFoos();
> @Chain("NewFoo")
> abstract void newFoo();
> ...
>
> This doesn't require inheritance and it's still easy
> to unit test with
> EasyMock.
>
> Bob
>
Oh please no... please no abstract methods with magic implementations. What happens when you go to debug the class?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75778#75778
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity switch)
Posted by Bob Lee <cr...@crazybob.org>.
Instead of returning a Result object, we can also consider calling out to a
result method. This is how Rails works. For example:
class FooAction ... {
Foo foo = new Foo(); // populated from request parameters.
public void create() {
if (foo.isValid())
redirectTo("ListFoos");
else
chainTo("NewFoo");
}
...
}
These methods could be inherited from a base class, statically imported, or
something else.
If you like annotations, we should also consider abstract methods which
could be implemented by Struts at run time:
class FooAction ... {
Foo foo = new Foo(); // populated from request parameters.
public void create() {
if (foo.isValid())
listFoos();
else
newFoo();
}
@Redirect("ListFoos")
abstract void listFoos();
@Chain("NewFoo")
abstract void newFoo();
...
}
This doesn't require inheritance and it's still easy to unit test with
EasyMock.
Bob
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>
> Tim Fennell wrote:
> > I was going to chime in on this, so I may as well now. Stripes, through
> > it's default way of routing events, will allow a submitted form or URL
> > to invoke any method that is public no-arg and returns a Resolution -
> > this seems much safer because Resolution is a Stripes specific class as
> > opposed to String, which obviously isn't. In this case @HandlesEvent is
> > only used to mark methods that have different return types, or need to
> > be aliased.
>
> I personally would like to see XWork enhanced to support action methods
> returning Result instances directly, however we would have to thoroughly
> think
> through the consequences.
>
> Reasons for:
> - Better security
> - Easier, more explicit
> - Results will probably be defined as annotations soon, so why not just
> return
> the Result directly?
> - Allows non-annotation apps to drastically minimize config
> - Supports more complex results
>
> Reasons against:
> - The Action interface really loses most of its meaning
> - ActionSupport could no longer extend Action
> - XWork internals would need modification since many places expect a
> result code
> - Supporting the return of Result, String, and Object might be confusing
> for
> new developers
> - Current Results would need some improvements to make them easier to
> use
> (better constructors, default location names/patterns, etc)
>
> Again, all things considered, I'd really like to see us add the ability to
> return Results directly as I think it just makes things easier. The
> ability to
> separate JSP paths from Java code, IMO, is way overrated and years of its
> practice hasn't shown the additional complexity is really worth it. For
> those
> that prefer the old style, they would still have that option.
>
> Don
>
> >
> > -t
> >
> > On Jul 25, 2006, at 4:11 PM, Ted Husted wrote:
> >
> >> On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> >>> @Action to mark it as an Action method?
> >>
> >> Stripes uses the annontation @DefaultHandler where we would configure
> >> a default action, which might imply the annotation @Handler for what
> >> we are talking about here.
> >>
> >> *
> http://stripes.mc4j.org/confluence/display/stripes/Annotation+Reference
> >>
> >> -Ted.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: Returning Result directly (was Re: DefaultActionMapper compatablity switch)
Posted by Ted Husted <hu...@apache.org>.
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> however we would have to thoroughly think
> through the consequences.
Which in my mind puts it on the map for phase 2 / Struts 3.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Bob Lee <cr...@crazybob.org>.
On 7/26/06, Jason Carreira <fo...@opensymphony.com> wrote:
>
> I understand that there are different ways to skin the cat, but what if I
> want to reuse my actions in different contexts? What if I want to call my
> action from a JBPM workflow? Do I need to subclass it to override the result
> that's returned?
It's my understanding that the current approach wouldn't go away. I'd prefer
to stick to one approach, but if one approach can't meet everyone's needs...
Then again, any new approach would have to provide a lot of value over the
current approach. People keep talking about modeling results using
annotations, but I've yet to see an approach I like. I'm perfectly aware
that my "abstract result method" suggestion is a bad idea, but it's the only
decent annotation-based approach I can come up with, and I'm trying to get
the conversation started and think outside the box.
I don't understand this huge backlash against XML in the Java community. XML
> has its place. XML is really good at representing hierarchical structured
> data. Building up that hierarchy in Java code isn't nearly as intuitive or
> understandable (to me). There's definitely ways to over-do it, but I think
> it's shifted too far back the other way.
I agree with this, but Spring still puts too much information in XML (and
moving the configuration into Java in the way they've done is not the
solution). XML is better than Java for declaration, but we should resist
embedding too much logic. XML is a lot harder to debug and refactor than
Java. :)
Bob
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Ted Husted <hu...@apache.org>.
See also
* http://issues.apache.org/struts/browse/WW-1393
* http://forums.opensymphony.com/thread.jspa?messageID=45763닃
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity
Posted by Patrick Lightbody <fo...@opensymphony.com>.
With the understanding that this is an issue that needs to be treated carefully to avoid confusion, I think we should really give some serious thought to this.
As someone who _has_ actually done annotation-based result mapping (I have setups with no xwork.xml - I can explain more if requested), I can say it still isn't pretty, especially when it comes to redirects and I want to parameterize some data in the redirect.
I'm not saying I'm +1 on it (yet), but I think that Tim has a lot of good insight here as someone who has worked on (and created) a framework that works in this way. Similiarly, Don (and all Struts 1.x developers) have done the same thing. We shouldn't toss out their words so quickly.
I'd like to see an official proposal of how this would work, including how we'd deal with subclassing ActionSupport (ie: ActionSupport wouldn't be able to provide a method signature for both execute methods). One option is to get rid of the need to subclass and push all the logic in ActionSupport in to parts of the API that Bob is working on.
Patrick
> Being able to return Result instances from Actions
> doesn't
> necessarily mean the lack of reuse of Results. This
> is equivalent to
> saying that because it's Java code you can't reuse
> it. I didn't
> realize that XML was the solution to lack of reuse in
> OO ;)
>
> Seriously though, it's not uncommon in Stripes where
> multiple actions
> have the same resolution to simply factor that out to
> a single method
> or even a constant sometimes. Given your CRUD
> example there's no
> reason you couldn't setup a crud Action with multiple
> methods for add
> (), update() delete() etc. that also had abstract
> methods for the
> list-page result and the details-page result. Then
> not only would
> you have reuse of your Result information, but you'd
> have all your
> action/navigational information in one place and
> completely
> standardized across CRUD beans.
>
> The approach may not be for everybody, I understand.
> But sometimes
> f you let go of the XML and start doing things in
> code, you start to
> see different approaches that achieve the same goals.
> I'm sorry if
> hat sounds condescending. All I'm trying to do is
> make you think
> outside of the box you are in as a WW core developer
> (obviously, I
> have my own box, but that's another story...)
>
> -t
>
>
>
> On Jul 25, 2006, at 11:22 PM, Jason Carreira wrote:
>
> >> Could you give an example how multiple mappings
> for a
> >> single action is
> >> used with common CRUD actions?
> >>
> >> Don
> >
> > Ok, here's what our Invoice CRUD action mappings
> look like:
> >
> > <action name="listInvoice"
> >
> class="com.eplus.app.invoice.action.InvoiceCrudAction"
> method="list">
> > <interceptor-ref name="listStack"/>
> > <result name="CRUD-list"
> type="freemarker">/template/eplus/
> > metaDataList.ftl</result>
> > </action>
> > <action name="editInvoice"
> >
> class="com.eplus.app.invoice.action.InvoiceCrudAction"
> >
> > <interceptor-ref name="editStack"/>
> > </action>
> > <action name="saveInvoice"
> >
> class="com.eplus.app.invoice.action.InvoiceCrudAction"
> method="save">
> > <interceptor-ref name="crudStack"/>
> > </action>
> > <action name="deleteInvoice"
> >
> class="com.eplus.app.invoice.action.InvoiceCrudAction"
>
> method="delete">
> <interceptor-ref name="crudStack"/>
> </action>
> >
> >
> >
> > A better example of reusing the same action with
> the same method
> > several times is our DomainObjectLister. We're
> still working out
> > the entity meta-data we've been building, so I
> foresee this
> > continuing to evolve, but it's pretty simple
> already. In the future
> > you'll just need to configure it with the domain
> type.
> >
> > <action name="getVendorRelationships"
> >
> class="com.eplus.lib.web.action.DomainObjectLister">
> > <param
> >
> name="domainClass">com.eplus.biz.catalog.mgmt.model.Ve
> ndorRelationship
> > </param>
> > <param
> name="visibleFields">vendor.name</param>
> > <param name="idField">id</param>
> > <param
> name="sortColumn">vendor.name</param>
> > <result name="success"
> type="freemarker">/template/
> > eplus/lists/domainObjectTable.ftl</result>
> > </action>
> > <action name="getBuyerCatalogs"
> >
> class="com.eplus.lib.web.action.DomainObjectLister">
> > <param
> >
> name="domainClass">com.eplus.biz.catalog.mgmt.model.Bu
> yerCatalog</
> > param>
> > <param
> name="visibleFields">name,description</param>
> > <param name="idField">id</param>
> > <param name="sortColumn">name</param>
> > <result name="success"
> type="freemarker">/template/
> > eplus/lists/domainObjectTable.ftl</result>
> > </action>
> >
> ------------------------------------------------------
> ---------------
> > Posted via Jive Forums
> > http://forums.opensymphony.com/thread.jspa?
> > threadID=38338&messageID=75787#75787
> >
> >
> >
> ------------------------------------------------------
> ---------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> dev-help@struts.apache.org
> >
>
>
> ------------------------------------------------------
> ---------------
> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=76008#76008
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Tim Fennell <tf...@tfenne.com>.
On Jul 26, 2006, at 11:00 AM, Jason Carreira wrote:
> I understand that there are different ways to skin the cat, but
> what if I want to reuse my actions in different contexts? What if I
> want to call my action from a JBPM workflow? Do I need to subclass
> it to override the result that's returned?
Yes, that is exactly what you'd do. You'd use a mechanism that every
java developer is already intimately familiar with - subclassing.
But let me ask you this: out of all WW2 actions that exist (not just
in your project, but everywhere) how many do you think get reused in
a non-web context? 10%? 5%? I know XWork is designed to allow
this, but is it a common case? Would you not be better off if it
took less work to write up the majority of actions that are web-only,
and then through subclassing or some other similar setup, could
extend and override the behaviour for other contexts?
I agree that XML has it's place, but used for configuration data that
doesn't change at runtime, it has several downsides:
- it is less easily compiled/validated
- you naturally have to have linkage between XML and code, leading
to repetition
- /new/ developers have to learn your XML dialect to become
productive
> On a side note, have you seen the stuff where people try to do code
> versions of the configuration for Spring? It looks horrible, even
> when they've gone to the effort to try to develop DSL-type helper
> methods.
No I haven't, but I can imagine. I'm not a big spring user. But
even here, I've argued before that I'd much rather see injection
sites declared using annotations in code (e.g. @Dependency
("someServiceName/Type")) than in XML. That keeps all the
information about the class in one place. But I think actual service
configuration makes sense in XML (ok, honestly I'd prefer YAML, but
that's another story), and doing this in Java would likely lead to an
unreadable mess.
-t
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity
Posted by Jason Carreira <fo...@opensymphony.com>.
> Being able to return Result instances from Actions
> doesn't
> necessarily mean the lack of reuse of Results. This
> is equivalent to
> saying that because it's Java code you can't reuse
> it. I didn't
> realize that XML was the solution to lack of reuse in
> OO ;)
>
> Seriously though, it's not uncommon in Stripes where
> multiple actions
> have the same resolution to simply factor that out to
> a single method
> or even a constant sometimes. Given your CRUD
> example there's no
> reason you couldn't setup a crud Action with multiple
> methods for add
> (), update() delete() etc. that also had abstract
> methods for the
> list-page result and the details-page result. Then
> not only would
> you have reuse of your Result information, but you'd
> have all your
> action/navigational information in one place and
> completely
> standardized across CRUD beans.
>
> The approach may not be for everybody, I understand.
> But sometimes
> f you let go of the XML and start doing things in
> code, you start to
> see different approaches that achieve the same goals.
> I'm sorry if
> hat sounds condescending. All I'm trying to do is
> make you think
> outside of the box you are in as a WW core developer
> (obviously, I
> have my own box, but that's another story...)
>
> -t
>
>
I understand that there are different ways to skin the cat, but what if I want to reuse my actions in different contexts? What if I want to call my action from a JBPM workflow? Do I need to subclass it to override the result that's returned?
On a side note, have you seen the stuff where people try to do code versions of the configuration for Spring? It looks horrible, even when they've gone to the effort to try to develop DSL-type helper methods.
I don't understand this huge backlash against XML in the Java community. XML has its place. XML is really good at representing hierarchical structured data. Building up that hierarchy in Java code isn't nearly as intuitive or understandable (to me). There's definitely ways to over-do it, but I think it's shifted too far back the other way.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75940#75940
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Tim Fennell <tf...@tfenne.com>.
Being able to return Result instances from Actions doesn't
necessarily mean the lack of reuse of Results. This is equivalent to
saying that because it's Java code you can't reuse it. I didn't
realize that XML was the solution to lack of reuse in OO ;)
Seriously though, it's not uncommon in Stripes where multiple actions
have the same resolution to simply factor that out to a single method
or even a constant sometimes. Given your CRUD example there's no
reason you couldn't setup a crud Action with multiple methods for add
(), update() delete() etc. that also had abstract methods for the
list-page result and the details-page result. Then not only would
you have reuse of your Result information, but you'd have all your
action/navigational information in one place and completely
standardized across CRUD beans.
The approach may not be for everybody, I understand. But sometimes
if you let go of the XML and start doing things in code, you start to
see different approaches that achieve the same goals. I'm sorry if
that sounds condescending. All I'm trying to do is make you think
outside of the box you are in as a WW core developer (obviously, I
have my own box, but that's another story...)
-t
On Jul 25, 2006, at 11:22 PM, Jason Carreira wrote:
>> Could you give an example how multiple mappings for a
>> single action is
>> used with common CRUD actions?
>>
>> Don
>
> Ok, here's what our Invoice CRUD action mappings look like:
>
> <action name="listInvoice"
> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="list">
> <interceptor-ref name="listStack"/>
> <result name="CRUD-list" type="freemarker">/template/eplus/
> metaDataList.ftl</result>
> </action>
> <action name="editInvoice"
> class="com.eplus.app.invoice.action.InvoiceCrudAction">
> <interceptor-ref name="editStack"/>
> </action>
> <action name="saveInvoice"
> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="save">
> <interceptor-ref name="crudStack"/>
> </action>
> <action name="deleteInvoice"
> class="com.eplus.app.invoice.action.InvoiceCrudAction"
> method="delete">
> <interceptor-ref name="crudStack"/>
> </action>
>
>
>
> A better example of reusing the same action with the same method
> several times is our DomainObjectLister. We're still working out
> the entity meta-data we've been building, so I foresee this
> continuing to evolve, but it's pretty simple already. In the future
> you'll just need to configure it with the domain type.
>
> <action name="getVendorRelationships"
> class="com.eplus.lib.web.action.DomainObjectLister">
> <param
> name="domainClass">com.eplus.biz.catalog.mgmt.model.VendorRelationship
> </param>
> <param name="visibleFields">vendor.name</param>
> <param name="idField">id</param>
> <param name="sortColumn">vendor.name</param>
> <result name="success" type="freemarker">/template/
> eplus/lists/domainObjectTable.ftl</result>
> </action>
> <action name="getBuyerCatalogs"
> class="com.eplus.lib.web.action.DomainObjectLister">
> <param
> name="domainClass">com.eplus.biz.catalog.mgmt.model.BuyerCatalog</
> param>
> <param name="visibleFields">name,description</param>
> <param name="idField">id</param>
> <param name="sortColumn">name</param>
> <result name="success" type="freemarker">/template/
> eplus/lists/domainObjectTable.ftl</result>
> </action>
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?
> threadID=38338&messageID=75787#75787
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Bob Lee <cr...@crazybob.org>.
It doesn't, but I think it should. (Yes, Ted, I should do it then. ;))
Bob
On 7/25/06, tm jee <tm...@yahoo.co.uk> wrote:
>
> Just out of curiosity, the "invoice/{method}" and "{method}" pair, does
> the current implementation of Struts2 wildcard supports this? Looks a lot
> more clearer than the "invoice/*" and "{1}" pair.
>
> rgds
>
> ----- Original Message ----
> From: Bob Lee <cr...@crazybob.org>
> To: Struts Developers List <de...@struts.apache.org>
> Sent: Wednesday, 26 July, 2006 12:01:50 PM
> Subject: Re: Returning Result directly (was Re: DefaultActionMapper
> compatablity
>
> On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> > <action name="invoice/*"
> > class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
> > <result name="list"
> > type="freemarker">/template/eplus/metaDataList.ftl</result>
> > ...
> > </action>
>
> Or:
>
> <action name="invoice/{method}"
> class="com.eplus.app.invoice.action.InvoiceCrudAction"
> method="{method}">
> <result name="list"
> type="freemarker">/template/eplus/metaDataList.ftl</result>
> ...
> </action>
>
> Bob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
>
>
>
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Don Brown <mr...@twdata.org>.
I think that is a reasonable compromise, although it will take a rewrite of the
wildcard processing. Any objections before I open an XWork ticket for this?
Don
tm jee wrote:
> What about this, if we an action of "invoice_submit_ajax"
> - invoice_{*}_{*} where {1} will gives "submit" and {2} will gives "ajax"
> - invoice_{**} where {1} will gives "submit_ajax"
> - invoice_{method}_{way} where {method} will gives "submit" and {way} will gives "ajax"
> - invoice_{methodAndWay} where {methodAndWay} will gives "submit_ajax"
>
> thoughts?
>
>
> ----- Original Message ----
> From: Bob Lee <cr...@crazybob.org>
> To: Struts Developers List <de...@struts.apache.org>
> Sent: Wednesday, 26 July, 2006 1:51:06 PM
> Subject: Re: Returning Result directly (was Re: DefaultActionMapper compatablity
>
> I actually didn't understand the * scheme until someone explained it to me.
> On the other hand, I think I'd grok a scheme which used explicit names
> pretty quickly.
>
> Ant may use "*/**" for paths, but you don't reference indexed parts of the
> match, do you?
>
> Bob
>
> On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>> Good ideas. The question is really what would be most intuitive and
>> cover the most common use cases. The */** syntax seems pretty common,
>> and, IMO, very intuitive used in tools like Ant. If we abstract the
>> wildcard handling, we could allow users to switch in a new impl easily
>> for more advanced cases. That said, I'm open to changing the default
>> wildcard pattern style if we find one that is more powerful, yet still
>> easy and intuitive.
>>
>> Don
>>
>> Bob Lee wrote:
>>> {foo*} could match slashes. Or {/foo}. Or {{foo}}.
>>>
>>> We could also use regular expressions--they support this sort of group
>>> matching and results.
>>>
>>> Bob
>>>
>>> On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>>>> Struts 2 (XWork 2 actually) currently does not support this
>> syntax. The
>>>> main advantage the current "*" token scheme has is "**" which can match
>>>> any character including '/' while "*" matches all characters except
>>>> '/'. Now, it should be possible to abstract the wildcard
>>>> handling/processing so that you could plug in new wildcard handlers.
>>>>
>>>> Don
>>>>
>>>> tm jee wrote:
>>>>> Just out of curiosity, the "invoice/{method}" and "{method}" pair,
>>>> does
>>>> the current implementation of Struts2 wildcard supports this? Looks a
>>>> lot
>>>> more clearer than the "invoice/*" and "{1}" pair.
>>>>> rgds
>>>>>
>>>>> ----- Original Message ----
>>>>> From: Bob Lee <cr...@crazybob.org>
>>>>> To: Struts Developers List <de...@struts.apache.org>
>>>>> Sent: Wednesday, 26 July, 2006 12:01:50 PM
>>>>> Subject: Re: Returning Result directly (was Re: DefaultActionMapper
>>>> compatablity
>>>>> On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>>>>>
>>>>>> <action name="invoice/*"
>>>>>> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
>>>>>> <result name="list"
>>>>>> type="freemarker">/template/eplus/metaDataList.ftl</result>
>>>>>> ...
>>>>>> </action>
>>>>>>
>>>>> Or:
>>>>>
>>>>> <action name="invoice/{method}"
>>>>> class="com.eplus.app.invoice.action.InvoiceCrudAction"
>>>> method="{method}">
>>>>> <result name="list"
>>>> type="freemarker">/template/eplus/metaDataList.ftl</result>
>>>>> ...
>>>>> </action>
>>>>>
>>>>> Bob
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by tm jee <tm...@yahoo.co.uk>.
What about this, if we an action of "invoice_submit_ajax"
- invoice_{*}_{*} where {1} will gives "submit" and {2} will gives "ajax"
- invoice_{**} where {1} will gives "submit_ajax"
- invoice_{method}_{way} where {method} will gives "submit" and {way} will gives "ajax"
- invoice_{methodAndWay} where {methodAndWay} will gives "submit_ajax"
thoughts?
----- Original Message ----
From: Bob Lee <cr...@crazybob.org>
To: Struts Developers List <de...@struts.apache.org>
Sent: Wednesday, 26 July, 2006 1:51:06 PM
Subject: Re: Returning Result directly (was Re: DefaultActionMapper compatablity
I actually didn't understand the * scheme until someone explained it to me.
On the other hand, I think I'd grok a scheme which used explicit names
pretty quickly.
Ant may use "*/**" for paths, but you don't reference indexed parts of the
match, do you?
Bob
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>
> Good ideas. The question is really what would be most intuitive and
> cover the most common use cases. The */** syntax seems pretty common,
> and, IMO, very intuitive used in tools like Ant. If we abstract the
> wildcard handling, we could allow users to switch in a new impl easily
> for more advanced cases. That said, I'm open to changing the default
> wildcard pattern style if we find one that is more powerful, yet still
> easy and intuitive.
>
> Don
>
> Bob Lee wrote:
> > {foo*} could match slashes. Or {/foo}. Or {{foo}}.
> >
> > We could also use regular expressions--they support this sort of group
> > matching and results.
> >
> > Bob
> >
> > On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> >>
> >> Struts 2 (XWork 2 actually) currently does not support this
> syntax. The
> >> main advantage the current "*" token scheme has is "**" which can match
> >> any character including '/' while "*" matches all characters except
> >> '/'. Now, it should be possible to abstract the wildcard
> >> handling/processing so that you could plug in new wildcard handlers.
> >>
> >> Don
> >>
> >> tm jee wrote:
> >> > Just out of curiosity, the "invoice/{method}" and "{method}" pair,
> >> does
> >> the current implementation of Struts2 wildcard supports this? Looks a
> >> lot
> >> more clearer than the "invoice/*" and "{1}" pair.
> >> >
> >> > rgds
> >> >
> >> > ----- Original Message ----
> >> > From: Bob Lee <cr...@crazybob.org>
> >> > To: Struts Developers List <de...@struts.apache.org>
> >> > Sent: Wednesday, 26 July, 2006 12:01:50 PM
> >> > Subject: Re: Returning Result directly (was Re: DefaultActionMapper
> >> compatablity
> >> >
> >> > On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> >> >
> >> >> <action name="invoice/*"
> >> >> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
> >> >> <result name="list"
> >> >> type="freemarker">/template/eplus/metaDataList.ftl</result>
> >> >> ...
> >> >> </action>
> >> >>
> >> >
> >> > Or:
> >> >
> >> > <action name="invoice/{method}"
> >> > class="com.eplus.app.invoice.action.InvoiceCrudAction"
> >> method="{method}">
> >> > <result name="list"
> >> type="freemarker">/template/eplus/metaDataList.ftl</result>
> >> > ...
> >> > </action>
> >> >
> >> > Bob
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: dev-help@struts.apache.org
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Bob Lee <cr...@crazybob.org>.
I actually didn't understand the * scheme until someone explained it to me.
On the other hand, I think I'd grok a scheme which used explicit names
pretty quickly.
Ant may use "*/**" for paths, but you don't reference indexed parts of the
match, do you?
Bob
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>
> Good ideas. The question is really what would be most intuitive and
> cover the most common use cases. The */** syntax seems pretty common,
> and, IMO, very intuitive used in tools like Ant. If we abstract the
> wildcard handling, we could allow users to switch in a new impl easily
> for more advanced cases. That said, I'm open to changing the default
> wildcard pattern style if we find one that is more powerful, yet still
> easy and intuitive.
>
> Don
>
> Bob Lee wrote:
> > {foo*} could match slashes. Or {/foo}. Or {{foo}}.
> >
> > We could also use regular expressions--they support this sort of group
> > matching and results.
> >
> > Bob
> >
> > On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> >>
> >> Struts 2 (XWork 2 actually) currently does not support this
> syntax. The
> >> main advantage the current "*" token scheme has is "**" which can match
> >> any character including '/' while "*" matches all characters except
> >> '/'. Now, it should be possible to abstract the wildcard
> >> handling/processing so that you could plug in new wildcard handlers.
> >>
> >> Don
> >>
> >> tm jee wrote:
> >> > Just out of curiosity, the "invoice/{method}" and "{method}" pair,
> >> does
> >> the current implementation of Struts2 wildcard supports this? Looks a
> >> lot
> >> more clearer than the "invoice/*" and "{1}" pair.
> >> >
> >> > rgds
> >> >
> >> > ----- Original Message ----
> >> > From: Bob Lee <cr...@crazybob.org>
> >> > To: Struts Developers List <de...@struts.apache.org>
> >> > Sent: Wednesday, 26 July, 2006 12:01:50 PM
> >> > Subject: Re: Returning Result directly (was Re: DefaultActionMapper
> >> compatablity
> >> >
> >> > On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> >> >
> >> >> <action name="invoice/*"
> >> >> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
> >> >> <result name="list"
> >> >> type="freemarker">/template/eplus/metaDataList.ftl</result>
> >> >> ...
> >> >> </action>
> >> >>
> >> >
> >> > Or:
> >> >
> >> > <action name="invoice/{method}"
> >> > class="com.eplus.app.invoice.action.InvoiceCrudAction"
> >> method="{method}">
> >> > <result name="list"
> >> type="freemarker">/template/eplus/metaDataList.ftl</result>
> >> > ...
> >> > </action>
> >> >
> >> > Bob
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: dev-help@struts.apache.org
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Don Brown <mr...@twdata.org>.
Good ideas. The question is really what would be most intuitive and
cover the most common use cases. The */** syntax seems pretty common,
and, IMO, very intuitive used in tools like Ant. If we abstract the
wildcard handling, we could allow users to switch in a new impl easily
for more advanced cases. That said, I'm open to changing the default
wildcard pattern style if we find one that is more powerful, yet still
easy and intuitive.
Don
Bob Lee wrote:
> {foo*} could match slashes. Or {/foo}. Or {{foo}}.
>
> We could also use regular expressions--they support this sort of group
> matching and results.
>
> Bob
>
> On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>>
>> Struts 2 (XWork 2 actually) currently does not support this syntax. The
>> main advantage the current "*" token scheme has is "**" which can match
>> any character including '/' while "*" matches all characters except
>> '/'. Now, it should be possible to abstract the wildcard
>> handling/processing so that you could plug in new wildcard handlers.
>>
>> Don
>>
>> tm jee wrote:
>> > Just out of curiosity, the "invoice/{method}" and "{method}" pair,
>> does
>> the current implementation of Struts2 wildcard supports this? Looks a
>> lot
>> more clearer than the "invoice/*" and "{1}" pair.
>> >
>> > rgds
>> >
>> > ----- Original Message ----
>> > From: Bob Lee <cr...@crazybob.org>
>> > To: Struts Developers List <de...@struts.apache.org>
>> > Sent: Wednesday, 26 July, 2006 12:01:50 PM
>> > Subject: Re: Returning Result directly (was Re: DefaultActionMapper
>> compatablity
>> >
>> > On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>> >
>> >> <action name="invoice/*"
>> >> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
>> >> <result name="list"
>> >> type="freemarker">/template/eplus/metaDataList.ftl</result>
>> >> ...
>> >> </action>
>> >>
>> >
>> > Or:
>> >
>> > <action name="invoice/{method}"
>> > class="com.eplus.app.invoice.action.InvoiceCrudAction"
>> method="{method}">
>> > <result name="list"
>> type="freemarker">/template/eplus/metaDataList.ftl</result>
>> > ...
>> > </action>
>> >
>> > Bob
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: dev-help@struts.apache.org
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Bob Lee <cr...@crazybob.org>.
{foo*} could match slashes. Or {/foo}. Or {{foo}}.
We could also use regular expressions--they support this sort of group
matching and results.
Bob
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>
> Struts 2 (XWork 2 actually) currently does not support this syntax. The
> main advantage the current "*" token scheme has is "**" which can match
> any character including '/' while "*" matches all characters except
> '/'. Now, it should be possible to abstract the wildcard
> handling/processing so that you could plug in new wildcard handlers.
>
> Don
>
> tm jee wrote:
> > Just out of curiosity, the "invoice/{method}" and "{method}" pair, does
> the current implementation of Struts2 wildcard supports this? Looks a lot
> more clearer than the "invoice/*" and "{1}" pair.
> >
> > rgds
> >
> > ----- Original Message ----
> > From: Bob Lee <cr...@crazybob.org>
> > To: Struts Developers List <de...@struts.apache.org>
> > Sent: Wednesday, 26 July, 2006 12:01:50 PM
> > Subject: Re: Returning Result directly (was Re: DefaultActionMapper
> compatablity
> >
> > On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> >
> >> <action name="invoice/*"
> >> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
> >> <result name="list"
> >> type="freemarker">/template/eplus/metaDataList.ftl</result>
> >> ...
> >> </action>
> >>
> >
> > Or:
> >
> > <action name="invoice/{method}"
> > class="com.eplus.app.invoice.action.InvoiceCrudAction"
> method="{method}">
> > <result name="list"
> type="freemarker">/template/eplus/metaDataList.ftl</result>
> > ...
> > </action>
> >
> > Bob
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Don Brown <mr...@twdata.org>.
Struts 2 (XWork 2 actually) currently does not support this syntax. The
main advantage the current "*" token scheme has is "**" which can match
any character including '/' while "*" matches all characters except
'/'. Now, it should be possible to abstract the wildcard
handling/processing so that you could plug in new wildcard handlers.
Don
tm jee wrote:
> Just out of curiosity, the "invoice/{method}" and "{method}" pair, does the current implementation of Struts2 wildcard supports this? Looks a lot more clearer than the "invoice/*" and "{1}" pair.
>
> rgds
>
> ----- Original Message ----
> From: Bob Lee <cr...@crazybob.org>
> To: Struts Developers List <de...@struts.apache.org>
> Sent: Wednesday, 26 July, 2006 12:01:50 PM
> Subject: Re: Returning Result directly (was Re: DefaultActionMapper compatablity
>
> On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>
>> <action name="invoice/*"
>> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
>> <result name="list"
>> type="freemarker">/template/eplus/metaDataList.ftl</result>
>> ...
>> </action>
>>
>
> Or:
>
> <action name="invoice/{method}"
> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{method}">
> <result name="list" type="freemarker">/template/eplus/metaDataList.ftl</result>
> ...
> </action>
>
> Bob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by tm jee <tm...@yahoo.co.uk>.
Just out of curiosity, the "invoice/{method}" and "{method}" pair, does the current implementation of Struts2 wildcard supports this? Looks a lot more clearer than the "invoice/*" and "{1}" pair.
rgds
----- Original Message ----
From: Bob Lee <cr...@crazybob.org>
To: Struts Developers List <de...@struts.apache.org>
Sent: Wednesday, 26 July, 2006 12:01:50 PM
Subject: Re: Returning Result directly (was Re: DefaultActionMapper compatablity
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> <action name="invoice/*"
> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
> <result name="list"
> type="freemarker">/template/eplus/metaDataList.ftl</result>
> ...
> </action>
Or:
<action name="invoice/{method}"
class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{method}">
<result name="list" type="freemarker">/template/eplus/metaDataList.ftl</result>
...
</action>
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Bob Lee <cr...@crazybob.org>.
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
> <action name="invoice/*"
> class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
> <result name="list"
> type="freemarker">/template/eplus/metaDataList.ftl</result>
> ...
> </action>
Or:
<action name="invoice/{method}"
class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{method}">
<result name="list" type="freemarker">/template/eplus/metaDataList.ftl</result>
...
</action>
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Don Brown <mr...@twdata.org>.
Jason Carreira wrote:
>> Could you give an example how multiple mappings for a
>> single action is
>> used with common CRUD actions?
>>
>> Don
>>
>
> Ok, here's what our Invoice CRUD action mappings look like:
>
> <action name="listInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="list">
> <interceptor-ref name="listStack"/>
> <result name="CRUD-list" type="freemarker">/template/eplus/metaDataList.ftl</result>
> </action>
> <action name="editInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction">
> <interceptor-ref name="editStack"/>
> </action>
> <action name="saveInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="save">
> <interceptor-ref name="crudStack"/>
> </action>
> <action name="deleteInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="delete">
> <interceptor-ref name="crudStack"/>
> </action>
>
For this case, I would rather construct a single interceptor stack that
could handle all requests so I could do:
<action name="invoice/*"
class="com.eplus.app.invoice.action.InvoiceCrudAction" method="{1}">
<result name="list"
type="freemarker">/template/eplus/metaDataList.ftl</result>
...
</action>
This also has the advantage of having cleaner URL's, IMO. Furthermore,
you could use "*/*" and match all your crud actions in one shot.
> A better example of reusing the same action with the same method several times is our DomainObjectLister. We're still working out the entity meta-data we've been building, so I foresee this continuing to evolve, but it's pretty simple already. In the future you'll just need to configure it with the domain type.
>
> <action name="getVendorRelationships" class="com.eplus.lib.web.action.DomainObjectLister">
> <param name="domainClass">com.eplus.biz.catalog.mgmt.model.VendorRelationship</param>
> <param name="visibleFields">vendor.name</param>
> <param name="idField">id</param>
> <param name="sortColumn">vendor.name</param>
> <result name="success" type="freemarker">/template/eplus/lists/domainObjectTable.ftl</result>
> </action>
> <action name="getBuyerCatalogs" class="com.eplus.lib.web.action.DomainObjectLister">
> <param name="domainClass">com.eplus.biz.catalog.mgmt.model.BuyerCatalog</param>
> <param name="visibleFields">name,description</param>
> <param name="idField">id</param>
> <param name="sortColumn">name</param>
> <result name="success" type="freemarker">/template/eplus/lists/domainObjectTable.ftl</result>
> </action>
>
In this case, you would definitely want to use the XML configuration
option. One you start creating generic, parameterized Actions, the XML
plays a much larger part in the process. However, I'm not sure those
still wouldn't be the edge cases.
Don
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75787#75787
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by tm jee <tm...@yahoo.co.uk>.
This might not be related, but I like the way Jason does it, and its the way I'd like to do it as well, especailly since I learn that foo!bar is going to get deprecated.
----- Original Message ----
From: Jason Carreira <fo...@opensymphony.com>
To: dev@struts.apache.org
Sent: Wednesday, 26 July, 2006 11:22:41 AM
Subject: Re: Returning Result directly (was Re: DefaultActionMapper compatablity
> Could you give an example how multiple mappings for a
> single action is
> used with common CRUD actions?
>
> Don
Ok, here's what our Invoice CRUD action mappings look like:
<action name="listInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="list">
<interceptor-ref name="listStack"/>
<result name="CRUD-list" type="freemarker">/template/eplus/metaDataList.ftl</result>
</action>
<action name="editInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction">
<interceptor-ref name="editStack"/>
</action>
<action name="saveInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="save">
<interceptor-ref name="crudStack"/>
</action>
<action name="deleteInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="delete">
<interceptor-ref name="crudStack"/>
</action>
A better example of reusing the same action with the same method several times is our DomainObjectLister. We're still working out the entity meta-data we've been building, so I foresee this continuing to evolve, but it's pretty simple already. In the future you'll just need to configure it with the domain type.
<action name="getVendorRelationships" class="com.eplus.lib.web.action.DomainObjectLister">
<param name="domainClass">com.eplus.biz.catalog.mgmt.model.VendorRelationship</param>
<param name="visibleFields">vendor.name</param>
<param name="idField">id</param>
<param name="sortColumn">vendor.name</param>
<result name="success" type="freemarker">/template/eplus/lists/domainObjectTable.ftl</result>
</action>
<action name="getBuyerCatalogs" class="com.eplus.lib.web.action.DomainObjectLister">
<param name="domainClass">com.eplus.biz.catalog.mgmt.model.BuyerCatalog</param>
<param name="visibleFields">name,description</param>
<param name="idField">id</param>
<param name="sortColumn">name</param>
<result name="success" type="freemarker">/template/eplus/lists/domainObjectTable.ftl</result>
</action>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75787#75787
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity
Posted by Jason Carreira <fo...@opensymphony.com>.
> Could you give an example how multiple mappings for a
> single action is
> used with common CRUD actions?
>
> Don
Ok, here's what our Invoice CRUD action mappings look like:
<action name="listInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="list">
<interceptor-ref name="listStack"/>
<result name="CRUD-list" type="freemarker">/template/eplus/metaDataList.ftl</result>
</action>
<action name="editInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction">
<interceptor-ref name="editStack"/>
</action>
<action name="saveInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="save">
<interceptor-ref name="crudStack"/>
</action>
<action name="deleteInvoice" class="com.eplus.app.invoice.action.InvoiceCrudAction" method="delete">
<interceptor-ref name="crudStack"/>
</action>
A better example of reusing the same action with the same method several times is our DomainObjectLister. We're still working out the entity meta-data we've been building, so I foresee this continuing to evolve, but it's pretty simple already. In the future you'll just need to configure it with the domain type.
<action name="getVendorRelationships" class="com.eplus.lib.web.action.DomainObjectLister">
<param name="domainClass">com.eplus.biz.catalog.mgmt.model.VendorRelationship</param>
<param name="visibleFields">vendor.name</param>
<param name="idField">id</param>
<param name="sortColumn">vendor.name</param>
<result name="success" type="freemarker">/template/eplus/lists/domainObjectTable.ftl</result>
</action>
<action name="getBuyerCatalogs" class="com.eplus.lib.web.action.DomainObjectLister">
<param name="domainClass">com.eplus.biz.catalog.mgmt.model.BuyerCatalog</param>
<param name="visibleFields">name,description</param>
<param name="idField">id</param>
<param name="sortColumn">name</param>
<result name="success" type="freemarker">/template/eplus/lists/domainObjectTable.ftl</result>
</action>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75787#75787
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Don Brown <mr...@twdata.org>.
Could you give an example how multiple mappings for a single action is
used with common CRUD actions?
Don
Jason Carreira wrote:
>> I'm sure some people do, but the question is in what
>> percentages? I have done
>> it, but only a couple of times, perhaps representing
>> 2-3% of my actions. Since
>> the XML configuration way is still an option, I think
>> orienting the framework to
>> make the more common things easier, yet still
>> allowing more complex
>> configuration, is the best approach.
>>
>> Don
>>
>
> Since at least 50% of an app ends up being CRUD operations and we should make it easy to have a reusable CRUD / list / search framework... like the one we've built at work... then I'd say probably 50% of the action configs will be reused action classes. We've been harvesting more and more reusability in our app as we keep finding opportunities.
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75779#75779
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity
Posted by Jason Carreira <fo...@opensymphony.com>.
> I'm sure some people do, but the question is in what
> percentages? I have done
> it, but only a couple of times, perhaps representing
> 2-3% of my actions. Since
> the XML configuration way is still an option, I think
> orienting the framework to
> make the more common things easier, yet still
> allowing more complex
> configuration, is the best approach.
>
> Don
Since at least 50% of an app ends up being CRUD operations and we should make it easy to have a reusable CRUD / list / search framework... like the one we've built at work... then I'd say probably 50% of the action configs will be reused action classes. We've been harvesting more and more reusability in our app as we keep finding opportunities.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75779#75779
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper compatablity
Posted by Don Brown <mr...@twdata.org>.
I'm sure some people do, but the question is in what percentages? I have done
it, but only a couple of times, perhaps representing 2-3% of my actions. Since
the XML configuration way is still an option, I think orienting the framework to
make the more common things easier, yet still allowing more complex
configuration, is the best approach.
Don
Jason Carreira wrote:
> Ugh, not this again... Doesn't anyone else reuse their actions and map them in several different ways?
>
>> I personally would like to see XWork enhanced to
>> support action methods
>> returning Result instances directly, however we would
>> have to thoroughly think
>> through the consequences.
>>
>> Reasons for:
>> - Better security
>> - Easier, more explicit
>> - Results will probably be defined as annotations
>> soon, so why not just return
>> he Result directly?
>> - Allows non-annotation apps to drastically
>> minimize config
>> - Supports more complex results
>> Reasons against:
>> - The Action interface really loses most of its
>> meaning
>> - ActionSupport could no longer extend Action
>> - XWork internals would need modification since many
>> places expect a result code
>> - Supporting the return of Result, String, and
>> Object might be confusing for
>> ew developers
>> - Current Results would need some improvements to
>> make them easier to use
>> better constructors, default location names/patterns,
>> etc)
>>
>> Again, all things considered, I'd really like to see
>> us add the ability to
>> return Results directly as I think it just makes
>> things easier. The ability to
>> separate JSP paths from Java code, IMO, is way
>> overrated and years of its
>> practice hasn't shown the additional complexity is
>> really worth it. For those
>> that prefer the old style, they would still have that
>> option.
>>
>> Don
>>
>>> -t
>>>
>>> On Jul 25, 2006, at 4:11 PM, Ted Husted wrote:
>>>
>>>> On 7/25/06, Jason Carreira
>> <fo...@opensymphony.com> wrote:
>>>>> @Action to mark it as an Action method?
>>>> Stripes uses the annontation @DefaultHandler where
>> we would configure
>>>> a default action, which might imply the annotation
>> @Handler for what
>>>> we are talking about here.
>>>>
>>>> *
>> http://stripes.mc4j.org/confluence/display/stripes/Ann
>> otation+Reference
>>>> -Ted.
>>>>
>>>>
>> ------------------------------------------------------
>> ---------------
>>>> To unsubscribe, e-mail:
>> dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail:
>> dev-help@struts.apache.org
>>>
>>>
>> ------------------------------------------------------
>> ---------------
>>> To unsubscribe, e-mail:
>> dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail:
>> dev-help@struts.apache.org
>>>
>>
>> ------------------------------------------------------
>> ---------------
>> To unsubscribe, e-mail:
>> dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> dev-help@struts.apache.org
>>
>>
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75718#75718
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Returning Result directly (was Re: DefaultActionMapper
compatablity
Posted by Jason Carreira <fo...@opensymphony.com>.
Ugh, not this again... Doesn't anyone else reuse their actions and map them in several different ways?
>
> I personally would like to see XWork enhanced to
> support action methods
> returning Result instances directly, however we would
> have to thoroughly think
> through the consequences.
>
> Reasons for:
> - Better security
> - Easier, more explicit
> - Results will probably be defined as annotations
> soon, so why not just return
> he Result directly?
> - Allows non-annotation apps to drastically
> minimize config
> - Supports more complex results
> Reasons against:
> - The Action interface really loses most of its
> meaning
> - ActionSupport could no longer extend Action
> - XWork internals would need modification since many
> places expect a result code
> - Supporting the return of Result, String, and
> Object might be confusing for
> ew developers
> - Current Results would need some improvements to
> make them easier to use
> better constructors, default location names/patterns,
> etc)
>
> Again, all things considered, I'd really like to see
> us add the ability to
> return Results directly as I think it just makes
> things easier. The ability to
> separate JSP paths from Java code, IMO, is way
> overrated and years of its
> practice hasn't shown the additional complexity is
> really worth it. For those
> that prefer the old style, they would still have that
> option.
>
> Don
>
> >
> > -t
> >
> > On Jul 25, 2006, at 4:11 PM, Ted Husted wrote:
> >
> >> On 7/25/06, Jason Carreira
> <fo...@opensymphony.com> wrote:
> >>> @Action to mark it as an Action method?
> >>
> >> Stripes uses the annontation @DefaultHandler where
> we would configure
> >> a default action, which might imply the annotation
> @Handler for what
> >> we are talking about here.
> >>
> >> *
> http://stripes.mc4j.org/confluence/display/stripes/Ann
> otation+Reference
> >>
> >> -Ted.
> >>
> >>
> ------------------------------------------------------
> ---------------
> >> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> dev-help@struts.apache.org
> >>
> >
> >
> >
> ------------------------------------------------------
> ---------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> dev-help@struts.apache.org
> >
> >
>
>
> ------------------------------------------------------
> ---------------
> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75718#75718
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Returning Result directly (was Re: DefaultActionMapper compatablity
switch)
Posted by Don Brown <mr...@twdata.org>.
Tim Fennell wrote:
> I was going to chime in on this, so I may as well now. Stripes, through
> it's default way of routing events, will allow a submitted form or URL
> to invoke any method that is public no-arg and returns a Resolution -
> this seems much safer because Resolution is a Stripes specific class as
> opposed to String, which obviously isn't. In this case @HandlesEvent is
> only used to mark methods that have different return types, or need to
> be aliased.
I personally would like to see XWork enhanced to support action methods
returning Result instances directly, however we would have to thoroughly think
through the consequences.
Reasons for:
- Better security
- Easier, more explicit
- Results will probably be defined as annotations soon, so why not just return
the Result directly?
- Allows non-annotation apps to drastically minimize config
- Supports more complex results
Reasons against:
- The Action interface really loses most of its meaning
- ActionSupport could no longer extend Action
- XWork internals would need modification since many places expect a result code
- Supporting the return of Result, String, and Object might be confusing for
new developers
- Current Results would need some improvements to make them easier to use
(better constructors, default location names/patterns, etc)
Again, all things considered, I'd really like to see us add the ability to
return Results directly as I think it just makes things easier. The ability to
separate JSP paths from Java code, IMO, is way overrated and years of its
practice hasn't shown the additional complexity is really worth it. For those
that prefer the old style, they would still have that option.
Don
>
> -t
>
> On Jul 25, 2006, at 4:11 PM, Ted Husted wrote:
>
>> On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
>>> @Action to mark it as an Action method?
>>
>> Stripes uses the annontation @DefaultHandler where we would configure
>> a default action, which might imply the annotation @Handler for what
>> we are talking about here.
>>
>> * http://stripes.mc4j.org/confluence/display/stripes/Annotation+Reference
>>
>> -Ted.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Tim Fennell <tf...@tfenne.com>.
While it might imply that, Stripes actually uses
@HandlesEvent
Which can take an optional String parameter which is the name of the
handled event (which is defaulted to the method name otherwise)....
I was going to chime in on this, so I may as well now. Stripes,
through it's default way of routing events, will allow a submitted
form or URL to invoke any method that is public no-arg and returns a
Resolution - this seems much safer because Resolution is a Stripes
specific class as opposed to String, which obviously isn't. In this
case @HandlesEvent is only used to mark methods that have different
return types, or need to be aliased.
-t
On Jul 25, 2006, at 4:11 PM, Ted Husted wrote:
> On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
>> @Action to mark it as an Action method?
>
> Stripes uses the annontation @DefaultHandler where we would configure
> a default action, which might imply the annotation @Handler for what
> we are talking about here.
>
> * http://stripes.mc4j.org/confluence/display/stripes/Annotation
> +Reference
>
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Michael Jouravlev <jm...@gmail.com>.
On 7/25/06, Ted Husted <hu...@apache.org> wrote:
> On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> > @Action to mark it as an Action method?
>
> Stripes uses the annontation @DefaultHandler where we would configure
> a default action, which might imply the annotation @Handler for what
> we are talking about here.
>
> * http://stripes.mc4j.org/confluence/display/stripes/Annotation+Reference
>
> -Ted.
In Stripes an action has dispatch style by default. In the "one action
- one service" case an action contains just one method marked as
@DefaultHandler (I am not sure it even has to be marked if there are
no other methods). Simple and convenient. I also like that Stripes use
"handler" to call methods, not action classes.
Returning back to Struts and to Struts 1 in particular:
* "handler" ==> a method that handles a request, can be several of
these for a dispatch action
* "default handler" ==> Action.execute()
* I am still reluctant to call a "handler" something that can be
either an Action or a Command. Seeminly S2 does not have this problem
because it does not have Commands and interceptors are clearly
different things. Whether to keep using "action" for both Action and
Command in S1, or to introduce neutral "worker" and use it for both S1
and S2 endpoints, or to use "handler" like Ted suggested? In the
latter case we will have to distinguish classes and methods.
* I think it is quite obvious that base Action in S1should be
retrofitted to provide dispatching... er... multi-handler
capabilities. Don and Frank have already agreed to this before, so I
hope that the above Stripes example will finally convince Niall ;-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> @Action to mark it as an Action method?
Stripes uses the annontation @DefaultHandler where we would configure
a default action, which might imply the annotation @Handler for what
we are talking about here.
* http://stripes.mc4j.org/confluence/display/stripes/Annotation+Reference
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> Why are we trying to follow what Stripes has done? I'm sure Stripes is nice, but why do
> we need to try to follow what it does instead of trying to figure out what makes the most
> sense to us?
Why not start with what Stripes has done, and then decide if it makes
sense to us?
[I seem to remember having this same conversation about Cocoon :)]
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Jason Carreira <fo...@opensymphony.com>.
>
> Though, I would strongly suggest that we try to
> follow the Stripes
> annotations wherever possible. And if there's a hard
> reason why we
> want to use a different term, we should work with Tim
> on an
> alternative. There's really no reason to have two
> annotation APIs that
> are trying to do essentially the same thing.
>
> *
> http://stripes.mc4j.org/confluence/display/stripes/Ann
> otation+Reference
>
> -Ted.
>
Why are we trying to follow what Stripes has done? I'm sure Stripes is nice, but why do we need to try to follow what it does instead of trying to figure out what makes the most sense to us?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75780#75780
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
> @Action to mark it as an Action method?
On 7/25/06, Bob Lee <cr...@crazybob.org> wrote:
> +1 for @Action
Action is already so overloaded, it's painful to see us trying to
reuse it again in another context. Sure, we have an Action interface,
but we also have action elements, and here what we are really marking
is the "method" property of the action element. If we wanted to use
Struts 2/Webwork 2 terminology, a likely term might be @method. But,
marking a method method seems redundant :) If it's acceptable to use
periods in annotations, the next most likely suspect might be
@action.method, to corresponds with the Struts configuration.
Though, I would strongly suggest that we try to follow the Stripes
annotations wherever possible. And if there's a hard reason why we
want to use a different term, we should work with Tim on an
alternative. There's really no reason to have two annotation APIs that
are trying to do essentially the same thing.
* http://stripes.mc4j.org/confluence/display/stripes/Annotation+Reference
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Bob Lee <cr...@crazybob.org>.
+1 for @Action
On 7/25/06, Jason Carreira <fo...@opensymphony.com> wrote:
>
> >
> >
> > Works for me. What should we call this annotation?
> > @Published?
>
> @Action to mark it as an Action method?
> ---------------------------------------------------------------------
> Posted via Jive Forums
>
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75682#75682
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: DefaultActionMapper compatablity switch
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
@Callable or @Executable, so it's somewhat more explicit?
Frank
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
On Tue, July 25, 2006 3:59 pm, Jason Carreira wrote:
>>
>>
>> Works for me. What should we call this annotation?
>> @Published?
>
> @Action to mark it as an Action method?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75682#75682
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Jason Carreira <fo...@opensymphony.com>.
>
>
> Works for me. What should we call this annotation?
> @Published?
@Action to mark it as an Action method?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=38338&messageID=75682#75682
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Bob Lee <cr...@crazybob.org>.
On 7/25/06, Don Brown <mr...@twdata.org> wrote:
>
> In the future, I could see an interceptor that checks the method specified
> for a
> method-level annotation, and only if it is present, allow the request to
> continue.
Works for me. What should we call this annotation? @Published?
Re: DefaultActionMapper compatablity switch
Posted by David Evans <ds...@berndtgroup.net>.
That all makes sense, and thanks to you, Bob and Ted for your openness
in discussing these issues with a non-commiter. In looking through the
snapshot, I'm really excited to see where things are going, this
framework is going to be a joy to work with.
dave
On Tue, 2006-07-25 at 10:36 -0700, Don Brown wrote:
> _If_ you use a wildcard for an action, and _if_ you have that matched value as
> your method name, then yes, you are intentionally allowing anyone to access any
> method on that action class. This isn't a concern, IMO, because it was
> explicitly allowed by the developer, where the old capability was enabled by
> default, where the developer may not have been aware of it.
>
> In the future, I could see an interceptor that checks the method specified for a
> method-level annotation, and only if it is present, allow the request to continue.
>
> Don
>
> David Evans wrote:
> > On Mon, 2006-07-24 at 21:27 -0400, Ted Husted wrote:
> >> On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
> >>> I understand the security concerns, but the flexibility is far more
> >>> important to me. If a user wants to protect themselves, they can make
> >>> methods they don't want run by xwork private. Or maybe have an explicit
> >>> list of <param name="excludeMethods">this,that,theOther</param>.
> >> The framework is as flexible as ever. Action alaises are still
> >> supported. The only difference is that you can only declare the alias
> >> in an action mapping, or use wildcards.
> >
> > I think the action:name!method idiom is perfectly flexible. I was
> > referring specifically to Bob's comments about securing the method names
> > available for calling, by using struts tags which will assign a digest
> > key to a map of method names. Bob said "I was hoping we'd store which
> > methods are OK to invoke in the session or sign them or something".
> >
> > The question is, once the wildcard is set up in the struts.xml file, to
> > allow the above idiom, how do you prevent the calling of a method on
> > your action? because anyone can then type:
> > http://www.domain.com/someaction?action:someaction!somemethod to try to
> > run random methods. I am hoping that if any steps are taken to prevent
> > that security hole, it will still allow the flexible wildcard usage.
> >
> >> Instead of
> >>
> >> MyDispatchAction!delete
> >>
> >> We define an action mapping
> >>
> >> <action name="delete" class="example.CrudAction" method="delete">
> >>
> >> and call the delete acton directly, or simulate the same with wildcards.
> >>
> >> The URL aliases weren't more "flexible". Just lazy and unsecure.
> >>
> >> For the configuration-free crowd, I expect alias annotations are (or
> >> will be) supported too.
> >
> > What would that look like? I don't know what is meant by alias
> > annotations.
> >
> > dave
> >
> >
> >
> >> -Ted.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Don Brown <mr...@twdata.org>.
_If_ you use a wildcard for an action, and _if_ you have that matched value as
your method name, then yes, you are intentionally allowing anyone to access any
method on that action class. This isn't a concern, IMO, because it was
explicitly allowed by the developer, where the old capability was enabled by
default, where the developer may not have been aware of it.
In the future, I could see an interceptor that checks the method specified for a
method-level annotation, and only if it is present, allow the request to continue.
Don
David Evans wrote:
> On Mon, 2006-07-24 at 21:27 -0400, Ted Husted wrote:
>> On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
>>> I understand the security concerns, but the flexibility is far more
>>> important to me. If a user wants to protect themselves, they can make
>>> methods they don't want run by xwork private. Or maybe have an explicit
>>> list of <param name="excludeMethods">this,that,theOther</param>.
>> The framework is as flexible as ever. Action alaises are still
>> supported. The only difference is that you can only declare the alias
>> in an action mapping, or use wildcards.
>
> I think the action:name!method idiom is perfectly flexible. I was
> referring specifically to Bob's comments about securing the method names
> available for calling, by using struts tags which will assign a digest
> key to a map of method names. Bob said "I was hoping we'd store which
> methods are OK to invoke in the session or sign them or something".
>
> The question is, once the wildcard is set up in the struts.xml file, to
> allow the above idiom, how do you prevent the calling of a method on
> your action? because anyone can then type:
> http://www.domain.com/someaction?action:someaction!somemethod to try to
> run random methods. I am hoping that if any steps are taken to prevent
> that security hole, it will still allow the flexible wildcard usage.
>
>> Instead of
>>
>> MyDispatchAction!delete
>>
>> We define an action mapping
>>
>> <action name="delete" class="example.CrudAction" method="delete">
>>
>> and call the delete acton directly, or simulate the same with wildcards.
>>
>> The URL aliases weren't more "flexible". Just lazy and unsecure.
>>
>> For the configuration-free crowd, I expect alias annotations are (or
>> will be) supported too.
>
> What would that look like? I don't know what is meant by alias
> annotations.
>
> dave
>
>
>
>> -Ted.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by David Evans <ds...@berndtgroup.net>.
On Mon, 2006-07-24 at 21:27 -0400, Ted Husted wrote:
> On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
> > I understand the security concerns, but the flexibility is far more
> > important to me. If a user wants to protect themselves, they can make
> > methods they don't want run by xwork private. Or maybe have an explicit
> > list of <param name="excludeMethods">this,that,theOther</param>.
>
> The framework is as flexible as ever. Action alaises are still
> supported. The only difference is that you can only declare the alias
> in an action mapping, or use wildcards.
I think the action:name!method idiom is perfectly flexible. I was
referring specifically to Bob's comments about securing the method names
available for calling, by using struts tags which will assign a digest
key to a map of method names. Bob said "I was hoping we'd store which
methods are OK to invoke in the session or sign them or something".
The question is, once the wildcard is set up in the struts.xml file, to
allow the above idiom, how do you prevent the calling of a method on
your action? because anyone can then type:
http://www.domain.com/someaction?action:someaction!somemethod to try to
run random methods. I am hoping that if any steps are taken to prevent
that security hole, it will still allow the flexible wildcard usage.
> Instead of
>
> MyDispatchAction!delete
>
> We define an action mapping
>
> <action name="delete" class="example.CrudAction" method="delete">
>
> and call the delete acton directly, or simulate the same with wildcards.
>
> The URL aliases weren't more "flexible". Just lazy and unsecure.
>
> For the configuration-free crowd, I expect alias annotations are (or
> will be) supported too.
What would that look like? I don't know what is meant by alias
annotations.
dave
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
> I understand the security concerns, but the flexibility is far more
> important to me. If a user wants to protect themselves, they can make
> methods they don't want run by xwork private. Or maybe have an explicit
> list of <param name="excludeMethods">this,that,theOther</param>.
The framework is as flexible as ever. Action alaises are still
supported. The only difference is that you can only declare the alias
in an action mapping, or use wildcards.
Instead of
MyDispatchAction!delete
We define an action mapping
<action name="delete" class="example.CrudAction" method="delete">
and call the delete acton directly, or simulate the same with wildcards.
The URL aliases weren't more "flexible". Just lazy and unsecure.
For the configuration-free crowd, I expect alias annotations are (or
will be) supported too.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by David Evans <ds...@berndtgroup.net>.
If something like this was implemented, I'd hope that there would be a
way for those of us who use JSTL to still be able to specify method
names.
I understand the security concerns, but the flexibility is far more
important to me. If a user wants to protect themselves, they can make
methods they don't want run by xwork private. Or maybe have an explicit
list of <param name="excludeMethods">this,that,theOther</param>.
my .5 cents.
dave
On Mon, 2006-07-24 at 16:23 -0700, Bob Lee wrote:
> I agree it's a security concern, and it still is if the developer uses a
> path pattern, except in the latter case, it's harder for us to secure.
>
> I was hoping we'd store which methods are OK to invoke in the session or
> sign them or something. For example, we could have tags like this:
>
> <s:link action="Foo" method="bar">...</s:link>
>
> <s:submit method="tee">Update</s:submit>
>
> Now the user doesn't have to worry about the extension used for actions and
> we can secure it. For example, we might generate a URL like this for the
> first link:
>
> Foo!123424587425.action
>
> where "123424587425" is the key to the method name in the session. Or:
>
> Foo!bar-2455464566.action
>
> Where "2455464566" is the digest of "Foo!bar" with a private key.
>
> Bob
>
> On 7/24/06, Don Brown <mr...@twdata.org> wrote:
> >
> > The problem is that prefix allows anyone to specify the method to be
> > called on
> > the action through the URL, any URL. I'd argue it is a security concern,
> > so the
> > developer should have to work at explicitly allowing a method to be
> > arbitrarily
> > called.
> >
> > Don
> >
> > Bob Lee wrote:
> > > I think "method:foo" might still make sense. It's orthogonal to path
> > > mappings. Maybe.
> > >
> > > Bob
> > >
> > > On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
> > >>
> > >> On Mon, 2006-07-24 at 15:15 -0700, Don Brown wrote:
> > >> > David Evans wrote:
> > >> > > I was looking in DefaultActionMapper and am wondering about the
> > >> > > compatibilityMode switch functionality. In getMapping
> > >> compatibilityMode
> > >> > > is used to see whether to check for the ! method idiom. I assume
> > this
> > >> is
> > >> > > because it will eventually be removed because wildcard mappings
> > make
> > >> it
> > >> > > redundant. But in the constructor, the PrefixTrie that's being set
> > up
> > >> is
> > >> > > also checking the compatibilityMode switch to see if it should add
> > a
> > >> > > node for the "method:" prefix. Should that be there? Is there
> > someway
> > >> in
> > >> > > which you can use wildcards in your mapping in order to replace the
> > >> > > parameter prefix? So that the button the user clicks will determine
> > >> > > which method is run?
> > >> >
> > >> > The problem we are addressing is the ability to explicitly specify
> > the
> > >> method to
> > >> > be invoked from the URL. Instead, users should use wildcards where
> > >> this
> > >> > functionality is necessary. To replace the method: prefix, you would
> > >> instead
> > >> > use "action:foo!input", then use a wildcard in your "foo" action
> > >> name to
> > >> support
> > >> > the method call. In this way, the developer has to specifically
> > allow
> > >> this,
> > >> > rather than the framework keeping that door (hole?) open.
> > >> >
> > >>
> > >> I see, sorry, the action:foo!input thing didn't occur to me. Looking
> > now
> > >> in the webwork 2.2.2 source i see it's always been that way.
> > >>
> > >> dave
> > >>
> > >>
> > >> > Don
> > >> >
> > >> > >
> > >> > > dave
> > >> > >
> > >> > >
> > >> > >> But, if no one is interested in working on the new API now, it
> > >> should
> > >> > >> not be framed as an impediment to a stable Struts 2.0 release. We
> > >> > >> should judge each distribution on terms of what we have done, not
> > on
> > >> > >> what we would like to do.
> > >> > >>
> > >> > >> -Ted.
> > >> > >>
> > >> > >>
> > >> > >> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
> > >> > >>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
> > >> > >>>> -1 on changing the versioning scheme.
> > >> > >>>>
> > >> > >>>> But, I would be open to something like
> > >> > >>>>
> > >> > >>>> * Struts 2.0 == "WebWork transtional release"
> > >> > >>>> * Struts 2.1 == "new API release"
> > >> > >>>> * Struts 3.x == "phase 2 - the best of breed release"
> > >> > >>> ...with pointers on what to consider if users should upgrade or
> > >> not,
> > >> > >>> and a clear explanation of what to expect in the near
> > future. This
> > >> > >>> could address Tim's initial concern (which I think is valid):
> > >> > >>>
> > >> > >>> "Users who don't keep completely up to date with the latest
> > goings
> > >> on will see
> > >> > >>> this as the latest and greatest and start migrating to it, only
> > to
> > >> > >>> have a very rude surprise when large changes occur in 2.1, or a
> > 3.0
> > >> > >>> arrives months later."
> > >> > >>>
> > >> > >>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
> > >> > >>> communicated on the front page, on a simple table. This would be
> > >> > >>> similar to how Tomcat explains why they have three
> > versions. Very
> > >> > >>> straightforward and easy to digest.
> > >> > >>>
> > >> > >>> Hubert
> > >> > >>>
> > >> > >>>
> > >> > >>>> IMHO, all the users, including ourselves, are served best when
> > we
> > >> > >>>> release early and release often.
> > >> > >>>>
> > >> > >>>> -Ted.
> > >> > >>>
> > >> ---------------------------------------------------------------------
> > >> > >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > >> > >>> For additional commands, e-mail: dev-help@struts.apache.org
> > >> > >>>
> > >> > >>>
> > >> > >>
> > >> > >
> > >> > >
> > >> > >
> > ---------------------------------------------------------------------
> > >> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > >> > > For additional commands, e-mail: dev-help@struts.apache.org
> > >> > >
> > >> > >
> > >> >
> > >> >
> > >> > ---------------------------------------------------------------------
> > >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > >> > For additional commands, e-mail: dev-help@struts.apache.org
> > >> >
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > >> For additional commands, e-mail: dev-help@struts.apache.org
> > >>
> > >>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Bob Lee <cr...@crazybob.org>.
I agree it's a security concern, and it still is if the developer uses a
path pattern, except in the latter case, it's harder for us to secure.
I was hoping we'd store which methods are OK to invoke in the session or
sign them or something. For example, we could have tags like this:
<s:link action="Foo" method="bar">...</s:link>
<s:submit method="tee">Update</s:submit>
Now the user doesn't have to worry about the extension used for actions and
we can secure it. For example, we might generate a URL like this for the
first link:
Foo!123424587425.action
where "123424587425" is the key to the method name in the session. Or:
Foo!bar-2455464566.action
Where "2455464566" is the digest of "Foo!bar" with a private key.
Bob
On 7/24/06, Don Brown <mr...@twdata.org> wrote:
>
> The problem is that prefix allows anyone to specify the method to be
> called on
> the action through the URL, any URL. I'd argue it is a security concern,
> so the
> developer should have to work at explicitly allowing a method to be
> arbitrarily
> called.
>
> Don
>
> Bob Lee wrote:
> > I think "method:foo" might still make sense. It's orthogonal to path
> > mappings. Maybe.
> >
> > Bob
> >
> > On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
> >>
> >> On Mon, 2006-07-24 at 15:15 -0700, Don Brown wrote:
> >> > David Evans wrote:
> >> > > I was looking in DefaultActionMapper and am wondering about the
> >> > > compatibilityMode switch functionality. In getMapping
> >> compatibilityMode
> >> > > is used to see whether to check for the ! method idiom. I assume
> this
> >> is
> >> > > because it will eventually be removed because wildcard mappings
> make
> >> it
> >> > > redundant. But in the constructor, the PrefixTrie that's being set
> up
> >> is
> >> > > also checking the compatibilityMode switch to see if it should add
> a
> >> > > node for the "method:" prefix. Should that be there? Is there
> someway
> >> in
> >> > > which you can use wildcards in your mapping in order to replace the
> >> > > parameter prefix? So that the button the user clicks will determine
> >> > > which method is run?
> >> >
> >> > The problem we are addressing is the ability to explicitly specify
> the
> >> method to
> >> > be invoked from the URL. Instead, users should use wildcards where
> >> this
> >> > functionality is necessary. To replace the method: prefix, you would
> >> instead
> >> > use "action:foo!input", then use a wildcard in your "foo" action
> >> name to
> >> support
> >> > the method call. In this way, the developer has to specifically
> allow
> >> this,
> >> > rather than the framework keeping that door (hole?) open.
> >> >
> >>
> >> I see, sorry, the action:foo!input thing didn't occur to me. Looking
> now
> >> in the webwork 2.2.2 source i see it's always been that way.
> >>
> >> dave
> >>
> >>
> >> > Don
> >> >
> >> > >
> >> > > dave
> >> > >
> >> > >
> >> > >> But, if no one is interested in working on the new API now, it
> >> should
> >> > >> not be framed as an impediment to a stable Struts 2.0 release. We
> >> > >> should judge each distribution on terms of what we have done, not
> on
> >> > >> what we would like to do.
> >> > >>
> >> > >> -Ted.
> >> > >>
> >> > >>
> >> > >> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
> >> > >>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
> >> > >>>> -1 on changing the versioning scheme.
> >> > >>>>
> >> > >>>> But, I would be open to something like
> >> > >>>>
> >> > >>>> * Struts 2.0 == "WebWork transtional release"
> >> > >>>> * Struts 2.1 == "new API release"
> >> > >>>> * Struts 3.x == "phase 2 - the best of breed release"
> >> > >>> ...with pointers on what to consider if users should upgrade or
> >> not,
> >> > >>> and a clear explanation of what to expect in the near
> future. This
> >> > >>> could address Tim's initial concern (which I think is valid):
> >> > >>>
> >> > >>> "Users who don't keep completely up to date with the latest
> goings
> >> on will see
> >> > >>> this as the latest and greatest and start migrating to it, only
> to
> >> > >>> have a very rude surprise when large changes occur in 2.1, or a
> 3.0
> >> > >>> arrives months later."
> >> > >>>
> >> > >>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
> >> > >>> communicated on the front page, on a simple table. This would be
> >> > >>> similar to how Tomcat explains why they have three
> versions. Very
> >> > >>> straightforward and easy to digest.
> >> > >>>
> >> > >>> Hubert
> >> > >>>
> >> > >>>
> >> > >>>> IMHO, all the users, including ourselves, are served best when
> we
> >> > >>>> release early and release often.
> >> > >>>>
> >> > >>>> -Ted.
> >> > >>>
> >> ---------------------------------------------------------------------
> >> > >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> > >>> For additional commands, e-mail: dev-help@struts.apache.org
> >> > >>>
> >> > >>>
> >> > >>
> >> > >
> >> > >
> >> > >
> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> > > For additional commands, e-mail: dev-help@struts.apache.org
> >> > >
> >> > >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: dev-help@struts.apache.org
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: DefaultActionMapper compatablity switch
Posted by Ted Husted <hu...@apache.org>.
On 7/24/06, Frank W. Zammetti <fz...@omnytex.com> wrote:
> Potentially simple solution: a config switch to turn this functionality
> on (the ability to specify method in the URL). It'd be off by default.
> That way everyone can be happy... security "hole" closed, but easy to
> activate for those who want it.
Yes, we have a webwork switch that controls the alias behavior, and
potentially others.
* http://www.twdata.org/backups/WW/release-notes-200.html#ReleaseNotes2.0.0-Newpropertysettings
I don't think we need to finely grade the switch.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Potentially simple solution: a config switch to turn this functionality
on (the ability to specify method in the URL). It'd be off by default.
That way everyone can be happy... security "hole" closed, but easy to
activate for those who want it.
Frank
Don Brown wrote:
> The problem is that prefix allows anyone to specify the method to be
> called on the action through the URL, any URL. I'd argue it is a
> security concern, so the developer should have to work at explicitly
> allowing a method to be arbitrarily called.
>
> Don
>
> Bob Lee wrote:
>> I think "method:foo" might still make sense. It's orthogonal to path
>> mappings. Maybe.
>>
>> Bob
>>
>> On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
>>>
>>> On Mon, 2006-07-24 at 15:15 -0700, Don Brown wrote:
>>> > David Evans wrote:
>>> > > I was looking in DefaultActionMapper and am wondering about the
>>> > > compatibilityMode switch functionality. In getMapping
>>> compatibilityMode
>>> > > is used to see whether to check for the ! method idiom. I assume
>>> this
>>> is
>>> > > because it will eventually be removed because wildcard mappings make
>>> it
>>> > > redundant. But in the constructor, the PrefixTrie that's being
>>> set up
>>> is
>>> > > also checking the compatibilityMode switch to see if it should add a
>>> > > node for the "method:" prefix. Should that be there? Is there
>>> someway
>>> in
>>> > > which you can use wildcards in your mapping in order to replace the
>>> > > parameter prefix? So that the button the user clicks will determine
>>> > > which method is run?
>>> >
>>> > The problem we are addressing is the ability to explicitly specify the
>>> method to
>>> > be invoked from the URL. Instead, users should use wildcards where
>>> this
>>> > functionality is necessary. To replace the method: prefix, you would
>>> instead
>>> > use "action:foo!input", then use a wildcard in your "foo" action
>>> name to
>>> support
>>> > the method call. In this way, the developer has to specifically allow
>>> this,
>>> > rather than the framework keeping that door (hole?) open.
>>> >
>>>
>>> I see, sorry, the action:foo!input thing didn't occur to me. Looking now
>>> in the webwork 2.2.2 source i see it's always been that way.
>>>
>>> dave
>>>
>>>
>>> > Don
>>> >
>>> > >
>>> > > dave
>>> > >
>>> > >
>>> > >> But, if no one is interested in working on the new API now, it
>>> should
>>> > >> not be framed as an impediment to a stable Struts 2.0 release. We
>>> > >> should judge each distribution on terms of what we have done,
>>> not on
>>> > >> what we would like to do.
>>> > >>
>>> > >> -Ted.
>>> > >>
>>> > >>
>>> > >> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
>>> > >>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
>>> > >>>> -1 on changing the versioning scheme.
>>> > >>>>
>>> > >>>> But, I would be open to something like
>>> > >>>>
>>> > >>>> * Struts 2.0 == "WebWork transtional release"
>>> > >>>> * Struts 2.1 == "new API release"
>>> > >>>> * Struts 3.x == "phase 2 - the best of breed release"
>>> > >>> ...with pointers on what to consider if users should upgrade or
>>> not,
>>> > >>> and a clear explanation of what to expect in the near future.
>>> This
>>> > >>> could address Tim's initial concern (which I think is valid):
>>> > >>>
>>> > >>> "Users who don't keep completely up to date with the latest goings
>>> on will see
>>> > >>> this as the latest and greatest and start migrating to it, only to
>>> > >>> have a very rude surprise when large changes occur in 2.1, or a
>>> 3.0
>>> > >>> arrives months later."
>>> > >>>
>>> > >>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
>>> > >>> communicated on the front page, on a simple table. This would be
>>> > >>> similar to how Tomcat explains why they have three versions. Very
>>> > >>> straightforward and easy to digest.
>>> > >>>
>>> > >>> Hubert
>>> > >>>
>>> > >>>
>>> > >>>> IMHO, all the users, including ourselves, are served best when we
>>> > >>>> release early and release often.
>>> > >>>>
>>> > >>>> -Ted.
>>> > >>>
>>> ---------------------------------------------------------------------
>>> > >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> > >>> For additional commands, e-mail: dev-help@struts.apache.org
>>> > >>>
>>> > >>>
>>> > >>
>>> > >
>>> > >
>>> > >
>>> ---------------------------------------------------------------------
>>> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> > > For additional commands, e-mail: dev-help@struts.apache.org
>>> > >
>>> > >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> > For additional commands, e-mail: dev-help@struts.apache.org
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch
Posted by Don Brown <mr...@twdata.org>.
The problem is that prefix allows anyone to specify the method to be called on
the action through the URL, any URL. I'd argue it is a security concern, so the
developer should have to work at explicitly allowing a method to be arbitrarily
called.
Don
Bob Lee wrote:
> I think "method:foo" might still make sense. It's orthogonal to path
> mappings. Maybe.
>
> Bob
>
> On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
>>
>> On Mon, 2006-07-24 at 15:15 -0700, Don Brown wrote:
>> > David Evans wrote:
>> > > I was looking in DefaultActionMapper and am wondering about the
>> > > compatibilityMode switch functionality. In getMapping
>> compatibilityMode
>> > > is used to see whether to check for the ! method idiom. I assume this
>> is
>> > > because it will eventually be removed because wildcard mappings make
>> it
>> > > redundant. But in the constructor, the PrefixTrie that's being set up
>> is
>> > > also checking the compatibilityMode switch to see if it should add a
>> > > node for the "method:" prefix. Should that be there? Is there someway
>> in
>> > > which you can use wildcards in your mapping in order to replace the
>> > > parameter prefix? So that the button the user clicks will determine
>> > > which method is run?
>> >
>> > The problem we are addressing is the ability to explicitly specify the
>> method to
>> > be invoked from the URL. Instead, users should use wildcards where
>> this
>> > functionality is necessary. To replace the method: prefix, you would
>> instead
>> > use "action:foo!input", then use a wildcard in your "foo" action
>> name to
>> support
>> > the method call. In this way, the developer has to specifically allow
>> this,
>> > rather than the framework keeping that door (hole?) open.
>> >
>>
>> I see, sorry, the action:foo!input thing didn't occur to me. Looking now
>> in the webwork 2.2.2 source i see it's always been that way.
>>
>> dave
>>
>>
>> > Don
>> >
>> > >
>> > > dave
>> > >
>> > >
>> > >> But, if no one is interested in working on the new API now, it
>> should
>> > >> not be framed as an impediment to a stable Struts 2.0 release. We
>> > >> should judge each distribution on terms of what we have done, not on
>> > >> what we would like to do.
>> > >>
>> > >> -Ted.
>> > >>
>> > >>
>> > >> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
>> > >>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
>> > >>>> -1 on changing the versioning scheme.
>> > >>>>
>> > >>>> But, I would be open to something like
>> > >>>>
>> > >>>> * Struts 2.0 == "WebWork transtional release"
>> > >>>> * Struts 2.1 == "new API release"
>> > >>>> * Struts 3.x == "phase 2 - the best of breed release"
>> > >>> ...with pointers on what to consider if users should upgrade or
>> not,
>> > >>> and a clear explanation of what to expect in the near future. This
>> > >>> could address Tim's initial concern (which I think is valid):
>> > >>>
>> > >>> "Users who don't keep completely up to date with the latest goings
>> on will see
>> > >>> this as the latest and greatest and start migrating to it, only to
>> > >>> have a very rude surprise when large changes occur in 2.1, or a 3.0
>> > >>> arrives months later."
>> > >>>
>> > >>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
>> > >>> communicated on the front page, on a simple table. This would be
>> > >>> similar to how Tomcat explains why they have three versions. Very
>> > >>> straightforward and easy to digest.
>> > >>>
>> > >>> Hubert
>> > >>>
>> > >>>
>> > >>>> IMHO, all the users, including ourselves, are served best when we
>> > >>>> release early and release often.
>> > >>>>
>> > >>>> -Ted.
>> > >>>
>> ---------------------------------------------------------------------
>> > >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > >>> For additional commands, e-mail: dev-help@struts.apache.org
>> > >>>
>> > >>>
>> > >>
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > > For additional commands, e-mail: dev-help@struts.apache.org
>> > >
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: dev-help@struts.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: DefaultActionMapper compatablity switch [was: Re: [s2] Roadmap (was Tag it and Roll it?)]
Posted by Bob Lee <cr...@crazybob.org>.
I think "method:foo" might still make sense. It's orthogonal to path
mappings. Maybe.
Bob
On 7/24/06, David Evans <ds...@berndtgroup.net> wrote:
>
> On Mon, 2006-07-24 at 15:15 -0700, Don Brown wrote:
> > David Evans wrote:
> > > I was looking in DefaultActionMapper and am wondering about the
> > > compatibilityMode switch functionality. In getMapping
> compatibilityMode
> > > is used to see whether to check for the ! method idiom. I assume this
> is
> > > because it will eventually be removed because wildcard mappings make
> it
> > > redundant. But in the constructor, the PrefixTrie that's being set up
> is
> > > also checking the compatibilityMode switch to see if it should add a
> > > node for the "method:" prefix. Should that be there? Is there someway
> in
> > > which you can use wildcards in your mapping in order to replace the
> > > parameter prefix? So that the button the user clicks will determine
> > > which method is run?
> >
> > The problem we are addressing is the ability to explicitly specify the
> method to
> > be invoked from the URL. Instead, users should use wildcards where this
> > functionality is necessary. To replace the method: prefix, you would
> instead
> > use "action:foo!input", then use a wildcard in your "foo" action name to
> support
> > the method call. In this way, the developer has to specifically allow
> this,
> > rather than the framework keeping that door (hole?) open.
> >
>
> I see, sorry, the action:foo!input thing didn't occur to me. Looking now
> in the webwork 2.2.2 source i see it's always been that way.
>
> dave
>
>
> > Don
> >
> > >
> > > dave
> > >
> > >
> > >> But, if no one is interested in working on the new API now, it should
> > >> not be framed as an impediment to a stable Struts 2.0 release. We
> > >> should judge each distribution on terms of what we have done, not on
> > >> what we would like to do.
> > >>
> > >> -Ted.
> > >>
> > >>
> > >> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
> > >>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
> > >>>> -1 on changing the versioning scheme.
> > >>>>
> > >>>> But, I would be open to something like
> > >>>>
> > >>>> * Struts 2.0 == "WebWork transtional release"
> > >>>> * Struts 2.1 == "new API release"
> > >>>> * Struts 3.x == "phase 2 - the best of breed release"
> > >>> ...with pointers on what to consider if users should upgrade or not,
> > >>> and a clear explanation of what to expect in the near future. This
> > >>> could address Tim's initial concern (which I think is valid):
> > >>>
> > >>> "Users who don't keep completely up to date with the latest goings
> on will see
> > >>> this as the latest and greatest and start migrating to it, only to
> > >>> have a very rude surprise when large changes occur in 2.1, or a 3.0
> > >>> arrives months later."
> > >>>
> > >>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
> > >>> communicated on the front page, on a simple table. This would be
> > >>> similar to how Tomcat explains why they have three versions. Very
> > >>> straightforward and easy to digest.
> > >>>
> > >>> Hubert
> > >>>
> > >>>
> > >>>> IMHO, all the users, including ourselves, are served best when we
> > >>>> release early and release often.
> > >>>>
> > >>>> -Ted.
> > >>>
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > >>> For additional commands, e-mail: dev-help@struts.apache.org
> > >>>
> > >>>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: dev-help@struts.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: DefaultActionMapper compatablity switch [was: Re: [s2] Roadmap
(was Tag it and Roll it?)]
Posted by David Evans <ds...@berndtgroup.net>.
On Mon, 2006-07-24 at 15:15 -0700, Don Brown wrote:
> David Evans wrote:
> > I was looking in DefaultActionMapper and am wondering about the
> > compatibilityMode switch functionality. In getMapping compatibilityMode
> > is used to see whether to check for the ! method idiom. I assume this is
> > because it will eventually be removed because wildcard mappings make it
> > redundant. But in the constructor, the PrefixTrie that's being set up is
> > also checking the compatibilityMode switch to see if it should add a
> > node for the "method:" prefix. Should that be there? Is there someway in
> > which you can use wildcards in your mapping in order to replace the
> > parameter prefix? So that the button the user clicks will determine
> > which method is run?
>
> The problem we are addressing is the ability to explicitly specify the method to
> be invoked from the URL. Instead, users should use wildcards where this
> functionality is necessary. To replace the method: prefix, you would instead
> use "action:foo!input", then use a wildcard in your "foo" action name to support
> the method call. In this way, the developer has to specifically allow this,
> rather than the framework keeping that door (hole?) open.
>
I see, sorry, the action:foo!input thing didn't occur to me. Looking now
in the webwork 2.2.2 source i see it's always been that way.
dave
> Don
>
> >
> > dave
> >
> >
> >> But, if no one is interested in working on the new API now, it should
> >> not be framed as an impediment to a stable Struts 2.0 release. We
> >> should judge each distribution on terms of what we have done, not on
> >> what we would like to do.
> >>
> >> -Ted.
> >>
> >>
> >> On 7/24/06, Hubert Rabago <hr...@gmail.com> wrote:
> >>> On 7/24/06, Ted Husted <hu...@apache.org> wrote:
> >>>> -1 on changing the versioning scheme.
> >>>>
> >>>> But, I would be open to something like
> >>>>
> >>>> * Struts 2.0 == "WebWork transtional release"
> >>>> * Struts 2.1 == "new API release"
> >>>> * Struts 3.x == "phase 2 - the best of breed release"
> >>> ...with pointers on what to consider if users should upgrade or not,
> >>> and a clear explanation of what to expect in the near future. This
> >>> could address Tim's initial concern (which I think is valid):
> >>>
> >>> "Users who don't keep completely up to date with the latest goings on will see
> >>> this as the latest and greatest and start migrating to it, only to
> >>> have a very rude surprise when large changes occur in 2.1, or a 3.0
> >>> arrives months later."
> >>>
> >>> Those three lines above, listing 2.0, 2.1 and 3.x, could be
> >>> communicated on the front page, on a simple table. This would be
> >>> similar to how Tomcat explains why they have three versions. Very
> >>> straightforward and easy to digest.
> >>>
> >>> Hubert
> >>>
> >>>
> >>>> IMHO, all the users, including ourselves, are served best when we
> >>>> release early and release often.
> >>>>
> >>>> -Ted.
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: dev-help@struts.apache.org
> >>>
> >>>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org