0

Is it possible to have a Java application listen to HTTP requests via servlets and to listen to other TCP port at the same time? Is there a standard way to do this?

1 Answer 1

1

One way to achieve this, is to embed Jetty into your main application. Here is a tutorial.

With the embedded Jetty servlet container you can run standard Java web applications (WARs). At the same time in your main application you can listen to other TCP ports via a ServerSocket.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.