BBjspWebResponse::getOutputStream (Deprecated)

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

Description

In BBj 16.0 and higher, this method gets an OutputStream that can be used to send binary data direct to the client.

Syntax

Return Value

Method

javax.servlet.ServletOutputStream

getOutputStream()

Parameters

None.

Return Value

the OutputStream associated with this BBjspWebResponse

Remarks

Example

This example demonstrates how this works in a BBJSP servlet

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!
        declare BBjspSessionData data!
        
        request! = context!.getRequest()
        response! = context!.getResponse()
        data! = context!.getBBjspSession()

        s! = response!.getOutputStream()
        s!.write("<html>")
        s!.write("<body>")
        s!.write("<h1>OK</h1>")
        s!.write("</body>")
        s!.write("</html>")
        
    METHODEND
    
CLASSEND

See Also

BBJSP

BBjspWebRequest

BBjspWebResponse