BBjJavaServletConfiguration::getParameterNames


Description

In BBj 15.0 and higher, this method returns the configured parameters for a servlet.

Syntax

Return Value

Method

BBjVector

getParameterNames()

Parameters

None.

Return Value

a BBjVector containing the names of parameters

Remarks

The parameters are a name-value pair

Example

declare BBjAPI api!
declare BBjAdmin admin!
declare BBjJettyServerConfiguration config!
declare BBjJettyContextConfiguration root!
declare BBjVector vect_servlets!
declare BBjNumber sz
api! = BBJAPI()
admin! = api!.getAdmin("admin","admin123")
config! = admin!.getJettyServerConfig()
root! = config!.getRootContextInfo()

rem '-- Get ALL the Java servlets from the root context and print their configuration
vect_servlets! = root!.getJavaServlets()
sz = vect_servlets!.size()
if (sz = 0) then
    for i = 0 to sz-1
        declare BBjJavaServletConfiguration servletConfig!
        servletConfig! = cast(BBjJavaServletConfiguration,vect_servlets!.get(i))
        print servletConfig!.getClassName()
        print servletConfig!.getMapping()
        declare BBjVector vectParamNames!
        vectParamNames! = servletConfig!.getParameterNames()
        sz = vectParamNames!.size()
        if (sz) then
            for i = 0 to sz-1
                name$ = vectParamNames!.get(i)
                print name$ + " -> " + servletConfig!.getParameter(name$)
            next i
        endif
    next i
endif

See Also

BBjVector

BBjJavaServletConfiguration::getParameterValue()