Code Monkey home page Code Monkey logo

java-webserver's Introduction

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  

java-webserver's People

Contributors

dasanjos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-webserver's Issues

HTTPResponse.java

Hey,

line 125 should be changed to String ext = uri.substring(uri.lastIndexOf(".") + 1);
as there are files with two . in the name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.