David,
I can't answer all your questions; however, I would strongly recommend that
you take a look at the com.oreilly.servlet package, http://servlets.com
There is a utility class in this package called HttpMessage which will allow
you to create either GET or POST style requests to another URL. You setup
the request using a Properties object and the response from the web site
comes back in an input stream.

I have used this object on a number of projects and find it simplifies
things considerably.

The one thing you might want to look into is the log-in issue. The version
of HttpMessage I have doesn't allow you to set a value for the
authentication header. I was planning to add this ability myself because I
have a need to access such a site but I haven't gotten it done yet.

----- Original Message -----
From: [David Griffin] <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 18, 1999 10:51 PM
Subject: Visiting other sites from Servlet


> Let's say I want my servlet to visit a site, log in, fill in  form, log
out,
> then return some data to the original visitor.
>
> First I need to be able to fill in UID and password and kick off the login
> form action of the other site.
>
> then start receiving bytes as it returns me the "welcome" page.
>
> Then do I have to wait till it is finished showing me the form before I
> throw a formful of data back at it ?
> Then when it returns saying "thanks" I have to log out.  Again, do I have
to
> wait till it has finished sending me stuff back or can I just go ahead ?
>
> How can I know a page has stopped replying?
>
> And all this time, i want the original visitor to be told
>
> "Please wait a moment or two"
> then
> "OK, finished".
>
> So can a servlet go
>
> out.println("Please wait !");
> out.flush();
>
> then 10s later force a redirect to a "done it" page ?
>
> Thanks
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to