This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Websphere and the fly likes Customised Error page in case of exception in application server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Customised Error page in case of exception in application server" Watch "Customised Error page in case of exception in application server" New topic
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: 29287
    
140

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Customised Error page in case of exception in application server
 
Similar Threads
IBM Web server how to add new user
which error 500 document will be displayed?
Problem with a new WebModule,Very Very Urgent
Web sphere server not starting
WAS 4.0 with iplanet web server