On Tue, 20 Jul 1999, Craig R. McClanahan wrote:

> A "document base" is in fact a directory in both of these cases, because you
> are declaring something equivalent to the "DocumentRoot" configuration
> parameter in Apache.  However, you have several choices in how you actually
> set this value.  Consider the following examples:
>
> * server.webapp.examples.docbase=examples
>
>     "examples" must be a directory relative to the current
>     working directory when you execute the startserver script.
>
> * server.webapp.examples.docbase=/my/path/to/examples
>
>     This is an absolute path to a directory, on the same server,
>     that contains the document tree for this context.  There
>     must be a WEB-INF subdirectory here containing the configs
>     for the servlets in this context.

I tried this and had severe difficulties with is.  The resulting path for
the work directories had 2 consecutive slashes and couldn't find the file
to compile.

> * server.webapp.examples.docbase=http://www.mycompany.com
>
>     Use an existing web server as the "document root" for this
>     servlet context, which lets you access files (HTML pages, JSP
>     pages, whatever) on a different server in a distributed environment.
>     No changes at all to your servlets are required, as long as you are
>     using ServletContext.gerResource() instead of
>     ServletContext.getRealPath() to access these resources.
>
> * server.webapp.examples.docbase=xyz://.....
>
>     You can define your own URLStreamHandler for scheme "xyz:"
>     and access resources from a database, from a JAR file, or whevever,
>     in a manner totally independent of the underlying protocol.
>     Again, the servlet source code doesn't change at all -- this
>     is a configuration setting for the context in which the servlet runs.

Anyone know of a JAR scheme handler?  That'd be really cool.

John K Peterson  --  IT Services Development  --  Brigham Young University
Internet: [EMAIL PROTECTED]                      Phone: (801) 378-5007

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to