I don't have a "wicket-way" for this. However, if I had to do something like 
that, I'd try the following simple and extremely basic approach (which would need to be 
refined to be more than just an ugly hack)

1. after the action triggering the upgrade process, trigger a javascript on the 
client side
2. this javascript would poll a given url (e.g. current page or application 
home or a specific bookmarkmable page, the latter being probably better)
    1. as long as the polled url does not return (within a short timeout) or 
returns an error code (depending on your setup: if the app is behind a proxy, 
you'd expect a 502/503 error as long as the app is not up)
    2. once the poll returns a non-error, the javascript would trigger the 
redirect (it could also probably trigger a modal login form on the current page 
instead)

Note that I myself feel this approach would be very hacky and is most likely 
not the best way to do it with wicket, but this should at least work for your 
purpose, and maybe give you an idea on how to do it better.

On 10/09/14 23:03, msalman wrote:
So we have this feature of online server upgrade in which the user can start
an upgrade on the server while still logged into the (wicket) web app.  This
starts some scripts in the bacground which bring the  jboss server down,
upgrade the db, upgrade the ear file, etc., and then restart the jboss
server.  When the server comes back up we would like the user to be
redirected to the login page of the app automatically.  The last part does
not work.  At this time we just have a message telling the user to refresh
the page and when everything is ready he will be sent to the login page.

Is there a good robust way to make sure that the page is automatically
refreshed and the login page is presented?  Is it even possible to do it?
Personally I don't think this is not a good idea but this feature is a
requirement and I want to explore it as much as possible.


Appreciate any help.

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Reply via email to