BBjServletRegistry::publish (Deprecated)

BBjServlets are deprecated for BBj 21.00 and higher, and have been replaced by BBxServlets.

Description

In BBj 12.00 and higher, this method publishes a servlet to the web server path. If no context is specified, then the root context is assumed.

Syntax

Return Value

Method

BBjApplication

publish(string path,BBjAppConfig appConfig)

BBjApplication

publish(string contextName, string path, BBjAppConfig appConfig)

Parameters

Variable

Description

path

The partial path the web server will associate with this application.

appConfig

The application configuration to run when a browser requests the specified path.

contextName

The name of the application context.

Return Value

Returns the published BBjApplication.

Remarks

None.

Example

admin! = bbjapi().getAdmin("admin","admin123")
appServer! = admin!.getWebAppServer()
appConfig! = appServer!.makeEmptyAppConfig()
appConfig!.setProgramName("servlet.bbj")
registry! = admin!.getServletRegistry()
registry!.unpublish("/example",err=*next)
registry!.publish("/example",appConfig!)

See Also

BBjAPI

BBjAdmin

BBjApplication