BBjJettyContextConfiguration::getJavaServlets


Description

In BBj 15.0 and higher, this method returns a BBjVector containing BBjJavaServletConfiguration objects for all the Java Servlets in the context

This provides the ability to deploy 3rd party servlets within the integrated Jetty Server.

Syntax

Return Value

Method

BBjVector

getJavaServlets()

Parameters

None.

Return Value

a BBjVector of BBjJavaServletConfiguration objects

Remarks

Although you can configure a Java Servlet to be loaded, there may be circumstances where the servlet attempts some operations that are not permitted in BBj.

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

BBjAPI

BBjJettyContextConfiguration

BBjVector

BBjJavaServletConfiguration