Jason Hunter's book has some examples that should help. Also "Java Examples
in A Nutshell" from O'Reilly has some good stuff on getting the results of
an http request from Java code.

Most easily you could try:
                URL u = new URL(resource);
                DataInputStream in = new DataInputStream(u.openStream());
                String s;
                while ((s = in.readLine()) != null){
                        // do something with it;
                }
                in.close();
where resource is a url of your servlet + query string that you build up to
give it arguments.

***********************************************************
Brett Knights                             626-432-5767 work
[EMAIL PROTECTED]                 626-355-1017 home
***********************************************************


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jihad J.
> Richa
> Sent: Monday, May 17, 1999 3:03 AM
> To: Java Apache Users
> Subject: Java and JServ
>
>
> Dear all,
>
> My question is more of a Java question, but I did not know
> who to turn to!
>
> I am trying to build an applet that needs to connect to the
> several remote
> and local DBMSs (3 remote and 1 local) for data retrieval in
> response to a
> user input request.
>
> Since I am new to this, I thought using a servlet engine (JServ) would
> allow me to do that.  But all I can figure out is that the
> servlet can only
> respond to the browser with a message of some sort to be
> displayed (the
> JSDK documentation also talked about MIME, but I am not sure
> how that could
> be used.)  Idealy what I would like to do is have the servlet
> return the
> data elements the user requested from the DBMS (just to fill the empty
> fields in the displayed applet after the user submits the query.)
>
> Can this be done using a Servlet in conjuction with JServ ? and How ?
> If not what tools should I be using to do that ?
>
> Thank you all in advance.
>
> Jihad
>
>
> ----------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> READ THE FAQ!!!!     <http://java.apache.org/faq/>
> Archives and Other:  <http://java.apache.org/main/mail.html/>
> Problems?:           [EMAIL PROTECTED]
>
>



-- --------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to