Re: Simple interceptor is not called

2008-04-08 Thread Dave Newton
--- 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
 resultpages/list.jsp/result
 result name=inputpages/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]



Re: Simple interceptor is not called

2008-04-08 Thread Peter Theissen

Hi,



Are you sure it isn't?
  

yes ;-)

What happens if you return something other than SUCCESS from your action?
  

Unfortunately, exactly the same happens.

That will test whether or not it's getting the result from the intercept call
or the action itself. 
Now I returned Action.NONE and the System.out.println statement before 
still didnt work.

Are you able to see other sysout statements across the
application? (Use a logger!) 

Yes, I guess  I can see them on the common Eclipse console

Are there any startup errors in your log? 

Warnings are there:
log4j:WARN No appenders could be found for logger 
(org.springframework.util.ClassUtils).

log4j:WARN Please initialize the log4j system properly.

Is the
action configured properly in Spring?
  
I hope so. But difficult to judge for a noob. Is there any part I should 
examine

especially?

Thanks for your time and help
Peter



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



Re: Simple interceptor is not called

2008-04-08 Thread Nils-Helge Garli Hegvik
Which server are you running the application in? Are you sure you have
checked all the log files for the server? And are you sure you're
editing the struts.xml that is actually picked up at run time? I've
had some problems earlier with Eclipse not synchronizing resources
properly to the correct output build folder. If that's the case, a
project clean usually helps. And configuring log4j properly would
probably help giving some meaningful information messages.

Nils-H

On Tue, Apr 8, 2008 at 11:59 PM, Peter Theissen [EMAIL PROTECTED] wrote:
 Hi,



 
  Are you sure it isn't?
 
 
  yes ;-)


  What happens if you return something other than SUCCESS from your action?
 
 
  Unfortunately, exactly the same happens.


  That will test whether or not it's getting the result from the intercept
 call
  or the action itself.
 
  Now I returned Action.NONE and the System.out.println statement before
 still didnt work.


  Are you able to see other sysout statements across the
  application? (Use a logger!)
 
  Yes, I guess  I can see them on the common Eclipse console



  Are there any startup errors in your log?
 
  Warnings are there:
  log4j:WARN No appenders could be found for logger
 (org.springframework.util.ClassUtils).
  log4j:WARN Please initialize the log4j system properly.


  Is the
  action configured properly in Spring?
 
 
  I hope so. But difficult to judge for a noob. Is there any part I should
 examine
  especially?

  Thanks for your time and help
  Peter





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



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