BBjJettyContextConfiguration::addBBjspServlet

BBjJettyContextConfiguration::addBBjspServlet is deprecated for BBj 21.00 and higher, and have been replaced by BBjJettyContextConfiguration::addBBxServlet.

Description

In BBj 17.00 and higher, this method is used to configure a new BBJSP Servlet within the current Context.

Syntax

Return Value

Method

BBjspServletConfiguration

addBBjspServlet(string classname, string mapping, string source)

BBjspServletConfiguration

addBBjspServlet(string classname, string mapping, string source, string config)

Parameters

Variable

Description

classname

the name of the class

config

the full /path/to/config.bbx

mapping

the URI to the servlet

source

the program filename

Return Value

a new BBjServletConfiguration object

Remarks

None.

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!.getRootContextInfo()
servletConfig! = root!.addBBjspServlet("MyServlet","/myservlet","MyServlet.bbj")
servletConfig! = root!.getBBjspServlet("/myservlet")
servletConfig!.addParam("param","value")
servletConfig!.setConfig("/path/to/config.bbx")
servletConfig!.setTerminalAlias("termAlias")
servletConfig!.setWorkingDir("/path/to/working/directory")
config!.saveConfig()

See Also

BBjAPI

BBjJettyContextConfiguration

BBjspServletConfiguration

BBJSP Servlet

BBjAPI

BBjJettyContextConfiguration

BBjspServletConfiguration

BBJSP Servlet