BBjJettyContextConfiguration::setHeader


Description

In BBj 18.0 and higher, this method configures a header for the BBjJettyContext.

Syntax

Return Value

Method

void

setHeader(string name, string value)

Parameters

Variable

Description

name

The name of the header.

value

The value of the header.

Return Value

None.

Remarks

Headers stored in the context are sent to the client for in all Http Responses. Parameters are name and value pairs of Strings.

Example

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

api! = BBJAPI()
admin! = api!.getAdmin("admin","admin123")
config! = admin!.getJettyServerConfig()
root! = config!.getRootContextInfo()

root!.setHeader("myheader","some value")

condig!.saveConfig()

See Also

BBjAPI

BBjJettyContextConfiguration