BBjJettyServerConfiguration::addMimeType

Description

In BBj 19.0 and higher, this method adds a mime-type to jetty.xml. Mime-types are stored in jetty.xml and are applicable to all contexts.

Syntax

Return Value

Method

void

addMimeType(String extension, String type)

Parameters

Variable

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