I am developing a Java swing/desktop application and I want to send data from the desktop app to a Java web app running on tomcat, I have searched for this kind of question here as I expected to see something similar but I couldn't find it. Please a need suggestions on what kind of technology to use.
Asked
Active
Viewed 2,582 times
0
-
Via HTTP POST request. – madhead Sep 21 '13 at 13:34
-
1If you are using a database, both applications can simply share the same database or the needed tables. – Daniel F. Thornton Sep 21 '13 at 13:35
-
I didn't downvote but please research before posting such questions – The Governor Sep 21 '13 at 16:48
2 Answers
2
You will need to make use of an HTTP library such as Apache HTTPClient The api of indiviual libraries vary a little bit, but in general they provide you all the tools you need to set up an HTTP POST, GET, etc with complete control over headers, content, query, etc and most (including HTTPClient) have support for complex authentication methods and support HTTPS connections.

Mike Clark
- 11,769
- 6
- 39
- 43
-
Depending on the complexity of the OP's needs pure Java may well be sufficient. – Boris the Spider Sep 21 '13 at 14:03
0
You can make use of Spring RESTClient. See this : http://www.springbyexample.org/examples/contact-rest-services-client.html

Nagendra Varma
- 2,215
- 3
- 17
- 26