Generating the Server Response Using the MIME Type

                                                                                                                                                                                                                                                                                                                                      Back to [Book]     [Topic]

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:

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

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:

type=magnus-internal/imagemap       exts=map
type=magnus-internal/cgi            exts=cgi,exe,bat

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

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
webtier webtier 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