Exception handling
While validating a request, if an invalid input is found,
the SCUIRequestValidationException error message
is displayed.
You can override this default behavior by adding the
scui-suppress-validation-exception context parameter with the value as TRUE in the
web.xml file located in the <INSTALL_DIR>/repository/eardata/smcfs/extn/ folder. For example:
<context-param>
<param-name>scui-suppress-validation-exception</param-name>
<param-value>TRUE</param-value>
</context-param>When you set this parameter's value as TRUE, all the validation exceptions are added to a list that can be accessed using an ArrayList as follows:
ArrayList<SCUIRequestValidationException>
SCUIWebValidationUtils.getValidaionErrorList(HttpServletRequest request)
You can also define a global exception handler. If any validation exception has not been detected and goes back to the SCUISafeRequestFilter, the request will be sent to the corresponding global error handler servlet container.
This global exception handler and the request method can be defined as context parameters in the web.xml file located in the <INSTALL_DIR>/repository/eardata/smcfs/extn/ folder. For example:
<context-param>
<param-name>scui-global-validation-exception-handler-path
</param-name>
<param-value><path_to_global_exception_handler></param-value>
</context-param>
<context-param>
<param-name><scui-global-validation-exception-handler-method>
</param-name>
<param-value>FORWARD|INCLUDE|REDIRECT</param-value>
</context-param> For applications that are
based on the Web UI framework, the application
provides /jsps/datavalidationerror.jsp as the default
exception handler.
For applications that are based on the HTML
UI framework, the application
provides /common/datavalidationerror.jsp as the
default exception handler.
The Web UI Framework has also added
a Struts Action result "DATAVALIDATIONERROR",
which would be returned in case of invalid request. You can define
this result type and the corresponding path (say /jsps/datavalidationerror.jsp)
for these struts actions.
By default, the global exception handler method is set to FORWARD.
For Sterling™ Call Center, the exception handler page used
is datavalidationerror.jsp located in
/appcommon/core/jsps/repository/eardata/appcommon/30/war. Therefore, the value for
the context-parameter scui-global-validation-exception-handler-path is set to
/appcommon/core/jsps/datavalidationerror.jsp.