![]() |
|
We can configure Error page at the following places in Pramati Server:
web.xml for the war application we are deploying. For example:
<error-page> <error-code>404</error-code> <location>/error.html<location> </error-page>where
error.html points to the page under the ContextRoot. If the 'location' tag is not having a leading slash, then it will be a relative URI, with respect to the requested page. We can have an Exception type also as a part of error pages such as:
<error-page> <exception-type>java.lang.NullPointerException<exception-type> <location>/error.html<location> </error-page>
default-web.xml (in config), where we can mention the above tags. default-web.xml is similar to web.xml, but it is like configurating for the entire app server. That is, all applications that are deployed under this node will get the defined error pages, unless they are overridden by the deployed application. Prior to 4.1 SP2, there was an error-pages tag in web-config.xml under each virtual host.
<error-pages> <error code="302" url="/error/302"/> <error code="404" url="/error/404"/> </error-pages>41 SP2 lets you configure error pages against exception types which was not possible in earlier versions. Also, we need to give the entire path including the context root. For example:
<error-pages> <error code="404" url="/ErrorPages/404.html"/> </error-pages>where
ErrorPages is the Context root.
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |