Help please! I have just integrated ExceptionHandler into struts-config.xml file. It now appears to handle exceptions (because stack trace is no longer displayed in browser, when there is an error) but no error is output in JSP. My jSP (TILES) has tags for actionErrors and ActionMessages, which outputs errors/messages for other things such as validation errors, but does not work for ExceptionHandler in struts-config.xml file.
Can anyone please tell me why exceptionHandler errors are not output in my JSP(tiles) screen? Please see my source code below. Thank you. The Struts config setting: ========================= <global-exceptions> <exception handler="com.fujimitsu.cargo.exception.CargoExceptionHandler" key="global.db.sql.exception" path=".customerDef.jsp" scope="request" type="java.sql.SQLException"/> </global-exceptions> Properties file =============== global.db.sql.exception=The SQL exception below was raised: HANDLER ======= import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import org.apache.struts.config.*; import org.apache.struts.Globals; public class CargoExceptionHandler extends ExceptionHandler { public ActionForward execute( Exception ex, ExceptionConfig exConfig, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws ServletException{ ActionError error = new ActionError (exConfig.getKey (), ex.getMessage ()); ActionForward forward = mapping.getInputForward(); String property = ActionErrors.GLOBAL_MESSAGE; String scope = exConfig.getScope(); storeException (request, property, error, forward, scope); ex.printStackTrace (System.err); // should log request.setAttribute ("ex", ex); //return forward; return (new ActionForward(mapping.getInput())); //return new ActionForward(exConfig.getPath()); } } ACTION ERROR/MESSAGES in tiles... ================================= <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> <logic:messagesPresent message="false"> <TR> <TD class="error" colspan="3"> <UL> <html:messages id="error" header="errors.header" footer="errors.footer"> <LI><bean:write name="error"/></LI> </html:messages> </UL> </TD> </TR> </logic:messagesPresent> <logic:messagesPresent message="true"> <TR> <TD class="message" colspan="3"> <UL> <html:messages id="message" message="true" header="messages.header" footer="messages.footer"> <LI><bean:write name="message"/></LI> </html:messages> </UL> </TD> </TR> </logic:messagesPresent> ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]