The Object Tag

Directives in the obj.conf file are grouped into
objects that begin with an <Object> tag and end with
an </Object> tag. The default object provides instructions
to the server about how to process requests by default. Each new object modifies
the default object’s behavior.

An Object tag may have a name attribute or a ppath attribute.
Either parameter may be a wildcard pattern. For example:

<Object name="cgi">

- or -

<Object ppath="/usr/sun/webserver61/server1/docs/private/*">

The server always starts handling a request by processing the directives
in the default object. However, the server switches to processing directives
in another object after the NameTrans stage of the default
object if either of the following conditions is true:

The successful NameTrans directive specifies
a name argument.

The physical path name that results from the NameTrans stage
matches the ppath attribute of another object.

When
the server has been alerted to use an object other than the default object,
it processes the directives in the other object before processing the directives
in the default object. For some steps in the process, the server stops processing
directives in that particular stage (such as the Service stage)
as soon as one is successfully executed, whereas for other stages the server
processes all directives in that stage, including the ones in the default
object as well as those in the additional object. For more details, see Flow of Control in obj.conf.

Objects that Use the name Attribute

If a NameTrans directive in the default object specifies
a name argument, the server switches to processing the
directives in the object of that name before processing the remaining directives
in the default object.

For example, the following NameTrans directive in
the default object assigns the name cgi to any request
whose URL starts with http://server_name/cgi/:

When that NameTrans directive is executed, the server
starts processing directives in the object named cgi:

<Object name="cgi">
more directives...
</Object>

Objects that Use the ppath Attribute

When the server finishes processing the NameTrans directives
in the default object, the logical URL of the request will have been converted
to a physical path name. If this physical path name matches the ppath attribute
of another object in obj.conf, the server switches to processing
the directives in that object before processing the remaining ones in the
default object.

For example, the following NameTrans directive translates
the http://server_name/ part
of the requested URL to D:/Sun/WebServer61/server1/docs/ (which
is the document root directory):

The URL http://server_name/internalplan1.html would be translated to D:/Sun/WebServer61/server1/docs/internalplan1.html. However, suppose that obj.conf contains the
following additional object:

<Object ppath="*internal*">
more directives...
</Object>

In this case, the partial path *internal* matches
the path D:/Sun/WebServer61/server1/docs/internalplan1.html. So
now the server starts processing the directives in this object before processing
the remaining directives in the default object.