Oracle8i Oracle Servlet Engine User's Guide Release 3 (8.1.7) A83720-01 |
Library | Service | Contents | Index

# 6
OSE Server Configuration

This chapter uses examples and discussion to describe the OSE administration techniques and tools. The following topics are in this chapter:

- Setting Up OSE

- Create Services

- Create Domains

- Create Servlet Contexts

- Add Servlets

## Setting Up OSE

OSE is works through services that are configured to listen to end-points. In a service there are one or more domains. Domains contain one or more servlet contexts. Servlet contexts represents the Web application layer, containing servlets and various support entries.

The domain is configured to map virtual paths to servlet contexts. Servlet contexts are configured to map virtual paths to servlets.

Note: Refer to the Oracle Java Tools Reference for detailed information on the commands used in the following sections.

## Create Services

Define the basic level of a service, the service name, property groups, and the root location, with the `createwebservice` command. If you are creating a multi-domain service, this command also defines the IP address and virtual host name. Look at any configured service structure with the `getproperties` command.

    getproperties  /service/<service_name>

Use the `addendpoint` command to add a new endpoint dynamically with an existing database listener. You can also create a new endpoint statically.

## Create Domains

Create a Web domain with the `createwebdomain` command. A new Web domain is owned by the current schema that excuted the command. Servlets contained in this domain, are executed as the domain owner. Each Web domain is initialized with a servlet context,/`default`.

### Contexts Group

You can see the results of the configured domain structure by typing:

    getproperties <domainroot>/config

The context group lists the mappings between virtual paths and contexts that handle HTTP requests. It is a list of name-to-value pairs.

- The name part is a virtual path.

- The value part is the name of a context, relative to the contexts subdirectory of the Web domain.

This is a list of virtual paths mapped to the proper servlet contexts which service HTTP requests.

### MIME Group

The MIME group lists the extension to MIME type mappings that the Web domain supports.

## Create Servlet Contexts

Create servlet contexts with the `createcontext` command. A servlet context is contained in `contexts` directory within the domain root. You can configure the servlet context to support either stateless or stateful servlets.

You can see the results of the configured servlet context structure by typing:

    getproperties  <domainroot>/contexts/<servlet_context>/config

You can see the virtual mapping in the servlet context config object with:

getproperties <domainroot>/config

### MIME Group

The MIME group lists the extension to MIME type mappings that the Web server supports.

## Add Servlets

Publish a servlet by name in the servlet context with the `publishservlet` command. This command can also associate a virtual path with the named servlet. You can see the results of the configured service structure by typing:

    getproperties <domainroot>/contexts/<servlet_context>/named_servlets/<servletA>

You can see the virtual mapping in the servlet context config object with:

    getproperties <domainroot>/contexts/<servlet_context>/config

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index