Error Mapping

You can customize what the client sees when an error or an exception is generated by specifying the locations of error pages for different kinds of errors. Error pages you specify here are used for servlets and for any JSP pages that do not specify an error page for the error type.

In the left column, you can specify an HTTP error code, for example 404, or a fully qualified class name of a Java exception type. In the right column, specify where to find the resource in the Web application relative to the root of the Web application. The value of the location must have a leading forward slash ( / ). For example, /404.html.

PowerBuilder adds the following elements to the target Web.xml file depending on the value in the Error column:

Table 12-7: Element added to target Web.xml file

Error column value

Element added to Web.xml file

Y

<error-code>

N

<exception-type>

If you specify an exception class in the left column rather than an HTTP error code, you must change the Error column value to N. Otherwise you may have problems deploying or running the target, depending on the JSP container to which you deploy, or try to deploy, your target.