Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Error Page

 
Ramesh Rajaram
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could anyone tell me how to throw a Custom Error Page when the default server in WAS 3.5 is not running, instead of the usual "Internal Server Error" page.
thanks in Advance
 
Narendra Kamaraju
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way a webserver can send some custom error page when itself went down because of some problem.This can be achieved if you have another webserver installed beyond the firewall( AppServer resides within the firewall to make it more secure)to host all static HTML files.There you can configure the error page to throw the custom created error page incase if the default-server of the App Server is down.
I hope this will help.
Cheers,
Narendra.
 
Ramesh Rajaram
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Narendra,

Here I mean that my webserver (e.g IBM HTTP Server) is still running. Only my Appserver is down. In that case whether it is possible to throw some static HTML Page from the webserver.
 
meddie katongole
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the "forward" tag, something like here below
<% if ((session.getValue("CDDist_No").equals("1005") {<br /> <jsp:forward page="CDDist.jsp"/>
<% } else { <br /> <%@ include file="CDError.html" <br /> <% }<br /> I intentionally missed the closing tags %> after the opening bracket which comes after ("1005") and after else { and after "CDError.html" because if I put them there the browser interpretes it as a program and does not show what I typed.
I hope this works
Originally posted by Ramesh Rajaram:
Hi Narendra,

Here I mean that my webserver (e.g IBM HTTP Server) is still running. Only my Appserver is down. In that case whether it is possible to throw some static HTML Page from the webserver.

[This message has been edited by meddie katongole (edited August 28, 2001).]
[This message has been edited by meddie katongole (edited August 28, 2001).]
 
Ramesh Rajaram
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any jsp tag requires the appserver so that it could be compiled. But, if the appserver is down how is it compiled?
Please correct me if I am wrong.
Thanks in advance
 
Depressed Phycho
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramesh,
I believe I am having the same problem as meddie. Here is the scenario: 1. The IBM Http Web Server is up. 2. For some unexplained reason, WebSphere Application Server goes down. 3. Is there a way for the IBM Http Web Server to redirect the user to a custom error page saying, "The application server is down". Currently, I am getting a 404 -page not found error, though true, is not accurate. "404 �page not found error" should only show up when a link is broken and a page is not found, not when the Application Server goes down. Any assistance with my problem will be greatly appreciated. Thanks in Advance.
 
Arvind Shukla
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I implemented this under same scenario i.e. web server is up but application server is down. Put the following directive inside httpd.conf
ErrorDocument 500 /redirect.html
Create your custom error page, name it to redirect.html and put it under docroot, by default which is <IHS_HOME>/htdocs folder.
 
Subha Murthy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is this redirection (ErrorDocument) specific to a virtualhost? What if I have various applications which has the same virtualhost and I want one of the applications to get redirected?
Please hel me out.
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic