BBjJavaServletConfiguration

Description

In BBj 15.0 and higher, the JavaServletConfiguration is used to configure a Java based servlet within a context.

Creation

BBjAPI > BBjAdmin > BBjJettyServerConfiguration > BBjJettyContextConfiguration > BBjJavaServletConfiguration

The BBjJavaServletConfiguration is created through the following BBjJettyContextConfiguration methods:

Return Value

Method

BBjJavaServletConfiguration

addJavaServlet(string name, string mapping)

BBjJavaServletConfiguration

getJavaServlet(string name, string mapping)

Methods of BBjJavaServletConfiguration

Return Value

Method

void

deleteParameter(string name)

string

getClassName()

string

getMapping()

BBjVector

getParameterNames()

string

getParameterValue(string name)

void

setParameter(string name, string value)

Remarks

None.

Constants

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()
    next i
endif

See Also