BBjspCommandConfig::addForward (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 16.20 and higher, this method returns a new BBjspCommandForward and adds it to the BBjspCommandConfig

Syntax

Return Value

Method

BBjspCommandForward

addForward(string name, string path, boolean redirect)

BBjspCommandForward

addForward(string name, string path, string pipeline, boolean redirect)

Parameters

Variable

Description

name

the name of the forward

path

the path part of the forwards URI

pipeline

the pipeline to execute when command completes.

redirect

should the forward redirect to the new page

Return Value

a BBjspCommandForward

Remarks

None.

Example

declare BBjAPI api!
declare BBjAdmin admin!
declare BBjJettyServerConfiguration config!
declare BBjJettyContextConfiguration context!
declare BBjspCommandConfig commandCfg!

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

vect! = context!.getCommandConfigs()

if (vect!.size()) then
    for i = 0 to vext!.size()-1
        commandCfg! = cast(BBjspCommandConfig,vect!.get(i-1))
        commandCfg!.addForward("GOHOME","/",true)
    next i
endif
config!.saveConfig()

See Also

BBjspCommandConfig

BBjspCommandForward