View Source

                                                                                                                                                                                                                                                                                                                                      *Back to [[Book|Administrator's Configuration File Reference#cfr]]     [[Topic|Administrator's Configuration File Reference#chap6]]*
h2. Directives in {{obj.conf}}

The directives in {{obj.conf}} invoke functions known as Server Application Functions (SAFs). Each directive calls a function, indicating when to call it and specifying parameters for it.

The syntax of each directive is:
{code}
_Directive_ fn="_function_" _name1_="_value1_"..._nameN_="_valueN_"
{code}

The value of the function ({{fn}}) parameter is the name of the SAF to execute. All directives must supply a value for the {{fn}} parameter; if there is no function, the instruction will do nothing. The remaining parameters are the arguments needed by the function, and they vary from function to function.

For example:
{code}
NameTrans fn="document-root" root="D:/Sun/webserver7/https-server/docs"
{code}

In this example, the directive is executed during the {{NameTrans}} stage of request processing, and invokes the {{document-root}} SAF to specify the document root directory for the server. The {{document-root}} SAF parameter {{root}} specifies the path to the document root directory.

Parameters can contain references to variables and expressions. The variables can be predefined variables, variables defined at request time using the {{set-variable}} SAF, or variables defined in {{server.xml}}. For more information on the {{set-variable}} SAF, see [{{set-variable}}|Common SAFs across Multiple Directives#saf8]. For more information on defining variables in {{server.xml}}, see [{{variable}}|V & W#v1]. For more information on expressions and variables, see [Appendix A: Using Variables, Expressions, and String Interpolation|Administrator's Configuration File Reference#appA].

The server is shipped with a set of built-in SAFs that you can use to create and modify directives in {{obj.conf}}. [Predefined SAFs and Filters in obj.conf|Administrator's Configuration File Reference#chap7] discusses these SAFs in detail. You can also define new SAFs, as discussed in Creating Custom Server Application Functions in [Sun Java System Web Server NSAPI Developer's Guide|NSAPI Developer's Guide#Creating Custom Server Application Functions].

The {{magnus.conf}} file contains {{Init}} directive SAFs that initialize NASPI plug-ins. For more information, see [Predefined SAFs in magnus.conf|Administrator's Configuration File Reference#chap5].

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact