• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom 404 and 500 error pages in was 6.0

 
nancy cochran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I configure the WAS server to use custom 404 and 500 error pages for web applications? The associated Apache server is configured to use these pages and it is working. How do I get the WAS server to use these pages when an error occurs in a WAS deployed web application?

Or is this even possible? Does the error monitoring have to be done within the application itself?

Thanks in advance for responses.
 
Brian Hennessy
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I generally do this within the application itself. If you double click on the web.xml file in WebSphere Sudio there is a tab option to Pages , in here there is an error pages section and you can map HTTP response codes to customized error pages in your app.
 
nancy cochran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response. I think that is what I will end up doing. Probably I'll have my error pages redirect to external server level generic error pages. I'll have to play a little. Thanks for the suggestion.
 
Jos Cenens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I show custom error pages via the HTTP Apache 6 server (httpd.conf) file. It works as far that a page can't be found (error 404) or the application server itself is down (error 500). But when I have to deploy (update) an application in websphere and I stop the running application then is gives a default error 404 page. How do I have the configure the application server when a application is stopped to show my custom error page and not the default error page?

greetings Jos
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jos,
Welcome to JavaRanch!

By definition, you can't do anything within your application to show a message when the application is down. Instead, you have to do something on the web server.
 
Jos Cenens
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

on the web server (HTTP Apache) I configured the httpd.conf file and it works, but not when I stopped the appliction in WebSphere. Do you have more information about the settings I have to for see? I work with a plugin-cfg.xml so when the application server itself is not down and the application is stopped, I get a default error page 404, instead off my Custom error page. Then the internet users have to wait the time I need to install or update the application. In IIS it is very simple, maybe it is also simple in Apache but I can�t find it (Googeled a lot). If you can help me, I thank you.

Kind regards
Jos
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jos,
Unfortunately, I can't be of further help. "you have to do something on the web server" is the extent of my knowledge on this. The nice technical word being "something" . I haven't actually done it.

When you do find out what to do, please post a reply to this thread to help others.
 
Rinat Matityahu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would not think it is possible to use 404 within application itself - if it's down, you'll never get there.

I am myself looking for hints on how to configure customize 404 pages on WebSphere (If possible, per app)

Cheers
 
studentForever forever
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did anyone ever figure out how to do this? I am trying to do the same thing... return my custom error message when an application within websphere is down.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic