Communication between a web app and a desktop app

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.

[399 byte] By [pattchena] at [2007-11-27 5:18:04]
# 1

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.

iftikhar-4w-programmer-J2EEa at 2007-7-12 10:41:04 > top of Java-index,Desktop,Developing for the Desktop...
# 2
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.
pattchena at 2007-7-12 10:41:04 > top of Java-index,Desktop,Developing for the Desktop...
# 3

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.

dhayasinfo@yahoo.co.ina at 2007-7-12 10:41:04 > top of Java-index,Desktop,Developing for the Desktop...
# 4

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

Lukamana at 2007-7-12 10:41:04 > top of Java-index,Desktop,Developing for the Desktop...
# 5

> 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.

puckstopper31a at 2007-7-12 10:41:04 > top of Java-index,Desktop,Developing for the Desktop...