Java TCP Server program running on Apache Tomcat

Here I have some problems with the TCP server program, I created a jar that has the TCP server code, and it needs to be run continuously, and I need to deploy this jar on the Apache server ... this jar will work fine when we execute jar from the ans command line will not accept incoming connections when starting apache tomcat, in apache I already have several jars, so they are completely independent of this jar.

while (true) {
    Socket client = serverSocket.accept();
    System.out.println("S: Receiving...");

----------
+3
source share
1 answer

We did this successfully for a chat program a couple of years ago, but it was a nightmare to maintain. There are several other more standardized ways to do this. From the top of my head, this is what we did.

  • Servlet created
  • init , .

Tomcat?. Tomcat ( )?

:

tcp/ip Apache Camel, .

+1

All Articles