dfischer.femtowebserver.httpd
Class HttpdProperties

java.lang.Object
  |
  +--dfischer.femtowebserver.httpd.HttpdProperties

public class HttpdProperties
extends java.lang.Object

Allows Weblets and SSSIs to access the configuration of the Femto Web Server (read/only access).

See Also:
HttpdWebletInterface, HttpdSssiInterface, Httpd

Field Summary
static java.lang.String[][] EXTENDED_MIME_MAPPING
          Extended MIME mapping definition (less secure).
static java.lang.String PRODUCT_MANUFACTURER
          Femto Web Sever Manufacturer: "www.d-fischer.com"
static java.lang.String PRODUCT_NAME
          HTTP Web Server Product Name: "Femto Web Server"
static java.lang.String PRODUCT_VERSION
          Femto Web Sever Version: "1.3-B"
static java.lang.String[][] RESTRICTED_MIME_MAPPING
          Restricted MIME mapping definition (more secure).
 
Method Summary
 java.net.InetAddress getBindAddress()
          Returns the HTTP server TCP/IP bind address.
 java.lang.String getDefaultContent()
          Returns the default file, if the URL request points to a directory.
 java.lang.String getDefaultMimeType()
          Returns the default MIME type.
 java.lang.String[][] getMimeMapping()
          Returns the current MIME mapping.
 int getRequestTimeout()
          Returns the HTTP request timeout.
 java.lang.String getServerName()
          Returns the HTTP server name.
 int getServerPort()
          Returns the HTTP server port.
 java.lang.String getWelcomePage()
          Returns for HTTP requests to the top level default URL "/" the welcome page.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRODUCT_NAME

public static final java.lang.String PRODUCT_NAME
HTTP Web Server Product Name: "Femto Web Server"

PRODUCT_VERSION

public static final java.lang.String PRODUCT_VERSION
Femto Web Sever Version: "1.3-B"

PRODUCT_MANUFACTURER

public static final java.lang.String PRODUCT_MANUFACTURER
Femto Web Sever Manufacturer: "www.d-fischer.com"

EXTENDED_MIME_MAPPING

public static final java.lang.String[][] EXTENDED_MIME_MAPPING
Extended MIME mapping definition (less secure).

 EXTENDED_MIME_MAPPING = { {"class", "text/html"},                     // only for weblets
                           {"html", "text/html"},
                           {"htm", "text/html"},
                           {"dat", "text/plain"},                      // bad for security
                           {"txt", "text/plain"},                      // bad for security
                           {"log", "text/plain"},                      // bad for security
                           {"css", "text/css"},
                           {"js", "application/x-javascript"},
                           {"tif", "image/tiff"},
                           {"tiff", "image/tiff"},
                           {"jpg", "image/jpeg"},
                           {"jpeg", "image/jpeg"},
                           {"gif", "image/gif"},
                           {"png", "image/png"},
                           {"bmp", "image/bmp"},
                           {"vaw", "audio/x-wav"},
                           {"ra", "audio/x-realaudio"},
                           {"aif", "audio/x-aiff"},
                           {"au", "audio/basic"},
                           {"snd", "audio/basic"},
                           {"mpga", "audio/mpeg"},
                           {"mp2", "audio/mpeg"},
                           {"mp3", "audio/mpeg"},
                           {"mpeg", "video/mpeg"},
                           {"mpg", "video/mpeg"},
                           {"mpe", "video/mpeg"},
                           {"qt", "video/quicktime"},
                           {"mov", "video/quicktime"},
                           {"avi", "video/x-msvideo"},                // bad for security
                           {"movie", "video/x-sgi-movie"},
                           {"rtf", "text/rtf"},
                           {"doc", "application/msword"},             // bad for security
                           {"xls", "application/vnd.ms-excel"},       // bad for security
                           {"ppt", "application/vnd.ms-powerpoint"},  // bad for security
                           {"ai", "application/postscript"},
                           {"eps", "application/postscript"},
                           {"ps", "application/postscript"},
                           {"swf", "application/x-shockwave-flash"},  // bad for security
                           {"pdf", "application/pdf"} };              // bad for security
 
See Also:
Httpd.setExtendedMimeMapping(), getMimeMapping()

RESTRICTED_MIME_MAPPING

public static final java.lang.String[][] RESTRICTED_MIME_MAPPING
Restricted MIME mapping definition (more secure).

 RESTRICTED_MIME_MAPPING = { {"class", "text/html"},    // only for weblets
                             {"html", "text/html"},
                             {"htm", "text/html"},
                             {"jpg", "image/jpeg"},
                             {"jpeg", "image/jpeg"},
                             {"gif", "image/gif"},
                             {"png", "image/png"},
                             {"bmp", "image/bmp"},
                             {"css", "text/css"},
                             {"js", "application/x-javascript"} };
 
See Also:
Httpd.setRestrictedMimeMapping(), getMimeMapping()
Method Detail

getServerName

public java.lang.String getServerName()
Returns the HTTP server name.
Returns:
HTTP server name
See Also:
Httpd.setServerName(java.lang.String)

getServerPort

public int getServerPort()
Returns the HTTP server port.
Returns:
HTTP server port
See Also:
Httpd.setServerPort(int)

getBindAddress

public java.net.InetAddress getBindAddress()
Returns the HTTP server TCP/IP bind address.
Returns:
HTTP server TCP/IP bind address or null, if the server is listening to all TCP/IP addresses.
See Also:
Httpd.setBindAddress(java.lang.String)

getRequestTimeout

public int getRequestTimeout()
Returns the HTTP request timeout.
Returns:
request timeout in seconds
See Also:
Httpd.setRequestTimeout(int)

getDefaultContent

public java.lang.String getDefaultContent()
Returns the default file, if the URL request points to a directory.
Returns:
the default file
See Also:
Httpd.setDefaultContent(java.lang.String)

getWelcomePage

public java.lang.String getWelcomePage()
Returns for HTTP requests to the top level default URL "/" the welcome page.
Returns:
the welcome page
See Also:
Httpd.setWelcomePage(java.lang.String)

getDefaultMimeType

public java.lang.String getDefaultMimeType()
Returns the default MIME type. If the Femto Web server is unable determine the MIME type from the HTTP request file, the default MIMRE type will be applied - or a "400 Bad Request" will be the HTTP response, if no default MIME type has been configured.
Returns:
the default MIME type or null, if no default MIME type has been configured
See Also:
Httpd.setDefaultMimeType(java.lang.String)

getMimeMapping

public java.lang.String[][] getMimeMapping()
Returns the current MIME mapping.
Returns:
the current MIME mapping
See Also:
RESTRICTED_MIME_MAPPING, EXTENDED_MIME_MAPPING, Httpd.setRestrictedMimeMapping(), Httpd.setExtendedMimeMapping(), Httpd.setMimeMapping(java.lang.String[][])