You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ryan Chichirico <ry...@buzzwire.com> on 2009/04/03 18:52:21 UTC

Mixing convention plugin and legacy action mappings

We've recently migrated to Struts 2.1.6 and started looking into the 
convention plugin.  Since our application is far along the 2.0.x way of 
doing things it's difficult to make whole sale changes immediately.  
We'd like to start introducing new features with the convention plugin 
and slowly adapt the other actions as we find time. 

Out of the box this didn't seem to work.  Has anyone tried doing this?

Our struts.properties file has the following:

struts.action.extension=action
struts.ui.templateSuffix=ftl

I've noticed that when I comment out the struts.action.extension then 
the convention plugin works fine with the new actions but all of our 
legacy *.action classes don't work.  Any tips would be greatly appreciated

-Ryan


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Mixing convention plugin and legacy action mappings

Posted by Ryan Chichirico <ry...@buzzwire.com>.
I think as I was typing a response I may have discovered the issue.  We 
had a wildcard catch all for the root namespace which was throwing 
things off.
        <action name="*" class="com.x.web.struts2.action.BaseAction">
            <result>/ftl/{1}.ftl</result>
        </action>

Once I created a stand alone package com.xm.web.struts2.test.HelloAction 
I was able to use both /test/hello and /test/hello.action

Thanks for your quick response.

-Ryan

Musachy Barroso wrote:
> Convention configuration just gets mixed with xml configuration, they
> should not conflict. What kind of problem are you having?
>
> musachy
>
> On Fri, Apr 3, 2009 at 12:52 PM, Ryan Chichirico <ry...@buzzwire.com> wrote:
>   
>> We've recently migrated to Struts 2.1.6 and started looking into the
>> convention plugin.  Since our application is far along the 2.0.x way of
>> doing things it's difficult to make whole sale changes immediately.  We'd
>> like to start introducing new features with the convention plugin and slowly
>> adapt the other actions as we find time.
>> Out of the box this didn't seem to work.  Has anyone tried doing this?
>>
>> Our struts.properties file has the following:
>>
>> struts.action.extension=action
>> struts.ui.templateSuffix=ftl
>>
>> I've noticed that when I comment out the struts.action.extension then the
>> convention plugin works fine with the new actions but all of our legacy
>> *.action classes don't work.  Any tips would be greatly appreciated
>>
>> -Ryan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>     
>
>
>
>   

-- 
Ryan Chichirico
Buzzwire, Inc.
1123 Auraria Parkway, Suite 400
Denver, CO 80202
Cell: 720.841.5931 
www.buzzwire.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Mixing convention plugin and legacy action mappings

Posted by Musachy Barroso <mu...@gmail.com>.
Convention configuration just gets mixed with xml configuration, they
should not conflict. What kind of problem are you having?

musachy

On Fri, Apr 3, 2009 at 12:52 PM, Ryan Chichirico <ry...@buzzwire.com> wrote:
> We've recently migrated to Struts 2.1.6 and started looking into the
> convention plugin.  Since our application is far along the 2.0.x way of
> doing things it's difficult to make whole sale changes immediately.  We'd
> like to start introducing new features with the convention plugin and slowly
> adapt the other actions as we find time.
> Out of the box this didn't seem to work.  Has anyone tried doing this?
>
> Our struts.properties file has the following:
>
> struts.action.extension=action
> struts.ui.templateSuffix=ftl
>
> I've noticed that when I comment out the struts.action.extension then the
> convention plugin works fine with the new actions but all of our legacy
> *.action classes don't work.  Any tips would be greatly appreciated
>
> -Ryan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org