A multi-threaded (e.g. file-based) web server with thread-pooling implemented in Java. This repository is a fork from ibogomolov/WebServer. I extended this project and documented the code.
- Documented the code.
- Created a license (MIT-license)
- Changed the README.md
- Verification of the command-line arguments in the main(...)-method. Checks whether the command-line arguments are in the proper form. Otherwise it raise a certain error-message.
- Changed the close()-method in the Server-class. For shutdown the thread pool with a while-loop.
- Created a useful constructor in the class HttpRequest.
- Added a simple GUI for controlling the server.
- Added a new .jar file called
WebServerGUI.jar
- I changes only the .java-files and the binaries .class files and the .jar file.
You simply type in the console:
chmod +x WebServer.jar
after that
./WebServer.jar
This starts the web server under http://localhost:8080 with working-directory wwwroot.
In addition you can given some command-line arguments:
./WebServer.jar <port> <working-directory> <max number of threads>
It must be three arguments in the order above.
You simply type in the console:
chmod +x WebServerGUI.jar
after that
./WebServerGUI.jar
This starts the GUI for the webserver. (Swing-GUI)