thanks for your reply
yes,as what you said ,I can annotate every class,annotate every
method,annotate every result,
annotation is greate,i can achive anything ,but that's too much
config,that's not like "convention".
I want to have my own convertion, no xml,no annotation, the framework does
everything for me
when some day I have to change the mapping rule, I only need to change
a little config like "struts.convention.xxx=yyy"   and won't have to chage
every annotation in every class




On Tue, Jan 20, 2009 at 10:31 PM, Musachy Barroso <musa...@gmail.com> wrote:

> you can add @Namespace("/someModule/someExampleAction") to your class,
> then annotate your method with @Action("dosomething"). I don't see why
> you wouldn't be able to achieve this with the convention plugin.
>
> musachy
>
> On Tue, Jan 20, 2009 at 4:22 AM, KuaJiang Ying <kjy...@gmail.com> wrote:
> > sorry, there is a typping error
> >
> > the method is doSomething()
> >
> > On Tue, Jan 20, 2009 at 5:17 PM, KuaJiang Ying <kjy...@gmail.com> wrote:
> >
> >> hello,i'm building a  webapp using struts2+spring+hibernate
> >>
> >> given url:
> >>
> >> http://ip:port
> /appName/someModule/someExampleAction/doSomething?id=1&otherParam=xx
> >>
> >> i want to map  to class  com.xx.yy.someModule.action.SomeExampleAction
> >>
> >> package com.xx.yy.someModule.action
> >> @Component
> >> @Scope("prototype")
> >> public class SomeExcampleAction {
> >>   public doSomething1(){
> >>     return  "sth";
> >>   }
> >>  public something2(){     return  "something2";
> >>   }
> >>  public something3(){     return  "something3";
> >>   }
> >> }
> >>
> >> and then go to jsp page :   webapproot/someModule/someExample/sth.jsp
> >>
> >> also , i don't want to write a lot configiration in struts.xml, despite
> >> using  wild-mapping , there was still to much config
> >>
> >> i read doc of Convention and REST plugin,but it seams they cann't act as
> i
> >> like
> >>
> >>
> >> how should I config struts2 and convention,rest plugin ?  or is there
> any
> >> other plugin can do it ?  or  should I write a plugin myself?
> >>
> >> thx very much
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to