Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple HTTP server written in Java

License

NotificationsYou must be signed in to change notification settings

Tomiwa-Ot/java-web-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple multithreaded HTTP server built with the Producer-Consumer design pattern and synchronised with blocking queues.

Features

  • Directory Listing
  • Basic HTTP Authentication
  • Logs all requestswebserver.log

Configuration

Port

The default port used is 8080. It can be modified either by changing the port value inproperties.json or supply it as an argument in the console.

javac App.javajava App <port_number>

Basic HTTP Authentication

To enable, change the username value fromnull to<your_username> and password value fromnull to a Bcrypt hash of the password inproperties.json

{"username" :"your_username","password" :"Bcrypt hash",}

To disable, set the username and password values asnull.

Worker Threads and Connection Queue

The number of consumer threads and blocking queue size can be modified inproperties.json

{"worker_threads" :20,"connection_queue" :30}

Screenshots

Index pageViewing a fileBAsic HTTP authorization

TODO

  • Request for basic authentication if username & password are set
  • Allow user to specify web root folder

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2026 Movatter.jp