![]() |
|||
| --> | --> | Manage | --> | |||||
public_html.
You can change this directory to be any directory you choose,
for example, a docs directory inside your own
home directory.
Suppose you are the user galileo on the machine
venus, you could set your Document Root Directory to
/home/galileo/docs. Then, to access this directory,
you would simply type the URL:
http://venus:8080
If the directory path is entered with a leading slash(/) it is considered to be an absolute directory (that is, off of the root of the server machine). If the directory path is entered without a leading slash, it is considered to be a relative directory (that is, off of the root of the webserver installation).
For example, the default CGI directory is
the relative directory cgi-bin. With no leading slash,
the full path is constructed as
server_root/cgi-bin, where server_root
is the location of the installed Java Web Server.
(The CgiServlet allows you to run your CGI scripts unchanged. Its bindir
argument, which defines where to locate your CGI scripts, is also set by
default to the cgi-bin directory.)
You may specify one or more default files. When someone connects to a directory on your machine without providing a filename, Java Web Server will search the directory looking for a matching filename to the default files you have listed. It searches for files in the order you have indicated.
For example, if you list myfile.html, index.html,
and index.htm, whenever someone connects to a directory
without specifying a filename, the Java Web Server will search for
myfile.html and display it if found. If the directory
does not have a myfile.html file, the Java Web Server
will search for index.html. If neither file is in the
directory, it will search for index.htm.
To illustrate, if your machine name is venus, and
you define the space.html as your default file (and
set the document root directory to /home/galileo),
then type the URL:
http://venus:8080you will display the file
/home/galileo/space.html if the file
exists in the directory.
If there is no file defined in the Welcome Files field, when a user connects without specifying a file name (to a directory for which Directory Access is on), all files in the directory will be listed by Java Web Server.
The Java Web Server provides support for HTTP 1.1 content negotiation. This is done using the Accept-* headers provided by the browser. The web server provides a policy for naming documents to support multiple language and character sets.To implement this policy, the server provides the notion of a default language for the website as well as other supported languages. For example, if your website's default language is US-English (en-us) and the website also suppports French (fr) and Japanese (jp), you would enter
en-usin the Default Language field andfr, jpin the Supported Languages field.In this example, if the browser now requests index.html and sends a languages preference of en-us (the site's default language) in the Accept-Language header, the server will try to retrieve the file unchanged (index.html). If, however, the browser requests a supported language (such as jp for Japanese), the server will append the Japanese extension to the filename and try to retrieve index.html.jp.
index.html (or
whatever you have entered in the index.html field)
that can be displayed when an HTTP connection is made to your
Java Web Server, a list of the files in the directory will be
displayed instead.
index.html
file (or substitute file) to be displayed when an HTTP connection
is made, the directory files will not be displayed, and the user
attempting to make the connection will not be granted access to
your Java Web Server.The archives directory is located at server_root/archives.
If the server is used often for DELETE and PUT operations, the number
of files stored in the archives directory can take up a lot of disk
space. That is why the ability to purge the directory is provided.
The only caution in removing the archives directory is to note that this operation deletes them permanently. If you back up your server's file system on a regular basis, deleting the archive directory should not be a concern because your backups will provide a way for you to retrieve the deleted archives files should the need arise.
Top
java-server-feedback@java.sun.com
|
Copyright © 1999
Sun Microsystems, Inc. All Rights Reserved. |