| Author |
exact API for java stand-alone application talk to servlet
|
Ruilin Yang
Ranch Hand
Joined: Jan 06, 2002
Posts: 150
|
|
Hi Please help me I would like to talk to a servlet from a java stand-alone application (richer graphic. What are exact API at both client side and the server side ? Thanks Ruilin Yang
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
On the client side you are looking at creating a URLConnection to the URL of a servlet, opening a stream, writing a request and reading a response stream. URLConnection is in the java.net package, part of the standard SDK library. The alternative would be to open a socket, but URLConnection is simpler. On the server side you are obviously talking about a class derived from HttpServlet. You can download Tomcat and get the API docs. Bill
|
Java Resources at www.wbrogden.com
|
 |
Ruilin Yang
Ranch Hand
Joined: Jan 06, 2002
Posts: 150
|
|
William, Thanks That is great help. Furthermore I would like to get some code snipets at client program and also in the servlet. Thanks again Ruilin
|
 |
Roy Ben Ami
Ranch Hand
Joined: Jan 13, 2002
Posts: 732
|
|
try this link it has code on applet-servlet communication. im sure ull be able to turn it into application applet.
|
 |
Ruilin Yang
Ranch Hand
Joined: Jan 06, 2002
Posts: 150
|
|
Roy, Thanks It is good code. It is the same for java application with applet. Regards, Ruilin
|
 |
 |
|
|
subject: exact API for java stand-alone application talk to servlet
|
|
|