BBjServletRegistry::unpublish (Deprecated)

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

Description

In BBj 12.0 and higher, this method removes a published servlet from the web server. If no context is specified, then the root context is assumed.

Syntax

Return Value

Method

BBjApplication

unpublish(string path)

BBjApplication

unpublish(string contextName, string path)

Parameters

Variable

Description

path

The partial path to remove from the registry.

contextName

The name of the application context.

Return Value

Returns the unpublished 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

BBjApplication