--- Peter Theissen <[EMAIL PROTECTED]> wrote:
> doese anybody see why the following (quite simple)
> interceptor isnt called:
> BTW: list.jsp seems to be called correctly.
> 
> struts.xml
>  >>>
>     <package name="registration" extends="struts-default">
> 
>         <interceptors>
>              <interceptor name="simpleInterceptor" 
> class="quickstart.interceptor.simpleInterceptor"/>
>         </interceptors>       
>      
>         <action name="listRegistrationsWaiting" 
> class="registrationWaitingAction" method="execute">
>             <result>pages/list.jsp</result>
>             <result name="input">pages/list.jsp</result>
>             <interceptor-ref name="simpleInterceptor"/>           
>         </action>
>       ...
>     </package>
> <<<
> 
> SimpleInterceptor.java
>  >>>
> package quickstart.interceptor;
> 
> import com.opensymphony.xwork2.Action;
> import com.opensymphony.xwork2.ActionInvocation;
> import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
> 
> public class SimpleInterceptor extends AbstractInterceptor{
>    
>     public String intercept(ActionInvocation invocation) throws Exception {
>         System.out.println("The action is being intercepted!");
>         return Action.SUCCESS;
>     }
> }
> <<<
> 
> What am I missing?

Are you sure it isn't?

What happens if you return something other than SUCCESS from your action?
That will test whether or not it's getting the result from the intercept call
or the action itself. Are you able to see other sysout statements across the
application? (Use a logger!) Are there any startup errors in your log? Is the
action configured properly in Spring?

Dave



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

Reply via email to