Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A Java HTTP Server

Tags:

java

http

I want to implement a Java HTTP server locally, I mean the server computer would be in my control. I'm expecting not more than 20 clients to send requests to it. I was wondering how to go about it:

  1. Should I use a J2EE servlet container, like Apache Tomcat?
  2. Could I use J2SE classes and just build it using them?
  3. Are there any existing alternatives?

What does your experience suggest?

like image 870
Kevin Boyd Avatar asked Nov 27 '22 12:11

Kevin Boyd


1 Answers

There's a simple HTTP server embedded in the Sun 1.6 JRE. It's not JavaEE or servlet-compliant, it's very lightweight, but it might be good enough for your requirements. No need to download any 3rd party stuff if this is all you need.

The javadocs, rather bizarrely, are out on their own, here.

like image 162
skaffman Avatar answered Dec 09 '22 13:12

skaffman