Conor Kelly wrote:
>
> Does anybody know how I would go about communicating
> between a program and a java servlet. I want to upload
> data from my program into the database that the website
> runs off and also download data from the database to the
> program.
Servlets speak HTTP. All you need to do is open a socket to the servlet
url & port and send a message to the servlet using HTTP protocol.
You can try it out a simple example using a command line. Open a telnet
connection like this:
telnet www.yahoo.com 80
Now enter the following:
GET / HTTP/1.0
and press RETURN twice. The yahoo server sends back the html page that
corresponds to the resource / at www.yahoo.com. This page is the same as
typing http://www.yahoo.com:80 into a browser.
For a servlet, the technique is the same. Open a socket connection to
the servlet url, send the data expected by the servlet, get the response
from the socket.
Here's more information on HTTP: http://www.jmarshall.com/easy/http/
___________________________________________________________________________
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