com.ibm.btt.cs.html
Class HtmlExceptionHandler
java.lang.Object
com.ibm.btt.cs.DefaultExceptionHandler
com.ibm.btt.cs.html.HtmlExceptionHandler
- All Implemented Interfaces:
- ExceptionHandler
public class HtmlExceptionHandler
- extends DefaultExceptionHandler
This class defines the constants represent BTT technical channels
Method Summary |
static javax.servlet.http.HttpServletRequest |
getHTTPRequest(ChannelContext context)
You can use this function to extract HttpServletRequest from a Channel Context |
static javax.servlet.http.HttpServletResponse |
getHTTPResponse(ChannelContext context)
You can use this function to extract HttpServletResponse from a Channel Context |
static void |
setErrorPage(java.lang.String errorPage)
You can use this function to set the error page when an exception occurs
for examples:
if(exception instanceof ExceptionA) setErrorPage("a.jsp")
else if (exception instanceof ExceptionB) setErrorPage("b.jsp")
Please note, the error page must exists in your web applications
In another word, the file must exists in the path defined in "HTMLClient" section, "filePath" field |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HtmlExceptionHandler
public HtmlExceptionHandler()
getHTTPRequest
public static javax.servlet.http.HttpServletRequest getHTTPRequest(ChannelContext context)
- You can use this function to extract HttpServletRequest from a Channel Context
- Parameters:
context
-
- Returns:
- HttpServletRequest
getHTTPResponse
public static javax.servlet.http.HttpServletResponse getHTTPResponse(ChannelContext context)
- You can use this function to extract HttpServletResponse from a Channel Context
- Parameters:
context
-
- Returns:
- HttpServletResponse
setErrorPage
public static void setErrorPage(java.lang.String errorPage)
throws DSEInvalidArgumentException,
DSEObjectNotFoundException
- You can use this function to set the error page when an exception occurs
for examples:
if(exception instanceof ExceptionA) setErrorPage("a.jsp")
else if (exception instanceof ExceptionB) setErrorPage("b.jsp")
Please note, the error page must exists in your web applications
In another word, the file must exists in the path defined in "HTMLClient" section, "filePath" field
- Parameters:
errorPage
-
- Throws:
DSEInvalidArgumentException
DSEObjectNotFoundException
(c) Copyright IBM Corporation 1998, 2010