$B@uLn$H?=$7$^$9!#(B<br>$B$*@$OC$K$J$j$^$9!#(B<br><br>Page$B%/%i%9$N(BdoXXX$B%a%=%C%I$,8F$P$l$?$H$-$K!"(BdoXXX$B%a%=%C%I$NA08e$G%"%/%;%9%m%0$r=PNO$9$k(BIntercepter$B%/%i%9$r:n@.$7$F$$$^$9!#(B<br>Page$B%/%i%9$N(Binitialize()$B%a%=%C%I$G!"<+%/%i%9$N%a%s%PJQ?t$KCM$r%;%C%H$7$F$*$-!"%"%/%;%9%m%0=PNO(BIntercepter$B$G$=$NCM$r=PNO$7$h$&$H$7$?$N$G$9$,!"(Binitialize()$B$G%;%C%H$7$?CM$,6u$N$^$^$K$J$C$F$7$^$$$^$9!#(B<br>
$B%5%s%W%k%3!<%I$NH4?h$r0J2<$K5-=R$7$^$9$,!"85!9$3$N$h$&$J$3$H$O=PMh$J$$$N$G$7$g$&$+!)(B<br><br>-------$B!J%5%s%W%k(BSTART$B!K(B-------------------<br><br>public class AaaPage {<br>&nbsp;&nbsp;&nbsp; public String beginMessage = &quot;&quot;;<br><br>&nbsp;&nbsp;&nbsp; public Class initialize() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; beginMessage = &quot;begin message&quot;;<br>
&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; public Class doXXX() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $B!D(B<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>public class AccessLogIntercepter extends AbstractIntercepter {<br>&nbsp;&nbsp;&nbsp; public Object invoke(MethodInvocation invocation) throws Throwable {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Object obj = invocation.getThis();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (obj instanceof AaaPage) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String msg = ((AaaPage)obj).beginMessage;&nbsp;&nbsp;&nbsp; //$B!!$3$3$G(B &quot;begin message&quot; $B$,<hF@=PMh$k$H4|BT$7$?$,!"6uJ8;zNs$,<hF@$5$l$k(B<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(msg);$B!!!!!!!!!!!!(B<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Object ret = invocation.proceed();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ret;<br>&nbsp;&nbsp;&nbsp; }<br>}<br>-------$B!J%5%s%W%k(BEND$B!K(B-------------------<br><br><br>$B4D6-$O0J2<$K$J$j$^$9!#(B<br>OS:WindowsXP<br>Seasar2:2.4.33<br>JDK:1.5<br><br>$B$^$?>e5-$N%=!<%9$r(BHOT Deploy$B$GF0$+$9$H!"(BIntercepter$B$N!V(Bif(obj instanceof AaaPage){$B!W$N9T$,!"=i$a$FDL$k$H$-$O!V(Bfalse$B!W$GH=CG$5$l$^$7$?!#!J(B2$B2sL\0J9_$O(Btrue$B!K(B<br>
$B$?$@$7(BCOOL Deploy$B$GF0$+$9$H!"0l2sL\$b(Btrue$B$K$J$j$^$9!#(B<br><br><br>$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br><br><br>
<br>