Sun Java System Web Server 6.1 SP11 NSAPI Programmer's Guide

Order of Directives

The order of directives is important, since the server executes them in the order they appear in obj.conf. The outcome of some directives affect the execution of other directives.

For PathCheck directives, the order within the PathCheck section is not so important, since the server executes all PathCheck directives. However, the order within the ObjectType section is very important, because if an ObjectType directive sets an attribute value, no other ObjectType directive can change that value. For example, if the default ObjectType directives were listed in the following order (which is the wrong way around), every request would have its type value set to text/plain, and the server would never have a chance to set the type according to the extension of the requested resource.

ObjectType fn="force-type" type="text/plain"
ObjectType fn="type-by-extension"

Similarly, the order of directives in the Service section is very important. The server executes the first Service directive that matches the current request and does not execute any others.