Is there a solution out there that can help on that? basically I want to build a Java app that could start a http server on a separate thread such that a local running app could call to this Java app by making HTTP calls.
Asked
Active
Viewed 256 times
0
-
I'm not sure that this is a threading issue...you want two `apps` to communicate using HTTP, or two `threads`? could you be more clear?...maybe provide some code? – mre May 27 '11 at 23:51
-
exactly, i didn't meant for that. :) – tom May 27 '11 at 23:52
-
so this isn't a threading issue? – mre May 27 '11 at 23:53
-
mre, sorry but i don't know why you still think it's a threading issue. :) did i tag it as threading issue or something? – tom May 28 '11 at 00:19
2 Answers
3
You could embed Jetty into your Java app to run an HTTP server. It's also possible with Tomcat however it's more involved, see Howto embed Tomcat 6?

Community
- 1
- 1

WhiteFang34
- 70,765
- 18
- 106
- 111
0
Take a look at NanoHTTPD. It is written in one single Java file, with no external dependencies, and is very easy to embed.

Binil Thomas
- 13,699
- 10
- 57
- 70