Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.855.072 Times

HttpdBase4J 0.2

  Date Added: April 15, 2010  |  Visits: 788


Report Broken Link
Printer Friendly Version

Product Homepage
Download (73 downloads)

HttpdBase4J is an embeddable Java web server framework that supports HTTP, HTTPS, templated content and serving content from inside an archive. The classes are easy to extend as they utilize the Hollywood dont call us, well call you principle to allow the user to overide the framework behaviour during all the different phases of the HTTP transaction. Note:HttpdBase4J uses the Java 6 classes so it wont currently work under earlier versions of Java. Usage Examples: The simplest use case is to create an embedded web server on port 8088 with its home directory at htdocs in the local filesystem and a root url at / ie / maps onto htdocs: homeDir = new"./htdocs"); httpd = new FileHttpd(homeDir, 10); // Creates a server with a threadpool of 10 httpd.setLogger(System.err); // Log to console httpd.start(8088, "/"); Creating a HTTPS server equivalent the the HTTP server above requires passing a keystore and password to start. Passing null will generate a certificate free keystore if you only need the encryption capabilities of HTTPS and not the certificate capability: httpd = new FileHttpd(homeDir, 10); m_httpd.start(8089, "/", keystore, password); Serving content from inside an archive or from a jar or zip in the Java classpath requires creating an ArchiveHttpd instance instead of a FileHttpd. To serve content located in a jar or zip in the class path you need only specify the resource directory in the classpath where the content islocated, for example: httpd = new ArchiveHttpd("/resources/htdocs", 10); httpd.start(8088, "/"); To serve content from within a specific archive specify the archive as a Java File when constructing the ArchiveHttpd: httpd = new ArchiveHttpd(new File(""), "/resources/htdocs", 10); httpd.start(8088, "/"); Creating web content using templates is also supported. Currently only the StringTemplate library ( is is supported but it should be relatively easy to create user derived classes for other template implementations. To create an HTTP embedded web server on serving templated content from resources/htdocs in the classpath and having a template file handler (A Java class implenting the Templatable interface that is used to fill the templates) in net.homeip.donaldm.test.templates. httpd = new ArchiveHttpd("resources/htdocs", 10); StringTemplateHandler stHandler = new ArchiveStringTemplateHandler(httpd, "net.homeip.donaldm.test.templates"); httpd.addHandler(".st", stHandler); // .st extension = template files httpd.start(m_port, "/"); The HTTP transaction handling can be customized at any point by overiding any of the methods in the HttpHandleable interface or by overiding onCreateRequestHandler in Httpd in order to provide your own request handler. A simple example of overiding HttpHandleable methods: httpd = new TestOverideHttpd(m_homeDir, 10); httpd.start(m_port, "/"); class TestOverideHttpd extends FileHttpd { public HttpResponse onServeHeaders(long id, HttpExchange ex, Request request) { //Create or amend content } public InputStream onServeBody(long id, HttpExchange ex, Request request) { //Return amended or created content } }.

Requirements: No special requirements
Platforms: Linux
Keyword: Archivehttpd Content Filehttpd Http Httpd Https Internet Java Java Web Server New Server Web Server
Users rating: 0/10

License: Freeware Size: 3.1 MB
Macintosh Software  -  EditLive! for Java 1.5
EditLive! for Java is a cross platform, browser-based WYSIWYG content authoring tool which enables non-technical users to contribute content to web-based enterprise applications. It extends EditLive!'s content authoring capabilities to MAC OS X...
11.44 MB  
Networking Tools  -  Komodia free SSL sniffer 2.1
Free stream HTTP and HTTPS (SSL sniffer) sniffer for Internet Explorer 6.0/7.0 and Mozilla Firefox that allows you to sniff all traffic and see decrypted SSL traffic without using a proxy or alerting the browser. The sniffer is using Komodia's...
177 KB  
E-Mail Servers  -  602LAN SUITE 2004.0.06.1017
602LAN SUITE is an easy-to-install and manage all-in-one network software suite providing secure e-mail services with anti-virus & anti-spam, fax support, built-in firewall with NAT and web content filter proxy for controlled Internet sharing....
30.64 MB  
Automotive Information Databases  -  ODBCHTTP Home Edition 1.0.1
ODBCHTTP is the first odbc driver that connects to databases over the internet using standard http or https protocols and that doesn't require specialised software to be installed on the webserver. Currently MySQL and Oracle are supported. DB2 and...
2.01 MB  
Server Tools  -  fileXhub 1. 1. 2000
BIT's fileXhub makes it simple to manage your own Internet file transfer hub. fileXhub is based on open standards and lightweight secure technology. fileXhub makes it easy to build comprehensive, integrated, and secure managed file transfer...
708 KB  
Utilities  -  HttpWatch Basic - HTTP Sniffer and Debugger 9.3.37
HttpWatch is the ultimate HTTP sniffer for monitoring and optimizing web pages. It shows cookies, headers, content, query strings, POST values and low level request/response streams for HTTP and HTTPS. Recent comments about the HttpWatch...
10.8 MB  
Network & Internet  -  Java Web Shell 0.0.8
Java Web Shell is a web based interactive shell-type environment written in Java. Obviously, to use the shell, youll need to be using a browser that supports Java Applets, and this has been compiled using the Sun 1.4.1 JDK. Head over to Sun...
13.31 KB  
Remote Computing Tools  -  Barracuda Proxy 1.0
BdProxy - SOCKS, HTTP, and HTTPS Proxy Server.The BdProxy acts as a SOCKS, HTTP, and HTTPS proxy server. The proxy allows you to use your Internet applications anonymously, despite firewalls. The BdProxy is a free and complementary BarracudaDrive...
593.92 KB  
Blog  -  DoubleSpeak 0.1
DoubleSpeak, formerly known as the Igloo Weblog, aims to be the easiest to use and most customizable CMS (content management system) on the Internet.
51.2 KB  
Networking  -  Contenshik 1.0b
Import blogs content from various bloghosting allover Internet.Installation : 1. Be shure that you have account at and Api feature is enabled on it; 2. Upload 'contenshik.php' to the '/wp-content/plugins/' directory; 3....
10 KB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  IPv6 CARE 3.2b
IPv6 CARE, "IPv6 Compliant Automatic Runtime Environment", is a Linux tool able to patch ipv6-agnostic programs on-the-fly ('patch' mode). It can also generate a diagnosis about the IPv6 compliance of an application ('check' mode).
409.6 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB