• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Inform user of a short break while restarting tomcat

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

Restarting tomcat takes some time (40 - 60 seconds). I would like to give users some info page like "A short break in service" or something. Do you know how to achieve that?

regards,
mobdev
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no easy way to force a message to appear on the user's browser.

I have done something like an "emergency status message" mechanism which lets you set a message that will be displayed at the top of an HTML page, but the user won't see it unless they generate a new request so it is best to allow plenty of time.

This just involves a bit of code at the start of your doGet / doPost methods to see if an emergency message has been set.

Bill
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem with broadcasting a notification is that HTTP doesn't permit broadcasting notifications. HTTP is a request/response protocol, so the only time you can send data is if the user has just made a request for data.

About the best you can do is setup a message display on each webpage, write code to fill it in, and give plenty of advance warning before actually recycling.

Either that or use an out-of-band non-HTTP method like "spam", SMS or (where applicable) console broadcasts.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic