BBjspRequestUtil::getURLDomainString


Description

In BBj 16.0 and higher this method returns the domain part the URL of the BBjspWebRequest.

Syntax

Return Value

Method

String

getURLDomainString(BBjspWebRequest request)

Parameters

Variable

Description

request

the Request

Return Value

a String containing the domain part

Remarks

None.

Example

CLASS PUBLIC MyServlet

    REM ===
    REM === You must implement this method as it is the main execution point.
    REM ===
    METHOD PUBLIC void service(BBjspServletContext context!)
        declare BBjspWebRequest request!
        declare BBjspWebResponse response!
        
        request! = context!.getRequest()
        response! = context!.getResponse()
        
        s! = response!.getOutputStream()
        s!.write("<html>")
        s!.write("<body>")
        s!.write("<h1>OK</h1>")
        s!.write(BBjspRequestUtil.getURLDomainString(request!))
        s!.write("</body>")
        s!.write("</html>")
        
    METHODEND
    
CLASSEND

See Also