YServer


YServer is a mini Web server written in Java.

YServer is simple and easily expandable at the source code level. It supports multiple users, requests for file resources under a public directory root (with the request http://<server IP>/<resource path>), the HTTP methods GET and POST, MIME types, and file uploading (with the request http://<server IP>/upload). YServer reads initialization settings at startup from a file. New custom functionality can be easily added by overriding a couple of methods. This allows to extend YServer in a way similar to CGI scripts. YServer has served as the base class in the development of a number of research prototypes.


YServer settings

Changes to the initalisation file (server.ini) should not be made while YServer is running, and will take effect the next time YServer will run. The server.ini initialisation file is as follows:

#YServer settings
#Sat Jul 20 20:50:30 GMT+03:00 2002
port=...<port the server runs (eg. 1111), default for Web servers is 80
max_requests=...<maximum number of concurrent requests allowed (eg. 50)>
read_request_timeout=...<how long server waits for client request to complete in milisecs>
log_file_path=...<path for log file (eg. ./server.log)>
max_log_size=...<maximum number of log file in bytes>
log_mode=...<possible values: on, off, screen, file (display / write messages to screen or / and log file)>
debug_mode=...<possible values: on, off (display verbose messages to screen for debugging)>
main_html_dir=...<path to root of public directories (eg. ./public)>
def_html_file=...<default file to display if filename omitted (eg. index.html)>
upload_feature=...<possible values: on, off (activates and deactivates file uploading)>
upload_dir=...<path to directory where uploaded files are stored (eg. ./uploads)>
upload_max_size=...<maximum number of bytes per upload, 0 means no limit>
max_screen_lines=...<maximum lines of PServer window>
win_topLeftY=...<user-defined PServer window position Y>
win_topLeftX=...<user-defined PServer window position X>
win_height=...<user-defined PServer window height>
win_width=...<user-defined PServer window width>



Designed and developed by Yannis Stavrakas, 2001-2003 (c)