?
Solved

When I Shut down my Jboss and Tomcat

Posted on 2006-05-08
8
Medium Priority
?
603 Views
Last Modified: 2007-12-19
I  want  to show default page saying that my system is under maintance when I shut my jboss and Tomcat down...

Is that possible to show somthing else in sted of this message?????  That will inform users that my pplication is under maintance and not giving them this stupid message...


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, administrator@localhost.localdomain and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.0.47 (Win32) mod_jk/1.2.5 Server at localhost Port 80


Pleaseeeeeeeee Heeeeelp





0
Comment
Question by:dm98101
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:sleep_furiously
ID: 16633593
Try adding this to httpd.conf:

 ErrorDocument   503   /mydefaultdoc.html

(Where "mydefaultdoc.html" is a file in Apache's DocumentRoot)
0
 

Author Comment

by:dm98101
ID: 16638703
gives me an error????

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, administrator@localhost.localdomain and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.0.47 (Win32) mod_jk/1.2.5 Server at localhost Port 80
0
 
LVL 27

Accepted Solution

by:
Nopius earned 2000 total points
ID: 16665238
Rewrite all uris to point to the error page when you have no PID file for Tomcat. Suppose it's a /var/run/jsvc.pid

RewriteEngine On
RewriteCond /var/run/jsvc.pid ! -f
RewriteRule ^.*$ /mydefaultdoc.html

0
 

Author Comment

by:dm98101
ID: 16698450
how to do that?????
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16705091
I have more experience with Unix, not with Windows
In windows I see one way to do this:
- create pidfile from batch file, when starting service (either jboss or tomcat). Pidfile may be the empty file, so the command lile "echo > C:\jboss.pid"  is ok.
- remove pidfile from that patch file when stopping service.
- start and stop service only from batch file

Configure your apache, edit httpd.conf file (if you don't know where is it, search your disk by the file name),
then insert that lines:

RewriteEngine On
RewriteCond C:\\jboss.pid ! -f
RewriteRule ^.*$ /mydefaultdoc.html

then restart apache.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…
Suggested Courses
Course of the Month4 days, 5 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question