... *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}}. Chapter 7, [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 _Chapter 2, Creating Custom Server Application Functions_ in [Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide|http://docs.sun.com/doc/820-6606/abvcu?a=view]. |
| 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
_Chapter 5_,
[Predefined SAFs in magnus.conf|Administrator's Configuration File Reference#chap5]. |