| Author |
Customised Error page in case of exception in application server
|
Anshul Jain
Greenhorn
Joined: May 10, 2006
Posts: 12
|
|
Hi friends, I am using WAS6.0(App server) and IHS(Web server) for my web application. I am facing one problem for showing customised error page in case of some exception occurs in application server. I have put ErrorDocument 500 in webserver (httpd.conf) which works if app server is down. But in case of exception in appserver it does not work. I have put <error-page> element in web.xml for 500 error-code and java.lang.Exception exception-type but it is still showing default page . Is there any other setting in appserver or webserver required for showing customised error page in case of exception in application server? Thanks in advance, Alok
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26183
|
|
Alok, When you say "exception in the application server", do you mean in your ear file or in the WebSphere server code itself?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Anshul Jain
Greenhorn
Joined: May 10, 2006
Posts: 12
|
|
Hi Jeanne, I am trying in case of ServletException (if my servlets doPost method throws ServletException). And if some ways is available for ServletException to show customised error page then is it applicable for other exceptions also like NullPointerException? Thanks, Alok
|
 |
Bob Good
Ranch Hand
Joined: Jan 09, 2008
Posts: 86
|
|
I have this working in WAS 6.1. Did you try updating the http plugin using the Integration Console? Environment Update global Web server plug-in configuration Can you post an snippet of your web.xml? Here is mine: <error-page> <exception-type>javax.servlet.ServletException</exception-type> <location>/error.jsp</location> </error-page> --> [ January 31, 2008: Message edited by: Bob Good ] [ January 31, 2008: Message edited by: Bob Good ]
|
 |
 |
|
|
subject: Customised Error page in case of exception in application server
|
|
|