"Brian P. Rickabaugh" wrote:

>  Hello all:I've seen this mentioned several times but I don't know if
> I've ever seen a definitive answer.I have 2 servers and 1 servlet on
> each each server.  What is the _best_ way to have them communicate?
> Is my only hope HTTP?Thanks,Brian

What (besides HTTP) would you suggest?  After all, that's what (most)
servlets do -- answer HTTP requests!

As it happens, making HTTP requests from one servlet to another is
really easy, using the java.net.URLConnection or
java.net.HttpURLConnection classes that are built in.  The Javasoft
online tutorial has some good examples of how to do this.

Using HTTP means you are "limited" to the normal request/response
paradigm, of course.  If you need more interactivity than that with the
second server, you might investigate making your application on that
machine an RMI or CORBA-based server object, or an EJB, instead of a
servlet.  Then, you can essentially call the remote methods directly.

Craig McClanahan

___________________________________________________________________________
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