Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-28 Thread Wes Wannemacher
xnpeng, I think you are missing the point, packages have interceptor and interceptor stack definitions. Actions live inside of packages. What you need to do is move your conventions actions into your package. The interceptor ref annotation will point to the stacks you want, but it does no good if

Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
Hi, can some one help me? when i add annotation to my action,tomcat failed start. @InterceptorRefs({...@interceptorref("user"), @InterceptorRef("defaultStack")}) public class MainController extends MainAction {...} Caused by: Unable to find interceptor class referenced by ref-name user - [unkn

Re:Re: Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
Hi,musachy! things are going on. when i add a line to my Controller(Action): @InterceptorRefs({...@interceptorref("user"), @InterceptorRef("defaultStack")}) public class MainController extends MainAction {...} then some error happens: Caused by: Unable to find interceptor class referenced by

Re: Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread Musachy Barroso
that setting is telling Convention to use that package for the actions it will create, and its default interceptor stack will be applied to those actions. You need to make it point to your own package, which defines a default interceptor stack with your interceptor. Either that, or use @Interceptor

Re:Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
hi,Musachy : I have a line defined in config file: do you mean change to otherwise? 在2009-05-28,"Musachy Barroso" 写道: >also, change this: > >value="rest-default"/> > >and make it point to your interceptor stack, otherwise your >interceptor won't be used, unless you use the @InterceptorRe

Re:Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
Dave, I've tried set the config file to extends struts-default,also i've set in my packages,it still refuse to work.

Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread Musachy Barroso
also, change this: and make it point to your interceptor stack, otherwise your interceptor won't be used, unless you use the @InterceptorRef annotation. musachy On Wed, May 27, 2009 at 9:31 PM, Dave Newton wrote: > You're setting the default parent package to rest-default, which doesn't > inc

Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread Dave Newton
You're setting the default parent package to rest-default, which doesn't include your interceptor--have you tried setting it to the package with your interceptor in it? Dave xnpeng wrote: Hi, when i use rest-plugin with convention plugin in struts2.1.6, i cannot setup my interceptor. the follow

How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
Hi, when i use rest-plugin with convention plugin in struts2.1.6, i cannot setup my interceptor. the following is my interceptor and config file. i cannot see the println result on console. can anyone help? thank you! public class SimpleInterceptor extends AbstractInterceptor { public Str