$B$*@$OC$K$J$j$^$9!#(B<br>$BD9Eg$H?=$7$^$9!#(B<br><br>Action$B$G%(%i!<=hM}$r9T$C$?8e$K!"%(%i!<2hLL$rI=<($7$?$$$N$G$9$,!"(B<br>response$B$,(BDI$B$5$l$:$K(Bnull$B$K$J$C$F$$$^$9!#(B<br><br>$B:F8=J}K!$O2<5-$NDL$j$G$9!#(B<br><br>sa-struts1.0.4-sp4$B$N%A%e!<%H%j%"%kFb$N(Bweb.xml$B$K$O2<5-$NMM$K(Berror-page$B$rDI5-$7$^$7$?!#(B<br>
<br>&nbsp;&nbsp;&nbsp; &lt;error-page&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;error-code&gt;404&lt;/error-code&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;location&gt;/error.do&lt;/location&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/error-page&gt;<br>&nbsp;&nbsp;&nbsp; &lt;error-page&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;exception-type&gt;java.lang.Exception&lt;/exception-type&gt;<br>



&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;location&gt;/error.do&lt;/location&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/error-page&gt;<br><br>Action$B$O2<5-$NMM$K$7$^$7$?!#(B<br><br>package tutorial.action;<br>public class ErrorAction {<br><br>&nbsp;&nbsp;&nbsp; @Resource<br>&nbsp;&nbsp;&nbsp; protected HttpServletResponse response;<br>




<br>&nbsp;&nbsp;&nbsp; @Execute(validator = false)<br>&nbsp;&nbsp;&nbsp; public String index() {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(response);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(SingletonS2ContainerFactory.getContainer().getComponent(HttpServletResponse.class));<br>




&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return &quot;error.jsp&quot;;<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>error.jsp$B$O(Bnorole.jsp$B$r%3%T!<$7$?$@$1$N$b$N$G$9!#(B<br><br>$B$3$N>uBV$GB8:_$7$J$$(BURL$B$K%"%/%;%9$7$F$_$?$H$3$m!"(B<br>Action$B$K=hM}$OMh$k$N$G$9$,!"(Bresponse$B$,(Bnull$B$N$^$^$G$9!#(B<br>request$B$O(BDI$B$5$l$k$3$H$r3NG'$7$^$7$?!#(B<br><br>$B>e5-$N$h$&$K0lEY(BAction$B$KHt$S(Bresponse$B$r?($k;v$O2DG=$G$7$g$&$+!#(B<br>




$B2?$+@_DjJ}K!$J$I$"$j$^$7$?$i!"$465<x4j$$$^$9!#(B<br><br>$B!Z4D6-![(B<br>sa-struts1.0.4-sp4<br>tomcat 6.0.18<br><br>