NetREXX servlets

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NetREXX servlets

Paul Zarnowski
Has anyone written servlets using NetREXX?
If anyone has a simple one they could show me, I'd appreciate it.
I'm trying to do this using WebSphereAS & Apache on an AIX box.
I can compile the servlet, but can't run it (or don't know how to).

Thanks.
..Paul


--
Paul Zarnowski                         Ph: 607-255-4757
747 Rhodes Hall, Cornell University    Fx: 607-255-8521
Ithaca, NY 14853-3801                  Em: [hidden email]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetREXX servlets

dIon Gillard/Multitask Consulting/AU
I've written quite a few servlets in NetRexx, it does the job well. To run
them, configure the servlet as you would any other, but make sure
NetRexxR.zip is in the servlet engine's classpath configuration.

Sure....here's a simple example.
/*
Ported from Suns SimpleServlet in the JSDK.
 */

import java.io.

import javax.servlet.
import javax.servlet.http.


/**
 * This is a simple example of an HTTP Servlet.  It responds to the GET
 * and HEAD methods of the HTTP protocol.
 */
class SimpleNrx extends HttpServlet

    /**
     * Handle the GET and HEAD methods by building a simple web page.
     * HEAD is just like GET, except that the server returns only the
     * headers (including content length) not the body we write.
     */
    method doGet(request=HttpServletRequest, response=HttpServletResponse)
signals ServletException, IOException
 
        title = "NetRexx Simple Servlet Output";

        -- set content type and other response header fields first
                response.setContentType("text/html");

        -- then write the data of the response
        out = response.getWriter();


                out.println("<HTML><HEAD><TITLE>");
        out.println(title);
        out.println("</TITLE></HEAD><BODY>");
        out.println("<H1>" title "</H1>");
        out.println("<P>This is output from a NetRexx Servlet.");
        loop i = 1 to 10
                out.println("Please wait..."i);
                out.flush()
        end
        out.println("</BODY></HTML>");
        response.sendRedirect("file:///c|/jdk1.2/docs/index.html")
        --out.close();






Paul Zarnowski <[hidden email]> on 06/02/99 10:18:21 AM




To:
[hidden email]
cc:
(bcc: dIon Gillard/Multitask Consulting/AU)


Subject:
NetREXX servlets





Has anyone written servlets using NetREXX?
If anyone has a simple one they could show me, I'd appreciate it.
I'm trying to do this using WebSphereAS & Apache on an AIX box.
I can compile the servlet, but can't run it (or don't know how to).

Thanks.
.Paul


--
Paul Zarnowski                         Ph: 607-255-4757
747 Rhodes Hall, Cornell University    Fx: 607-255-8521
Ithaca, NY 14853-3801                  Em: [hidden email]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note
to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>