A stupid simple HTTP/1.0 server written in Java
Context? There is no context, it exist because it does.
This project was designed for Java 1.8.0
There are two diffrent ways, either A manually, or B with the provided script.
Here's the manual way if you don't trust my script:
I. Please go to the directory that contains net/
Your file manager should show something along this file structure:
'LICENSE MANIFEST.MF net README.md'
And go ahead and create an 'out' directory: mkdir out/ (Unix example)
II. run 'javac -d out/ net/snacktank/httpserver/*.java'
CD into 'out/'
Now the server can be ran by 'java net/snacktank/httpserver/WebServer' but we want a Java Archive (JAR) file.
III. run 'jar -cfm WebServer.jar ../MANIFEST.MF net/snacktank/httpserver/*.class net/snacktank/httpserver/request/*.class'
This sequence should create a JAR file that can be placed anywhere you want!
It's pretty simple just do:
'java -jar WebServer.jar'
POST & PUT are disabled by default. You will need to enable them in the source code.
If POST is enabled the request will be stored as plain ASCII in a request/ sub-folder.
If no file or '/' is requested by GET, the server will return 'index.html'
I. GET
II. HEAD
III. POST
IV. PUT
I. [ ] LINK
II. [ ] UNLINK
III. [ ] DELETE
IV. [ ] AUTHENTICATION
MIT
Copyright MMXXVI SnackTank