Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tiniest Java web server [closed]

Tags:

java

webserver

I need the simplest web server to write a minimal web interface for an application. It should be something really featureless like Webrick from Ruby's standard library or BaseHTTPServer from Python's standard library, just a way to keep a server listening to a port and respond to GET requests with a string.

Thanks

like image 294
pistacchio Avatar asked Dec 20 '11 07:12

pistacchio


People also ask

Are Java application servers still used?

There has been concern for nearly five years application servers are dead. Truth be told, they are not dead, but is their usage in decline? The simple answer is yes. Over the years, it appears corporate environments have decided the "return on investment" is not there when looking at Java application servers.

Does Java have a web server?

Java 18's Simple Web Server is a minimal HTTP static file server that was added in JEP 408 to the jdk. httpserver module.

Which web server is used for Java?

Apache Tomcat One of the more popular web servers in the Java ecosystem is Apache Tomcat. You can check the latest version of Apache Tomcat and the support Java version(s) on the project's website.


1 Answers

NanoHTTPD

Try NanoHTTPD. I have been using it for Android development.

NanoHTTPD is a light-weight HTTP server designed for embedding in other applications, released under a Modified BSD licence.

like image 145
Prakash Nadar Avatar answered Sep 17 '22 13:09

Prakash Nadar