/* NetRexx */ options replace format comments java crossref symbols binary class RHelloWorldWebServer public properties public constant isTrue = boolean (1 == 1) isFalse = boolean (1 \== 1) greeting1 = "Goodbye, World!" greeting2 = '' - || 'HTTP/1.1 200 OK\r\n' - || 'Content-Type: text/html; charset=UTF-8\r\n\r\n' - || '\r\n' - || '\r\n' - || '\r\n' - || '
\r\n' - || 'Hello\r\n' - || '\r\n' - || '
\r\n' - || '\r\n' - || '

' || greeting1 || '

\r\n' - || '\r\n' - || '\r\n' - || '' properties static inheritable terminate = isFalse -- TODO: provide a less draconian means to terminate the listener loop method main(args = String[]) public static signals IOException listener = ServerSocket(8080) loop label listener forever if terminate then leave listener sock = listener.accept() PrintWriter(sock.getOutputStream(), isTrue).println(greeting2) sock.close() end listener return