Two Laptop Bag
The moose likes JSP and the fly likes Java Web application in Online/Offline mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Java Web application in Online/Offline mode" Watch "Java Web application in Online/Offline mode" New topic

Java Web application in Online/Offline mode

nilk yeo

Joined: Jun 07, 2010
Posts: 4
I have a java web application developed using Spring MVC, Hibernate, Oracle DB.
However, now I need to make this application to work both in Offline & Online mode.

That means, user should be able to work offline and when he comes online,
there should be automatic synchroniztion between local data & the server data.

Which technolgies/approach should I follow to achieve this?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
You might try looking into Web Start - for which the ranch has a forum.

Another possibility is just a desktop application that knows how to act like a web browser - see the apache httpcomponents tools.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
If the app exists already, be prepared to spend major time re-architecting it. An offline mode is not something you can easily add after the fact. Google had a browser plugin called Google Gears that helped implement offline web apps, but its development has been halted in favor of some related technologies that are coming in HTML 5.

An alternative might be to ship a desktop app that has an embedded servlet container with the complete web app running inside it. If a network connection was available, it would get its data from the "live" database, and if no connection is available, it would work with a local copy. This would reduce the problem to a data synchronization issue, for the most part.
jQuery in Action, 3rd edition
subject: Java Web application in Online/Offline mode
jQuery in Action, 3rd edition