sunlabs.brazil.handler
public class ResourceHandler extends Object implements Handler
jar uf [jar file] [web site]
sunlabs/brazil/main/config
. See
{@link sunlabs.brazil.server.Main Main.java} for more info.
Main-Class: sunlabs.brazil.server.Main, and add it to the manifest with:
jar ufm [jar file] [startup file]
java -jar [jar file] [optional server options....]
if no suffix is provided, and the "directory" exists, a redirect is issued, to add-on the trailing slash. The following server properties are used:
Version: %V% ResourceHandler.java
Method Summary | |
---|---|
static byte[] | getResourceBytes(Properties props, String prefix, String file)
Find a file blob as a resource in our jar file (experimental). |
static InputStream | getResourceStream(Properties props, String prefix, String file)
Look for a file in the filesystem. |
static String | getResourceString(Properties props, String prefix, String file) |
boolean | init(Server server, String prefix) |
boolean | respond(Request request) |
Parameters: props where to look for server root property prefix " file The pseudo file to find as a resource
Returns: The data, if available, or raises an exception.
Parameters: props where to look for server root property prefix " file The pseudo file to find as a resource
Returns: The input stream (or null)