BBjServletConfiguration::getName (Deprecated)

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

Description

In BBj 15.00 and higher, this method gets the name of a BBj Servlet and forms part of the URL.

Syntax

Return Value

Method

string

getName()

Parameters

None.

Return Value

Returns the name of the servlet.

Remarks

The name cannot be set once the servlet has been created.

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 '-- Get ALL the servlets from the root context and print their configuration
vect_servlets! = root!.getServlets()
sz = vect_servlets!.size()
if (sz) then
    for i = 0 to sz-1
        declare BBjServletConfiguration servletConfig!
        servletConfig! = cast(BBjServletConfiguration,vect_servlets!.get(i))
        print "SERVLET NAME:" + str(servletConfig!.getName())
        print "SERVLET PROGRAM:" + str(servletConfig!.getProgram())
        print "SERVLET CONFIG:" + str(servletConfig!.getConfig())
    next i
endif

See Also

BBjAPI

BBj Servlet

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.