BBjJettyContextConfiguration::addBBjServlet (Deprecated)

BBjJettyContextConfiguration::addBBjServlet is deprecated for BBj 21.00 and higher, and have been replaced by BBjJettyContextConfiguration::addBBxServlet.

Description

In BBj 15.0 and higher, this method is used to configure a new BBjServlet within the current Context.

Syntax

Return Value

Method

BBjServletConfiguration

addBBjServlet(string name, string program, string config)

Parameters

Variable

Description

config

the full /path/to/config.bbx

name

the name of the servlet

program

the program filename

Return Value

a new BBjServletConfiguration object

Remarks

None.

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()

rem '-- Add a new servlet to the root context
root!.addBBjServlet("MyServlet","MyServlet.bbj","C:/bbj/cfg/config.bbx")
config!.saveConfig()

See Also

BBjAPI

BBjJettyContextConfiguration

BBjServletConfiguration