BBjspServletConfiguration::getParameter (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 17.0 and higher, this method the parameter value bound to the supplied name.

Syntax

Return Value

Method

String

getParameter(string name)

Parameters

Variable

Description

name

the name of the parameter to retrieve

Return Value

the parameter value

Remarks

parameters provide a configurable input to a BBjspServlet.

Example

declare BBjAPI api!
declare BBjAdmin admin!
declare BBjJettyServerConfiguration config!
declare BBjJettyContextConfiguration root!
declare BBjspServletConfiguration servletConfig!

api! = BBJAPI()
admin! = api!.getAdmin("admin","admin123")
config! = admin!.getJettyServerConfig()
root! = config!.getCustomContext("store")

vect! = root!.getBBjspServletMappings()

if (vect!.size()) then
    for i = 0 to vect!.size()-1
        mapping$ = vect!.get(i)
        servletConfig! = root!.getBBjspServlet(mapping$)
        print servletConfig!.getMapping() + " = " + servletConfig!.getSourceName() + "::" + servletConfig!.getClassName()

        str$ = servletConfig!.getWorkingDir()
        if str$ <> "" print " Working Directory:"+str$
        
        str$ = servletConfig!.getTerminalAlias()
        if str$ <> "" print " Terminal Alias:"+str$
        
        str$ = servletConfig!.getConfig()
        if str$ <> "" print " Config:"+str$
        
        str$ = servletConfig!.getUser()
        if str$ <> "" print " User Name:"+str$
        
        params! = servletConfig!.getParamaterNames()
        if params!.size()
            for j = 0 to params!.size()-1
                paramName$ = params!.get(j)
                print " PARAM " + paramName$ + " = " + servletConfig!.getParameter(paramName$)
            next j
        endif
    next i
endif

See Also

BBjspServletConfiguration