Editing obj.conf

                                                                                                                                                                                                                                                                                                                                      Back to [Book]     [Topic]

Editing obj.conf

Be very careful when editing this file. Simple mistakes can make the server fail to start or operate correctly.

Order of Directives

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

For PathCheck directives, the order within the PathCheck section is not so important because 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 are listed in the following order (which is the incorrect way), every request will have its type value set to text/plain, and the server will not 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 the others.

Parameters

The number and names of parameters depend on the function. The order of parameters on the line is not important.

Case Sensitivity

Items in the obj.conf file are case-sensitive including function names, parameter names, parameter values, and path names.

Separators

The C language allows function names to be composed only of letters, digits, and underscores. You may use the hyphen ( - ) character in the configuration file in place of underscore ( _ ) for your C code function names. This is only true for function names.

Quotation Marks

Quotation marks (“) are only required around the value strings when there is a space in the string. Otherwise, they are optional. Each open quotation mark must be matched by a closed quotation mark.

Spaces

  • Spaces are not allowed at the beginning of a line except when continuing the previous line.
  • Spaces are not allowed before or after the equal ( = ) sign that separates the name and value.
  • Spaces are not allowed at the end of a line or on a blank line.

Line Continuation

A long line may be continued on the next line by beginning the next line with a space or tab.

Path Names

Always use forward slashes ( / ) rather than backslashes ( \ ) in path names on the Windows platform. A backslash escapes the next character.

Comments

Comments begin with a pound ( # ) sign. If you manually add comments to obj.conf, then use the Admin Console or CLI to make changes to your server, your comments are overwritten when obj.conf is updated.

Labels

configurationfile configurationfile Delete
+configguide +configguide Delete
java java Delete
server server Delete
configuration configuration Delete
administrator's administrator's Delete
sun sun Delete
webserver webserver Delete
application application Delete
system system Delete
guide guide Delete
file file Delete
webserver70 webserver70 Delete
sunjava sunjava Delete
web web Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


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