BBjJettyContextConfiguration::getHeader

Description

In BBj 18.0 and higher, this method returns the value bound to the specified header.

Syntax

Return Value

Method

String

getHeader(string name)

Parameters

Variable

Description

name

The name of the header.

Return Value

Returns the value for the specified header.

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!
declare BBjJettyContextConfiguration bbjsp!
declare BBjVector names!
declare BBjNumber sz

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

names! = root!.getHeaderNames()

sz = names!.size()
if (sz) then
    for i = 0 to sz-1
        name$ = names!.get(i)
        value$ = root!.getHeader(name$)
        print name$ + " = " + value$
    next i
endif

See Also

BBjJettyContextConfiguration