-1

I'm trying to implement a desktop application that could send http messages to an already open local web application so that it will be updated with this information.

Any suggestions?

The only idea I came up with is sending http requests to the relevant web server and implementing on the web server a servlet that will update the relevant web page according to userID.

Anyone has a more elegant solution?

Tal Joffe
  • 5,347
  • 4
  • 25
  • 31
  • You could send the HTTP request with localhost if its a local web application that receives http messages.. – cowls Mar 04 '14 at 13:31
  • you're supposed to research it first and show us what you tried – Wim Ombelets Mar 04 '14 at 13:52
  • Sorry.. New to this forum ( I mean actually asking questions). You mean I should write code? I work in a security company and my only access to the internet is through my mobile and it will bee quite hard to write code with the android keyboard.... – Tal Joffe Mar 05 '14 at 15:01
  • Cowls, thanks for your comment. I figured I could send messages to localhost. My question is how do I listen to the messages. Is websocket a good approach? – Tal Joffe Mar 05 '14 at 15:06

1 Answers1

0

As far as I understand you you want to implement servlet that performs HTTP connection to other, external server. If I am right the following discussion will help you:

How do I make HttpURLConnection use a proxy?

Take a look on the answer that explains how to use Proxy class introduced in java 1.5.

Community
  • 1
  • 1
AlexR
  • 114,158
  • 16
  • 130
  • 208