Link to home
Start Free TrialLog in
Avatar of dm98101
dm98101

asked on

When I Shut down my Jboss and Tomcat

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





Avatar of sleep_furiously
sleep_furiously

Try adding this to httpd.conf:

 ErrorDocument   503   /mydefaultdoc.html

(Where "mydefaultdoc.html" is a file in Apache's DocumentRoot)
Avatar of dm98101

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dm98101

ASKER

how to do that?????
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.