This feature of HTML Channel controls the errors and exceptions that have not been managed by the operations.
The following standard functionality is provided:
▪ Insertion of the data associated with an exception into the toolkit trace system
▪ Reservation of the flow processor instance and context for user to restore current flow and re-submit the corrected data.
▪ User can go back to the previous flow step. Since the previous input data are still remained, user can mitigate the error data input. If the flow cannot be mitigated, the flow processor instance and context will be cleaned after the time-out of the flow.
▪ Return of a generic error page to the user with the option to return to the home page
In the server-side toolkit configuration file (btt.xml), under the HtmlClient keyed collection, the attribute errorPage is the name of a JSP that is displayed when a system exception occurs. When this page is displayed by the presentation handler, the exception itself will be saved in the request under the key name "exception" (actually the key name is saved symbolically as com.ibm.btt.cs.html.HtmlConstants.EXCEPTION). The JSP can use the JSP Context Services bean to check for errors that were detected during the data validation process. The JSP can then retrieve and manage the specific data field error.
Normally, the exceptions are caught by the UNICOM® Digital Transformation Toolkit (UDTT™) channels. UDTT channels would put these exceptions into the attributes of "request.getAttribute(HtmlConstants.EXCEPTION)". So you could get the exception object through the key word "dse_exception" which is the value of "HtmlConstants.Exception".
But in some situations when UDTT are not capable of catching some errors or exceptions, these will be thrown into the http server or web server. For this kind of exceptions, the "request.getAttribute(HtmlConstants.EXCEPTION)" will return null. It will return the error code like 404 and 500.
Process
1 Configure Web.xml. You need to add the following code to web.xml:
▪ through one internal object exception which is like the request, response object in JSP. You could use the object directly without external declaration.
3 Notice that if you want to use the exception in your code, you need to
▪ tell the web server that this JSP page is an error page by setting the "isErrorPage" with true.<%@ page isErrorPage="true" %>