QAHTTPd is a powerful and high-secure embedded HTTP server, developed from scratch in Java 9.

QAHTTPd is "stand-alone" or "self-contained" in the sense that it has no dependencies. It runs on any operating system where Java is available. QAHTTPd uses no external libraries or interfaces. The entire QAHTTPd library is encapsulated in a single JAR-file. QAHTTPd does not need to be "installed" before it is used. There is no "setup" procedure. There is no server process that needs to be configured. QAHTTPd uses no configuration files. QAHTTPd just works.

QAHTTPd Features

  1. Pluggable IP connection adapters
  2. Pluggable log adapter
  3. Self-tuning worker thread pool
  4. Self-tuning SQL connection pool
  5. Support for anonymous and authenticated sessions
  6. Weblets (= Servlets)
  7. Server side JavaScript callable from HTML web sites (pre-processor)
  8. Server side include files (pre-processor)
  9. HTTP request filters
  10. WebSockets
  11. Response content compression
  12. Implemented as Java 9 module
  13. Fast, secure and stable

Integrated Security Protection

QAHTTPd is intrinsically safe and can be operated directly in the internet without the need for additional security solutions.

  • Dynamic IP block list
  • Protection against DOS attacks
  • Protection against too many invalid HTTP requests
  • Protection against too large HTTP requests
  • Protection against Zip bombs in compressed HTTP request content
  • Protection against User Agent changes in same session
  • Protection against guessing authentication credentials
  • Protection against guessing session IDs
  • Protection against receiving unwanted WebSocket frames
  • Protection against receiving too large WebSocket payload

Internal Statistics

QAHTTPd Lion Logo

import com.dkfqa.qahttpd.QAHTTPd;
import com.dkfqa.qahttpd.QAHTTPdProperties;

/**
 * Start a QAHTTPd server.
 */
public class MinimalStartup
{
    public static void main(String[] args) {
        try {

            // set initial values of the HTTP server thread
            // --------------------------------------------
            QAHTTPdProperties qahttpdProperties = new QAHTTPdProperties();

            // set the HTTP connection adapter
            qahttpdProperties.addIpPortAdapter("com.dkfqa.qahttpd.HTTPdConnectionAdapter", 8000, 8000);

            // set the document disk root directory (this configuration is optional, normally not used for REST API servers)
            qahttpdProperties.setDiskDocumentRootDirectory("/opt/htdocs");

            // start the server
            // ----------------
            QAHTTPd qahttpd = new QAHTTPd(qahttpdProperties);
            qahttpd.start();

            // wait forever - until the QAHTTPd server thread is terminated by an OS signal
            qahttpd.join();
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
QAHTTPd ▶ JavaDoc