Java Open Source Projects Directory

...dedicated into Java open source projects

  • Increase font size
  • Default font size
  • Decrease font size


VQEmbWeb is a very minimal embedded web server for Java (5 or greater). The jar is 12K in size and the only dependency is Apache log4J. It supports plain HTTP and HTTPS over SSL. To use it, just use the EmbeddedServer.createInstance() method, passing in the port to open the server on and an instance of HttpRequestHandler to handle the requests. Your HttpRequestHandler has to return a Response object. The URL parameters are handed to you in their unencoded form in the map. The URL without the parameters included is in the url string. There are also methods for:

 * setting a redirect
 * returning a 404 or a 500
 * setting the content type
 * setting binary, rather than text content