struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Labey Sébastien <sla...@sopragroup.com>
Subject [Strust2] how does Interceptor work?
Date Tue, 26 Sep 2006 10:11:17 GMT
Hi, I'm new to Struts2 and i don't really understand how does Interceptor technique work. 
I have made my own interceptor that implements Interceptor interface. I place it in struts.xml
with my action. It's OK, before invoking my action, i go through my interceptor in the intercept()
method.
But do all interceptor classes go only through intercept() method or is there a solution to
go through another method name? My need is to go through a beforeXXX() method depending on
the name of the méthod described in struts.xml for my current navigation.
 
My second question is how to go through an interceptor after the action has been executed
but before "forwarding" to jsp? I read in documentation that my interceptor has to implements
PreResultListener interface, so i made it, but nothing appens. I dont go through the beforeResult()
method, neither the intercept() method... Is it possible to have only one interceptor for
both the beforeXXX() and the afterXXX() methods?
 
All your helps would be great. Thanks in advance
 
Sebastien
 
 
Sébastien LABEY
 
Division Immobilier
R&D IKOS
 
04.72.18.47.07
 <mailto:slabey@sopragroup.com> slabey@sopragroup.com
20, chemin du Randin - B1 - 69130 Ecully
P Avant d'imprimer, ayez une pensée pour notre environnement

*

 

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