How to HTTP

  BEJY HTTP server

To configure a HTTP server, there you have to do some basic configuration.

  • You SHOULD configure the global node
  • You SHOULD configure the mime types node
  • You MAY configure user group nodes
  • You MUST configure a tcp/ip server node
  • To make the server act as an HTTP server select the protocol
    de.bb.bejy.http.HttpFactory

      HTTP protocol

    namevaluedescription
    class a class implementing this configurable
     

    creates a new virtual host, to listen on domain names, explicit IP addresses or everything

    • class
      You MUST select one of the available protocols. Further settings depend on the protocol. Have look into how to HTTP and how to mail.
    • virtual host
      Defines a virtual host that is served by this HTTP server. You may add multiple virtual hosts to the TCP/IP server. This allows you to provide different content per domain.
    • apply changes
      applies the displayed settings to the running server

      virtual host

    Configure a virtual host.
    namevaluedescription
    logFile file and path for http log file or * for stdout
    name a list of domain names, ip addresses or *
     

    creates a new context, a customizable context with user defined handlers
    creates a new war, allows to load a single WAR file and map it to a URL context
    creates a new webapps, to load all WAR files and unpacked WAR files in the specified directory

    • logFile
      Defines the file name for the HTTP access log.
    • name
      A list of domain names or "*" to listen on any domain.
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • context
      This is a user define context, where you may add content handlers.
    • war
      configure a single WAR archive or a folder with an exploded WAR archive
    • webapps
      defines a node to configure a webapps directory and loads its contained webapps.

      context

    Configure a context. A context is usually the root of a single web application.
    namevaluedescription
    group optional name of a user group to restrict access
    path the local path
    realm a descriptive name for this realm
    urlPath the URL context path
     

    creates a new handler, to handle incoming HTTP requests
    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • group
      Optional name of a user group, leave it empty to have public access
    • path
      this is the path to the context root in the local file system
    • realm
      The realm name is displayed to users and allows to merge different contexts to the same user group without additional password prompts.
    • urlPath
      the URL path is used to match the requests path and detect whether this context is used or not.
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • handler
      Add a new handler to this contexthandlers.
    • parameter
      Add a context init parameter.

      handler

    Configure a handler
    namevaluedescription
    class a class implementing this configurable
     

    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • class
      Defines which class is used for this handler. You may choose
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • parameter
      Add a context init parameter.

      CGI handler

    Configure a CGI handler
    namevaluedescription
    class a class implementing this configurable
    command the CGI command line
    mask the match pattern
    timeout maximum timeout im ms to wait for completion
     

    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • class
      Defines which class is used for this handler.
    • command
      Defines the command line to invoke the CGI
    • mask
      the handler is only invoked if the content relative URL path matches the mask
    • timeout
      Limit the time for the CGI. If the limit is reached, the CGI gets aborted.
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • parameter
      Add a context init parameter.

      file handler

    Configure a file handler
    namevaluedescription
    class a class implementing this configurable
    default the default welcome files
    mask the match pattern
     

    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • class
      Defines which class is used for this handler.
    • default
      Defines the default welcome files. Only file and welcome handler can specify default files!
    • mask
      the handler is only invoked if the content relative URL path matches the mask
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • parameter
      Add a context init parameter.

      servlet handler

    Configure a servlet handler
    namevaluedescription
    class a class implementing this configurable
    mask the match pattern
    servlet class name of the servlet. Specify the class name of your servlet, which must be in classpath. de.bb.jsp.JspServlet is a servlet handler for *.jsp files.
     

    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • class
      Defines which class is used for this handler.
    • mask
      the handler is only invoked if the content relative URL path matches the mask
    • servlet
      Lists all servlets found in the classpath. To enable JSPs select the de.bb.jsp.JspServlet.
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • parameter
      Add a context init parameter.

      deny handler

    Configure a deny handler. A deny handler is used to prevent access to resources. Requests to resources in this context matching the mask are prompted with 401 - authentication required. This is done whether those resources exist or not.
    namevaluedescription
    class a class implementing this configurable
    mask the match pattern
     

    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • class
      Defines which class is used for this handler.
    • mask
      the handler is only invoked if the content relative URL path matches the mask
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • parameter
      unused.

      welcome handler

    Configure a welcome handler. A welcome handler is only used to specify the welcome files. If a request matches a folder, the welcome files are tries in order and the first match is used to fulfill the request.
    namevaluedescription
    class a class implementing this configurable
    default the default welcome files
    mask the match pattern
     

    creates a new parameter, which is an init parameter for the current instance, used on next activation

    • class
      Defines which class is used for this handler.
    • default
      Defines the default welcome files. Only file and welcome handler can specify default files!
    • mask
      the handler is only invoked if the content relative URL path matches the mask
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration
    • parameter
      unused

      parameter

    Configure an init parameter
    namevaluedescription
    name name of the parameter
    value value of the parameter
     

    • name
      name of the parameter
    • value
      value of the parameter
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration

      war

    Configure a single WAR file or directory.
    namevaluedescription
    alias an alias for which is used instead of the WAR file name
    group optional name of a user group to restrict access
    path the local path to a directory or an WAR file
    realm a descriptive name for this realm
    urlPath the URL context path. resulting URL consists from urlPath and WAR file name or alias
    workDir the temp directory
     

    • alias
      Overrides the WAR name
    • group
      optional user group to restirct access
    • path
      path to the WAR file or exploded WAR directory
    • realm
      The realm name is displayed to users and allows to merge different contexts to the same user group without additional password prompts.
    • urlPath
      the URL path is used to match the requests path and detect whether this context is used or not.
    • workDir
      optional define an own working directory
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration

      webapps

    Configure a webapps directory
    namevaluedescription
    path path to webapps folder
    urlPath url prefix
    workDir a work folder
     

    • path
      path to the WAR file or exploded WAR directory
    • urlPath
      the URL path is used to match the requests path and detect whether this context is used or not.
    • workDir
      optional define an own working directory
    • apply changes
      applies the displayed settings to the running server
    • \/
      makes the current element the last element of the same type.
    • remove this element
      removes this element from current configuration

     
    (c) by Stefan Bebbo Franke in 2000-2003, all rights reserved