struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: How to setup Interceptor when using struts2.1.2 rest plugin with codebehind?
Date Wed, 15 Oct 2008 16:51:03 GMT
What do you mean by "application breaks"? Could it be that codebehind is not
picking up the default interceptor (I doubt it anyway)?

musachy

On Wed, Oct 15, 2008 at 10:12 AM, Haulyn Jason <jia_haolin@yahoo.com> wrote:

> it's very simple, just as below:
>
>    <package name="newpackage" extends="struts-default"
> namespace="/newpackage">
>         <interceptors>
>            <interceptor name="paginationSupportInterceptor"
> class="cn.openmotel.lorenzo.web.struts2.PaginationSupportInterceptor" />
>            <interceptor-stack name="defaultInterceprotStack">
>                <interceptor-ref name="checkbox" />
>                <interceptor-ref name="params" />
>                <interceptor-ref name="paginationSupportInterceptor" />
>                <interceptor-ref name="defaultStack" />
>            </interceptor-stack>
>        </interceptors>
>        <default-interceptor-ref
> name="defaultInterceprotStack"></default-interceptor-ref>
>     </package>
>
>  Thanks!
>
>
> Mobile: +086-15864011231
> Website:http://www.openmotel.cn
> http://www.vvthumb.com
> GTalk:saharabear@gmail.com <GTalk%3Asaharabear@gmail.com>
> Skype:saharabear
>
>
>
>
> Haulyn Runner Jason
>
>
>
> ----- Original Message ----
> From: Musachy Barroso <musachy@gmail.com>
> To: Struts Users Mailing List <user@struts.apache.org>
> Sent: Wednesday, October 15, 2008 10:04:51 PM
> Subject: Re: How to setup Interceptor when using struts2.1.2 rest plugin
> with codebehind?
>
> Can you post the definition of your "newpackage" package?
>
> musachy
>
> On Wed, Oct 15, 2008 at 9:58 AM, Haulyn Jason <jia_haolin@yahoo.com>
> wrote:
>
> > Hi,all
> > My application is running on struts2.1.2 with rest plugin and codebehind.
> >  The code is like Struts2.1.2-rest-showcase.war. But when I want to add
> my
> > own Interceptors, something broken.
> >
> > I add a new package extends "struts-default" and re-defined the
> > interceptor-stack as below:
> >
> >        <interceptors>
> >            <interceptor name="paginationSupportInterceptor"
> > class="cn.openmotel.lorenzo.web.struts2.PaginationSupportInterceptor" />
> >            <interceptor-stack name="defaultInterceprotStack">
> >                <interceptor-ref name="checkbox" />
> >                <interceptor-ref name="params" />
> >                <interceptor-ref name="paginationSupportInterceptor" />
> >                <interceptor-ref name="defaultStack" />
> >            </interceptor-stack>
> >        </interceptors>
> >        <default-interceptor-ref
> > name="defaultInterceprotStack"></default-interceptor-ref>
> >
> > I want my OrdersController run under this package, so I add annotation
> > @ParentPackage(value="newpackage"). Then something break.
> >
> > I debug my application and found the OrdersController worked but struts2
> > can not find the result setting. But before I add
> > @ParentPackage(value="newpackage"), everything works well.
> >
> > I defind my Result as
> > @Results({
> >    @Result(name="success", type=ServletActionRedirectResult.class,
> > value="website/orders")
> > })
> >
> > I spent two days on this but it didn't work anymore. I found two
> > Interceptors in the REST plugin, did I lose something?
> >
> >  Thanks!
> >
> >
> > Mobile: +086-15864011231
> > Website:http://www.openmotel.cn
> > http://www.vvthumb.com
> > GTalk:saharabear@gmail.com <GTalk%3Asaharabear@gmail.com> <
> GTalk%3Asaharabear@gmail.com <GTalk%253Asaharabear@gmail.com>>
> > Skype:saharabear
> >
> >
> >
> >
> > Haulyn Runner Jason
> >
> >
> >
> >
>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
>
>
>
>



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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message