Skip to content
/ wowow Public

A blindingly fast optomised Java web server - developed for mobile platforms, tested on Android

Notifications You must be signed in to change notification settings

dine909/wowow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 

Repository files navigation

Example Usage:

Serve files from root on /files
Serve 404 error (via DefaultHttpHandler) to anything else         

Example Code:

Server s= new Server(8888);
HttpSocketHandler httpSocketHandler=new HttpSocketHandler();

//serve files
FileSystemHttpHandler fileSystemHandler = new FileSystemHttpHandler(
		(HttpHeaderMatcher) new PathMatcher("/files/*"),new FileSystemFile("/"));
fileSystemHandler.allowDirectoryBrowsing=true;
httpSocketHandler.addHandler(fileSystemHandler);

//serve errors
httpSocketHandler.addHandler(new DefaultHttpHandler((HttpHeaderMatcher) new PathMatcher("/*")));

s.setSocketHandler(httpSocketHandler);
s.start();
s.join();

About

A blindingly fast optomised Java web server - developed for mobile platforms, tested on Android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages