Forum Stats

  • 3,853,784 Users
  • 2,264,268 Discussions
  • 7,905,444 Comments

Discussions

Communication between a web app and a desktop app

843810
843810 Member Posts: 46,938
edited Aug 9, 2010 1:27AM in Java Desktop Applications
Hi,
I would like to know how i can make a web application communicate with a desktop application (protocols,technologies, patterns�).
And if I'm using a jsp web app and a java se app?
Indeed, i have a desktop app. which use some information provided by an user via a web app,and the work performed by the desktop app cannot be performed inside a web container.

Thanks.

Comments

  • 843810
    843810 Member Posts: 46,938
    hi pattchen
    few months before i developed a desktop Java App which was communicating with ebay web application fetching the auction items informations and placing the bid.
    although there are several options available in case of ebay web application. but for any web application you can communicate via sending http request & reading response.
    the best practice for this is to use httpclient library which the product of apache Jakarta project. you are download the library and doc from the website of apache jakarta projects.
    hope it works for you.
  • 843810
    843810 Member Posts: 46,938
    Thanks iftikhar,

    And if it is the web app which should send structured data to the desktop app (like in my case), what are the options?

    Thanks again.
  • 843810
    843810 Member Posts: 46,938
    hi,

    You go for applet & servlet communication. You can develope a desktop application using Java Swing and the server application Servlet in any web container. From Swing you can pass the HTTP request as a ObjectOutputStream...


    I tested this kind of application for my project and its working fine...

    regards,
    dhaya.
  • 843810
    843810 Member Posts: 46,938
    edited Jun 14, 2007 2:54PM
    We also have a need for an application that is able to pass context from a web application to the thick -client side application, and vice versa.

    Will the proposed solution work independently of number of browsers user opened, and can the Swing app be "aware" of a browser that it should be exchanging information with (can it register it so that when user exits swing application, swing app will be able to close the web app).

    What if there is a requirement for Swing application to be able to pass information to a win32 thick client application, can Swing use/invoke windows COM API?

    Will web application need to have a special applet running in the browser in order to have this communication available (very important as one of applications that will we providing context is Siebel 7.7, which is web based)

    Message was edited by:
    Lukaman
  • 843810
    843810 Member Posts: 46,938
    We also have a need for an application that is able
    to pass context from a web application to the thick
    -client side application, and vice versa.

    Will the proposed solution work independently of
    number of browsers user opened, and can the Swing app
    be "aware" of a browser that it should be exchanging
    information with (can it register it so that when
    user exits swing application, swing app will be able
    to close the web app).

    What if there is a requirement for Swing application
    to be able to pass information to a win32 thick
    client application, can Swing use/invoke windows COM
    API?

    Will web application need to have a special applet
    running in the browser in order to have this
    communication available (very important as one of
    applications that will we providing context is Siebel
    7.7, which is web based)

    Message was edited by:
    Lukaman
    The problem with passing information from a web app (browser) to a desktop app is that there's nothing for the browser app to get hold of. Remember that the web app is running on a server somewhere. The best way to approch this problem would be to have data stores in common that both looked at.

    To invoke a COM api it would have to make native calls on a Windows box and the only thing that leaps to mind there would be JNI but I really wouldn't bank on it working.

    Best bet all the way around as I see it would be to have data in common. I did something similar a few years ago this way and it worked for our purposes.

    PS.
  • 843810
    843810 Member Posts: 46,938
    hi all

    thank you very much for ur information. can i get the link from where i can download the required documents and materials for the development of desktop application which communicate with web app.


    Thanks & Regards
    Ashutosh
  • 843810
    843810 Member Posts: 46,938
    Hi,
    I am also facing same challenges. I need to pass the outcome of web application to Java Swing application. As soon as user selects some info from web application, it should be added to the swing application.

    Any insight on this process will be appreciated.

    Regards,
    Nidhi
  • darrylburke
    darrylburke Member Posts: 18,007
    Nidarora, welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. You already have a thread for this question -- stick to it. Feel free to provide a link to an old post that may be relevant to your problem.

    I'm locking this thread now.

    db
This discussion has been closed.