: Class Server21

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mortbay.Jetty
Class Server21

    java.lang.Object
      |
      +--com.mortbay.HTTP.Configure.BaseConfiguration
            |
            +--com.mortbay.Jetty.Server21

public class Server21
extends BaseConfiguration

Basic WWW server configuration. A simple configuration of Jetty for servlet and file serving, which may be driven from the program or from a properties file.

#### Notes

An IP address of 0.0.0.0 can be used to indicate all local addresses.

#### Usage

The main of this class may be passed an optional configuration file name (default is "JettyServer.prp"). The format of the configuration file allows for multiple named servers to be included as follows

     ServerName./pathOfStack.InetAddrPort          n.n.n.n:pppp
     ServerName./pathOfStack.Servlet./path         name=package.class[?paramFile]
     ServerName./pathOfStack.Directory./path       directory/name
     ServerName./pathOfStack.Directory.allowPut    true|false
     ServerName./pathOfStack.Directory.allowDelete true|false
     ServerName./pathOfStack.Directory./path       directory/name
     ServerName./pathOfStack.Log./path             filename|err|out

Version:
  1.0 Sat Sep 26 1998
Author:
  Greg Wilkins (gregw)
See Also:
  `JettyServer.prp`

Fields inherited from class com.mortbay.HTTP.Configure.BaseConfiguration
`addresses, attributes, exceptionHandlersMap, httpHandlersMap, listenerClasses, mimeMap, properties`

Constructor Summary
`Server21(java.lang.String serverName)` Deprecated. Constructor.

Method Summary
`void` | `addAddress(InetAddrPort addr)` Deprecated. Add an address to listen at.
`void` | `addAuthRealm(java.lang.String stack, java.lang.String path, java.lang.String name, java.lang.String filename)` Deprecated. Add a authentication realm to the server
`void` | `addDirectory(java.lang.String stack, java.lang.String path, java.lang.String directory)` Deprecated. Add a file directory to the server
`void` | `addFilter(java.lang.String stack, java.lang.String path, java.lang.String filterClass)` Deprecated. Add a Filter
`void` | `addForward(java.lang.String stack, java.lang.String path, java.lang.String url)` Deprecated. Add a Forwarder
`void` | `addLog(java.lang.String stack, java.lang.String path, java.lang.String log)` Deprecated. Add a log sink to the server
`void` | `addProxy(java.lang.String stack)` Deprecated. Add a Proxy
`void` | `addServlet(java.lang.String stack, java.lang.String path, ServletHolder holder)` Deprecated. Add a servlet to the server
`void` | `addServlet(java.lang.String stack, java.lang.String path, java.lang.String name, java.lang.String servlet, java.lang.String paramFile)` Deprecated. Add a servlet to the server
`void` | `addTranslation(java.lang.String stack, java.lang.String path, java.lang.String translation)` Deprecated. Add a URL translation
`void` | `allowDelete(java.lang.String stack, java.lang.Boolean value)` Deprecated. Set the allowDelete option on the FileHandler for the server
`void` | `allowPut(java.lang.String stack, java.lang.Boolean value)` Deprecated. Set the allowPut option on the FileHandler for the server
`static java.util.Hashtable` | `buildServers(java.util.Properties props)` Deprecated. Build a Hashtable of Server configurations from a server properties instance
`void` | `join()` Deprecated. join
`static void` | `main(java.lang.String[] args)` Deprecated. main
`void` | `start()` Deprecated. Start serving

Methods inherited from class com.mortbay.HTTP.Configure.BaseConfiguration
`addresses, exceptionHandlersMap, getAttribute, getMimeByExtension, getMimeType, getProperties, getProperty, httpHandlersMap, listenerClasses, log, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Server21

    public Server21(java.lang.String serverName)
             throws java.io.IOException

  Deprecated.
  Constructor.
  Parameters:
    `port` -
  Throws:
    java.io.IOException -

Method Detail

### addAddress

    public void addAddress(InetAddrPort addr)

  Deprecated.
  Add an address to listen at.
  Parameters:
    `addr` -

### addServlet

    public void addServlet(java.lang.String stack,
                           java.lang.String path,
                           ServletHolder holder)

  Deprecated.
  Add a servlet to the server
  Parameters:
    `path` - The path of the servlet (see PathMap for encoding)
    `name` - The name of the servlet
    `holder` - A servlet holder
  See Also:
    `PathMap`

### addServlet

    public void addServlet(java.lang.String stack,
                           java.lang.String path,
                           java.lang.String name,
                           java.lang.String servlet,
                           java.lang.String paramFile)
                    throws java.io.IOException,
                           javax.servlet.ServletException,
                           java.lang.ClassNotFoundException

  Deprecated.
  Add a servlet to the server
  Parameters:
    `path` - The path of the servlet (see PathMap for encoding)
    `name` - The name of the servlet
    `servlet` - The class name of the servlet
    `paramFile` - Servlet init param file name May be null
  See Also:
    `PathMap`

### addDirectory

    public void addDirectory(java.lang.String stack,
                             java.lang.String path,
                             java.lang.String directory)

  Deprecated.
  Add a file directory to the server
  Parameters:
    `path` - The path of the url to map
    `directory` - The name of the directory with the files to serve
  See Also:
    `PathMap`

### allowPut

    public void allowPut(java.lang.String stack,
                         java.lang.Boolean value)

  Deprecated.
  Set the allowPut option on the FileHandler for the server
  Parameters:
    `value` - The new value for the option
  See Also:
    `FileHandler`

### allowDelete

    public void allowDelete(java.lang.String stack,
                            java.lang.Boolean value)

  Deprecated.
  Set the allowDelete option on the FileHandler for the server
  Parameters:
    `value` - The new value for the option
  See Also:
    `FileHandler`

### addLog

    public void addLog(java.lang.String stack,
                       java.lang.String path,
                       java.lang.String log)
                throws java.io.IOException

  Deprecated.
  Add a log sink to the server
  Parameters:
    `path` - The path of the servlet (see PathMap for encoding)
    `log` - A file name or "err" or "out"
  See Also:
    `PathMap`

### addAuthRealm

    public void addAuthRealm(java.lang.String stack,
                             java.lang.String path,
                             java.lang.String name,
                             java.lang.String filename)
                      throws java.io.IOException

  Deprecated.
  Add a authentication realm to the server
  Parameters:
    `path` - The path of the realm (see PathMap for encoding)
    `name` - The name of the realm
    `filename` - The realm file
  See Also:
    `PathMap`

### addTranslation

    public void addTranslation(java.lang.String stack,
                               java.lang.String path,
                               java.lang.String translation)

  Deprecated.
  Add a URL translation
  Parameters:
    `stack` - The path of the handler stack to add to. A null stack is the same as "" or all paths.
    `path` - The path of the translation (see PathMap for encoding)
    `translation` - The new path
  See Also:
    `PathMap`

### addForward

    public void addForward(java.lang.String stack,
                           java.lang.String path,
                           java.lang.String url)
                    throws java.net.MalformedURLException

  Deprecated.
  Add a Forwarder
  Parameters:
    `stack` - The path of the handler stack to add to. A null stack is the same as "" or all paths.
    `path` - The path of the forward (see PathMap for encoding)
    `url` - The url to forward to
  See Also:
    `PathMap`

### addFilter

    public void addFilter(java.lang.String stack,
                          java.lang.String path,
                          java.lang.String filterClass)

  Deprecated.
  Add a Filter
  Parameters:
    `stack` - The path of the handler stack to add to. A null stack is the same as "" or all paths.
    `path` - The path of the filter (see PathMap for encoding)
    `filterClass` - the name of the filter class
  See Also:
    `PathMap`

### addProxy

    public void addProxy(java.lang.String stack)

  Deprecated.
  Add a Proxy
  Parameters:
    `stack` - The path of the handler stack to add to. A null stack is the same as "" or all paths.
  See Also:
    `PathMap`

### start

    public void start()
               throws java.lang.Exception

  Deprecated.
  Start serving

### join

    public void join()
              throws java.lang.InterruptedException

  Deprecated.
  join

### buildServers

    public static java.util.Hashtable buildServers(java.util.Properties props)
                                            throws java.lang.Exception

  Deprecated.
  Build a Hashtable of Server configurations from a server properties instance
  Parameters:
    `props` - The server properties
  Returns:
    Map of server name to server instances.

### main

    public static void main(java.lang.String[] args)

  Deprecated.
  main
  Parameters:
    `args` - optional property file name

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD