tags:

views:

34

answers:

1

HI guys,

I am new to java. i want to develop one swing application and struts application and i need to integrate both

when user click on download button .exe should download and install on client pc.after

installation exe file should communicate with struts application.

Thanks in advance

Aswan

A: 

First you want to study this so that you can download your Swing App: http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/contents.html

Then you want to use HttpURLConnection to do GET and POST requests to your Struts application on the Server.

Your best bet is to just do the Swing piece and use HttpURLConnection to access a Servlet via a POST. You might want to look into the Command pattern to allow you to send different requests through one Servlet.

On another note: If you can live with the app living within a web page GWT is also a good use case for this, it also can integrate well with existing web pages and Struts.

Romain Hippeau