BBjAppServer::addStaticResource

Description

In BBj 12.0 and higher, this method adds the contents of the file represented byfileNameto the set of static resources in the BBjAppServer. If the MIME typemimeTypeis not specified, an automatically detected MIME type is used.

Syntax

Return Value

Method

BBjResourceUrl

addStaticResource(string fileName)

BBjResourceUrl

addStaticResource(string fileName, string mimeType)

Parameters

Variable

Description

fileName

The fully-qualified filename.

mimeType

The MIME type of the file.

Return Value

Returns a BBjResourceUrl corresponding to the contents of the file at the time this method was invoked.

Remarks

None.

Example

rem ' BBjAppServer:addStaticResource

admin! = bbjapi().getAdmin("admin","admin123")
appServer! = admin!.getWebAppServer()
basis$ = System.getProperty("basis.BBjHome")
filename$ = basis$ + "/perfanalyzer/_prof_icon.png"
resource! = appServer!.addStaticResource(filename$,"image/png")
print "addStaticResource ",resource!

See Also

BBjAPI

BBjAppServer

BBjAppServer::addApplicationIcon

BBjAppServer::addStyleSheet

BBjAppServer::getStaticResources

BBjAppServer::removeStaticResource

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.