Sample applications may be used to test the HTTP server functionality after a fresh installation, or just to learn by playing with the sample configuration files.
The "conf/samples/http/" directory contains several subdirectories with configuration files required by the sample applications. An application can be run by executing one of the "run.bat" or "run.sh" scripts from the Dwarf installation with URL of the application's main configuration file as the only argument. Such file is typically named "main.xml".
Example of usage:
C:\Dwarf> run.bat conf/samples/http/welcome/main.xml -- or -- localhost:~# ./run.sh conf/samples/http/welcome/main.xml
The entry URL for all sample applications is http://127.0.0.1:8080 (or http://localhost:8080).
Each sample application has the corresponding "conf/samples/http/xxxx/" subdirectory, which contains the application-specific configuration files.
Subdirectory: conf/samples/http/admin/
This sample demonstrates two important features of the Dwarf-based applications - modularity and remote management. It shows a hierarchical list of currently configured services (actually only those that can give us a report about their activity) and allows an user to issue a console commands from a HTML-based GUI. It utilizes also the form-based HTTP authentication and user-defined error pages.
Note: this application requires the authenticated user to be in the administrators security role. Refer to the "conf/samples/dwarf/users.properties" file for the list of sample user names and passwords which can be used to login.
Subdirectory: conf/samples/http/examples/
This sample application provides several servlet-based and JSP-based examples with source code to demonstrate the basic functionality of the server.
Subdirectory: conf/samples/http/jsp/
It shows simple HTML page generated by a JSP scriptlet. The page shows an actual report obtained from the main server object.
Subdirectory: conf/samples/http/mapping/
Tests the servlet mapping algorithm of the HTTP server. It uses two web applications - Test1 an Test2, each containing a set of servlets mapped to a number of different URI paths, and shows the servlet mapping and request-related information used by the server to process the requests.
Subdirectory: conf/samples/http/upload/
Tests the file uploading capability of the HTTP server. The file is sent by browser to the server which then tries to save it to the "tmp/" subdirectory of the Dwarf installation.
Note: default configuration will not allow to upload a file larger than 1MB.
Subdirectory: conf/samples/http/welcome/
It simply shows a static welcome HTML page and allows browsing the API documentation files, too.
Subdirectory: conf/samples/http/dav/
This application provides a sample WebDAV configuration. You must use a WebDAV client to access the DAV-enabled resources.
Return to the main page.