Download Latest Version CoffeeWebServer_2_4.zip (437.9 kB)
Email in envelope

Get an email when there's a new version of CoffeeWebServer

Home / Version 2.3
Name Modified Size InfoDownloads / Week
Parent folder
CoffeeWebServer_2_3.zip 2015-01-05 430.2 kB
README 2015-01-05 8.0 kB
Totals: 2 Items   438.2 kB 0
CoffeeWebServer (C)2012-2015 Bo Zimmerman
Please read the LICENSE file for license information
Please read the NOTICE file for credits information
Please finish reading this document (README)

After that open up the coffeeweb.ini file and start reading.  CoffeeWebServer
has an INI FILE documentation system.

Informational web sites:
Sourceforge release site:     http://sourceforge.net/projects/miniwebserver
GitHub release site: http://github.com/bozimmerman/CoffeeWebServer

DIRECTORIES:
src               : coffeewebserver source and "binaries"
keys	          : example fake invalid self-rolled ssl keys
root              : default html documents root
tests             : Some JUNIT tests for the web server
target            : You must have already built this thing with Maven, congratz!

----------------------------------------------------------------------------------------
TO BUILD:
1. Download and install a Java JDK 1.6 or better
2. Download and install Apache Maven http://maven.apache.org/
3. CD to root directory and enter:
	mvn package
	(binaries will be in target\classes and target\CoffeeWebServer-?.?.jar)

TO RUN:
1. Build
2. Copy target\CoffeeWebServer-?.?.jar into the root install directory
3. enter java -jar CoffeeWebServer-?.?.jar

TO PLAY WITH:
1. Build and Run
2. point browser at http://localhost/
3. point browser at http://localhost/formdata.html
	(this is for testing FormTesterServlet and multipart form parsing)
4. point browser at http://localhost/filestest.html with a browser
	(this is for testing MultipartFileWriter servlet and multipart form parsing)
5. point browser at http://localhost/ranged.txt with a Header of "Range: bytes=0-2"
   (this is for testing ranged requests)
6. point browser at https://localhost
   (this is for testing SSL)
7. point browser at http://localhost/helloworld
   (this is for testing HelloWorldServlet)
8. point browser at http://localhost/helloworld
   (this is for testing HelloWorldServlet)
9. point browser at http://localhost/log
   (this is for testing LogDumperServlet)
9. point browser at http://localhost/session
   (this is for testing cookie-based sessions)
10.point browser at http://localhost/stats
   (this is for testing servlet statistics)

----------------------------------------------------------------------------------------
FEATURES:
1. Multiple concurrent connections
2. Support for arbitrary files in directory where server was started
3. Sample Servlets provided
4. Basic Servlet statistics
5. Basic HTTP/1.1 that works with IE, Firefox, chrome, wget, others?
6. Basic HTTP error handling for invalid and malformed requests
7. Proper I/O and thread resource management .. memory is mostly left to the VM. :)

OPTIONAL FEATURES IMPLEMENTED:
1. Servlet Session support
	(though this is of little proper use without a built-in auth system)
2. Cookie support for servlets -- sessions are cookie based, in fact
3. GZIP output encoding support
4. File Caching supported 
	(with memory usage caps and timeouts enforced by the cache)
5. Range support for file serving
6. POST support
	(this was trivial, so I also did more stuff around this .. see next section)
7. HTTP/1.1 Keep-Alive/Persistent connections
    (did more with this too -- see below)
8. SSL Support 
    (I provided a sample KeyStore in the files directory -- I hope that doesn't count 
     as external configuration. )
9. NIO/nonblocking implementation

EXTRA OPTIONAL FEATURES IMPLEMENTED:
1. DEFLATE output encoding support (for Chrome at least -- I.E. doesn't like it one bit)
2. MIME type support that enforces Accept headers
3. Full support for the HEAD method
4. Multi-Part form support, including embedded multi-parts
5. Url-Encoded body/Url-Endoded Part support
6. Form-Data body/Form-data Part support
7. Support for Multi-Part variables, w/ special care to Files
8. Pipe-Lined Request support
9. Chunked encoding
10.Output throttling
11.Access logs

----------------------------------------------------------------------------------------
TO EMBED:
1. Setup your custom coffeeweb.ini or prepare a java inputstream of text equivalent to an coffeeweb.ini:
    import java.io.FileInputStream;
    ...
    FileInputStream propStream = new FileInputStream(new File("mycoffeeweb.ini"));
2. Setup your own java Logger class, or use the built one.
    import com.planet_ink.coffee_common.logging.Log;
    ...
    Log.instance().startLogFiles("web", 2);
    Log.instance().setLogOutput("BOTH", "BOTH", "BOTH", "BOTH", "OFF", "OFF", "OFF");
3. Code this to initialize your configuration:
    import com.planet_ink.util.logging.Log;
    import com.planet_ink.coffee_web.server.WebServer;
    import com.planet_ink.coffee_web.util.CWConfig;
    ...
    CWConfig config=new CWConfig();
    WebServer.initConfig(config, Log.instance(), propStream);
4. Start the web server:
    import com.planet_ink.coffee_web.server.WebServer;
    ...
    WebServer webServer=new WebServer("My Web Server!",config);
    config.setCoffeeWebServer(webServer);
    webServer.start();
5 . Enjoy -- it's running!

2015-1-05   2.3 Bo Zimmerman <bo@zimmers.net>

    *. Support for CGIs.  Tested with Mediawiki for PHP in Windows

    *. HTTPHeader is now an interface.  No more unknown headers!

    *. MIME types can now be added to in the ini file.

2014-9-16   2.2 Bo Zimmerman <bo@zimmers.net>

    * Support for output throttling added, ini file configured.

    * Support for chunked encoding input and output added, ini file configured.

    * Directories can now be browsed according to ini file configuration

2014-4-09  2.1 Bo Zimmerman <bo@zimmers.net>

    * Fix to content-range response

    * Other Minor bug fixes

    * Support for files > 2gig

    * Expanded converters and file manager to give them more flexibility

    * New mw.ini option for disabling certain features (ranged only right now)

2013-7-20  2.0 Bo Zimmerman <bo@zimmers.net>

    * More bug fixes and performance enhancements

    * Support for access logs

    * Support for Connection: close header
    
2013-2-28  1.9 Bo Zimmerman <bo@zimmers.net>

    * Mostly a bug-fix build, with some minor changes to fascilitate embedding

2012-12-20  1.8 Bo Zimmerman <bo@zimmers.net>

    * Can now set file size limits on caching and compression through ini file

    * Last-Modified header now an established thing

    * If-Modified-Since now supported

2012-09-12  1.7 Bo Zimmerman <bo@zimmers.net>

    * (internal) forwarding now uses async read/writes on both sides, so it's speedy too
    
    * Correction to the 100-continue response conditions

2012-09-11  1.6 Bo Zimmerman <bo@zimmers.net>

    * (internal) async writes now supported -- miniwebserver is uberfast now!

2012-09-10  1.5 Bo Zimmerman <bo@zimmers.net>

    * (internal) config now uses standard java logger for better integratability with other projects
    
    * Protection against ../ urls added
    
    * Expanded HTTPRequest interface to allow user caching from servlets
    
    * No longer sends CONTINUE on http/1.0 requests (for Lynx)
    
    * Fixed a rather fundamental async-write problem.

2012-09-08  1.4 Bo Zimmerman <bo@zimmers.net>

    * added support for custom error pages
    
    * more data accessibility enhancements for plugin coders

2012-09-06  1.3 Bo Zimmerman <bo@zimmers.net>

    * added compression bufs to the file caching system

    * added support for 301 moved permanently when accessing directories without final /
    
    * added host and port forwarding in addition to previous context forwarding
    
    * added host and port mount directories, in addition to previous context mounts

2012-09-04  1.2 Bo Zimmerman <bo@zimmers.net>

    * fixed bug in mount list that prevented multiple depth contexts

    * added support for port forwarding -- see mw.ini

Source: README, updated 2015-01-05