[Opensource] call a Servllet from a PL/SQL

pierre.damas at damas.be pierre.damas at damas.be
Wed Jan 22 11:53:38 PST 2003


Alejandra,

I suppose you are using Oracle.
You can use the UTL_HTTP package to issue http requests to your servlet.

If length of the returned html/xml is greater than 2000, use
UTL_HTTP.REQUEST_PIECES, like below, else use UTL_HTTP.REQUEST (only 2000
bytes)

It is of course up to you to parse the response from the strings of 2000
bytes.

It is available in Oracle 8i and 9i.  In 9i, it has been enhanced to support
- Post
- Authentication
- Access to return status code
- RAW reply

Pierre A.

DECLARE
pieces utl_http.html_pieces;
BEGIN
pieces := UTL_HTTP.REQUEST_PIECES('
http://www.myserver.org/myservlet?param1=x&param2=y');
FOR i in 1 .. pieces.count loop
.... -- process each piece
END LOOP;
END;

----- Original Message -----
From: "Xiaoyu Zhang" <xiaoyu_ustc at hotmail.com>
To: <opensource at jcorporate.com>
Sent: Wednesday, January 22, 2003 5:23 AM
Subject: Re: [Opensource] call a Servllet from a PL/SQL


>
> Why do you want to do that? You can use servlet as a normal java class.
But
> servlet is most useful in servlet container context.
>
> If your PL/SQL want to deliver some request to a servlet page, you can use
a
> java object in PL/SQL, which open a URL connection and deliver request
> there.
>
>
>
>
>
> >From: "Alejandra Morales Jaramillo" <alemorales at telesat.com.co>
> >Reply-To: opensource at jcorporate.com
> >To: <opensource at jcorporate.com>
> >Subject: [Opensource] call a Servllet from a PL/SQL
> >Date: Tue, 21 Jan 2003 10:37:57 -0500
> >
> >Hi, Ilian.
> >
> >I want call a servlet from a PL/SQL. I can't find information about this.
i
> >find information about call a PL/SQL from a JSERVLET but i want to do the
> >opposite.
> >
> >Regards,
> >
> >Alejandra Morales.
>
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list