(I found the chain result type somewhat problematic, so I avoid it every time I can.)
Having said that, if your action ONLY captures the exception, log it, email it and then forward the output to an error.jsp page, AND you are using Log4J you may find useful to attach more than one appender to the log category (one that logs it to some file, and other that emails it, see the SMTPAppender), then you could avoid the chained action execution. 2010/1/26 CRANFORD, CHRIS <chris.cranf...@setech.com>: > > Our Struts2 application has java.lang.Exception mapped to a global > result called 'error'. Our 'error' global result is setup as a CHAIN > type to send the user to our ExceptionHandlerAction. This action is > designed to capture the exception, log it, email it to an administration > mailbox and then forward the user to our error.jsp page. > > When ExceptionHandlerAction is invoked, I need to be able to find out > what the original request URI was so that it can be included in the log > and notification. Is there a way to get the chain history and get the > first action invoked? If so, could someone explain it to me? > > I had originally set our base action to implement ServletRequestAware > and set the HttpServletRequest object, but unfortunately I was getting > NullPointerExceptions with findStaticResource() method. > > Thoughts? > Chris > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org