The Toy Web Server is a small multi-threaded Web server written in Java. It runs on PC's running RedHat Linux 7.3 and Windows 98SE. It should run on any system that supports Java 1.3 or later. The Toy Web server will run "out of the box" with minimal configuration. The Toy Web Server is intended for personal / educational use. It's a very bad idea to use the Toy Web Server for production or commercial applications. Instead please use Apache or some other industrial strength server.
Please note that ToyWS does not support dynamic Web pages - no CGI, servlets, JSP's, etc. It does not support keep-alive connections.
The Toy Web Server supports the following file types:
It treats any other file type as an Octet-Stream (most browsers will prompt a user to download Octet-Stream files. It also will generate directory listings.
The Toy Web server is configured by editing the ToyWS properties file. This file 'ToyWS.txt' should be in the same directory as the 'ToyWS.jar' file. You may edit the properties file while you Toy Web server is running. But, you will need to shutdown and restart the Web server for the changes to take effect.
There are two values in the properties file, that you may want to change. One is the port on which the Web server listens for requests. By default, Web servers use port 80. You can specify any port with the following caveats:
The other value, is the directory where your Web pages are located. The Toy Web server will allow people to view files in this directory and all of it's sub-directories, so choose carefully.
If your machine has a DNS entry (i.e. a well known name), you simply type http://name_of_your_machine/ into the (URL) address field of your broweser. If you've set the port of your Toy Web server to something other than 80, you'll have to specify the port as well: http://name_of_your_machine:port/.If your machine does not have a DNS entry, you can use it's number (IP address). For any machine, the number 127.0.0.1 means "the local machine". If you want to access your Web server from a remote machine, you can use your IP address. Both Windows and Linux have commands to find your IP address (ifconf -a in Linux, and winipcfg in Windows 98).