dasanjos / java-webserver Goto Github PK
View Code? Open in Web Editor NEWA simple multi-threaded HTTP 1.1 Server implemented in Java for educational purposes based on W3C specifications
License: Other
A simple multi-threaded HTTP 1.1 Server implemented in Java for educational purposes based on W3C specifications
License: Other
Java Web Server =============== A simple multi-threaded HTTP 1.0 Server implemented in Java for educational purposes based on W3C specifications (http://www.w3.org/Protocols/): * [W3](https://www.w3.org/Protocols/HTTP/AsImplemented.html) Hypertext Transfer Protocol -- HTTP/0.9 * [RFC 1945](http://www.ietf.org/rfc/rfc1945.txt) Hypertext Transfer Protocol -- HTTP/1.0 * [RFC 2616](http://www.ietf.org/rfc/rfc2616.txt) Hypertext Transfer Protocol -- HTTP/1.1 * [RFC 2617](http://www.ietf.org/rfc/rfc2617.txt) HTTP Authentication: Basic and Digest Access Authentication * [RFC 6265](http://tools.ietf.org/html/rfc6265) HTTP State Management Mechanism (Cookies) For a more reliable solution, please check Jigsaw, W3C Java HTTP 1.1 server implementation (http://www.w3.org/Jigsaw/) or other existing open source Java web servers (http://java-source.net/open-source/web-servers). This software is released under FreeBSD license. [Author info and contact](http://dasanjos.com) RUNNING ======= The Java Web Server runs on any Operational System with Java (JRE) 1.6+ installed To start the Java Web Server, download the application jar file and run the following command: $ java -jar web-server.jar <PORT_NUMBER> To stop the Simple Web server, just press Cntr+C on the command line. (The parameter PORT_NUMBER is optional, default port is 8080) COMPILING ========= Step 1 - Install Requirements ----------------------------- To download and compile the source code you need to install: - Java SDK v1.6+ - Maven v2.0+ - Git v1.7+ Step 2 - Get the source code ---------------------------- Download the project source code from GitHub repository (https://github.com/dasanjos/java-WebServer) $ git clone git://github.com/dasanjos/java-WebServer This will create a folder "java-WebServer" containing the project source files. Step 3 - Compile it! -------------------- Go to the project root folder and run the following command: $ mvn clean package This will create a "target" folder containing the application jar file: java-WebServer-1.0-jar-with-dependencies.jar
Hey,
line 125 should be changed to String ext = uri.substring(uri.lastIndexOf(".") + 1);
as there are files with two . in the name.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.