I am not sure I follow you here. I am using both together (convention
+ REST modified to depend on convention), my action:

package actions;

public class OrdersController extends ActionSupport {
    public String show() {
        message = "Hello World!";
        return SUCCESS;
    }
}

(in the actions package so it is picked up by convention), with a jsp
page under (result)

/WEB-INF/content/orders.jsp

and I am using this url:

http://localhost:8080/struts2-blank2/orders/10

Some small mods were needed to make convention usable from REST.

musachy

On Fri, May 16, 2008 at 2:21 AM, Jeromy Evans
<[EMAIL PROTECTED]> wrote:
> I wouldn't rush into this decision.
>
> Users of the REST plugin require @Namespace, @Result, etc annotations.
>  Creating a duplicate set of annotations with the same purpose is not
> sensible.
>
> It's appropriate that the REST plugin has a dependency on the plugin that
> auto-populates the Configuration, despite the contrary statement on the
> plugins page.
> Merging the REST plugin with Convention is also not possible as the
> implementation of ActionInvocation and ActionMapper are entirely different
> (the conventions cannot currently be mixed).
>
> There are several issues here:
>  - creating a Configuration (via XML, via Annotation)
>  - ActionMapping (no problems here, each plugin sets up their own)
>  - ActionInvocation (standard or RESTful; they are incompatible)
>  - handling unknowns
>
> One situation could be that Configuration is separate from Convention; so
> the developer can choose how the Configuration is setup and then choose
> which mapping & invocation, and unknown handling approach to use. However
> that would require another refactoring.
>
> I think making REST dependent on the Convention plugin is the way to go,
> such that the Configuration is created by Convention (but customized for
> REST *Controller class) and extended with the REST ActionMapper and
> RestActionInvocation.
>
> Musachy Barroso wrote:
>>
>> Because it extends the code behind it also does what code behind does.
>>
>> musachy
>>
>> On Thu, May 15, 2008 at 9:30 PM, Bob Tiernay <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I too would like to commend Musachy for timely and concentrated effort
>>> with
>>> regards to this plugin :)
>>>
>>> Are there any objections to merging these plugins?  Does the REST plugin
>>> embody a set of conventions on urls alone, or does it go deeper than
>>> that?
>>>
>>> --------------------------------------------------
>>> From: "Musachy Barroso" <[EMAIL PROTECTED]>
>>> Sent: Thursday, May 15, 2008 7:48 PM
>>> To: "Struts Developers List" <dev@struts.apache.org>
>>> Subject: Re: [VOTE] Bring Convention plugin into trunk and deprecate Zero
>>> Config
>>>
>>>
>>>>
>>>> Indeed :). I don't see why we shouldn't.
>>>>
>>>> musachy
>>>>
>>>> On Thu, May 15, 2008 at 5:37 PM, Paul Benedict <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>>>
>>>>> It appears you're making the argument for combining these plugins. :-)
>>>>> +1
>>>>> to
>>>>> that.
>>>>>
>>>>> Paul
>>>>>
>>>>> On Thu, May 15, 2008 at 4:20 PM, Musachy Barroso <[EMAIL PROTECTED]>
>>>>> wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> Looking at the rest plugin, something doesn't feel right. Doesn't the
>>>>>> dependency between REST and Codebehind looks wrong?  From
>>>>>> http://struts.apache.org/2.x/docs/plugins.html
>>>>>>
>>>>>> "Plugins are not loaded in any particular order. Plugins should not
>>>>>> have dependencies on each other. A plugin may depend on classes
>>>>>> provided by Struts Core, but it should not depend on classes loaded by
>>>>>> another plugin."
>>>>>>
>>>>>> musachy
>>>>>>
>>>>>> On Wed, May 14, 2008 at 2:43 AM, Don Brown <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>>>
>>>>>>> Has any work been done to support existing zero config applications
>>>>>>> with this new plugin?  If not, I'd kinda consider that a blocker (-1)
>>>>>>> because a sufficiently flexible configuration system should be able
>>>>>>> to
>>>>>>> support multiple conventions.  Also, someone will have to sign up to
>>>>>>> convert the REST plugin, which currently depends on the codebehind
>>>>>>> plugin.
>>>>>>>
>>>>>>> If backwards-compatibility and REST plugin migration are resolved,
>>>>>>> I'd
>>>>>>>
>>>>>>
>>>>>> vote +0
>>>>>>
>>>>>>>
>>>>>>> Don
>>>>>>>
>>>>>>> On Wed, May 14, 2008 at 1:39 PM, Musachy Barroso <[EMAIL PROTECTED]>
>>>>>>>
>>>>>>
>>>>>> wrote:
>>>>>>
>>>>>>>>
>>>>>>>> With the addition of @IntereceptorRefs to the Convention plugin, it
>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> is
>>>>>>>>>>
>>>>>>>>
>>>>>>>>  now possible to do most of the action mapping using annotations. >>
>>>>>>>> Also
>>>>>>>>  having 2 plugins to do the same thing is really confusing for
>>>>>>>> users,
>>>>>>>>  so we should deprecate Zero Config (good thing is that it was
>>>>>>>> always
>>>>>>>>  "experimental").
>>>>>>>>
>>>>>>>>  If you have had a chance to look at the Convention plugin, please
>>>>>>>> >>
>>>>>>>> vote:
>>>>>>>>
>>>>>>>>  [+1] Move the Convention plugin to trunk and deprecate Zero
>>>>>>>>
>>>>>>
>>>>>> Configuration plugin
>>>>>>
>>>>>>>>
>>>>>>>>  [-1] Leave it in sandbox. (reasons?)
>>>>>>>>
>>>>>>>>
>>>>>>>>  regards
>>>>>>>>  musachy
>>>>>>>>  --
>>>>>>>>  "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>>>>>>
>>>>>>>>               >
>>>>>>>>
>>>>>>>>  ---------------------------------------------------------------------
>>>>>>>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> --
>>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to