View Source

                                                                                                                                                                                                                                                                                                                                      *Back to [[Book|Administrator's Configuration File Reference#cfr]]     [[Topic|Administrator's Configuration File Reference#chap8]]*
h2. Generating the Server Response Using the MIME Type

The server considers the value of the {{type}} attribute when deciding which {{Service}} directive in {{obj.conf}} to use to generate the response to the client.

By default, if the {{type}} does not start with {{magnus-internal/}}, the server sends the requested file to the client. The directive in {{obj.conf}} that contains this instruction is:

{code} {{Service method=(GET|HEAD|POST) type=*~magnus-internal/* fn=send-file}} {code}

By convention, all values of {{type}} that require the server to do something other than just send the requested resource to the client start with {{magnus-internal/}}.

For example, if the requested resource’s file extension is {{.map}}, the type is mapped to {{magnus-internal/imagemap}}. If the extension is {{.cgi,}} {{.exe}}, or {{.bat}}, the type is set to {{magnus-internal/cgi}}:
{code}
type=magnus-internal/imagemap exts=map
type=magnus-internal/cgi exts=cgi,exe,bat
{code}



If the {{type}} starts with {{magnus-internal/}}, the server executes whichever {{Service}} directive in {{obj.conf}} matches the specified type. For example, if the type is {{magnus-internal/imagemap}}, the server uses the {{imagemap}} function to generate the response to the client, as indicated by the following directive:

{{Service method=(GET|HEAD) type=magnus-internal/imagemap fn=imagemap}}

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