BBjJettyServerConfiguration::addMimeType

Description

In BBj 19.00 and higher, this method adds a MIME type to jetty.xml.

MIME types are stored as mime-type elements in jetty.xml and are applicable to all contexts.

Syntax

Return Value

Method

void

addMimeType(String extension, String type)

Parameters

Parameter

Description

extension

The document extension.

type

The MIME type to be sent to the browser.

Return Value

None.

Example

declare BBjAPI api!
declare BBjAdmin admin!
declare BBjJettyServerConfiguration config!

api! = BBJAPI()
admin! = api!.getAdmin("admin","admin123")
config! = admin!.getJettyServerConfig()
config!.addMimeType("custom","application/x-custom-type")

See Also

BBjJettyServerConfiguration::removeMimeType

BBjJettyServerConfiguration::getMimeTypes