aspose file tools*
The moose likes Servlets and the fly likes invoking a servlet from client Java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "invoking a servlet from client Java code" Watch "invoking a servlet from client Java code" New topic
Author

invoking a servlet from client Java code

Pooja Agarwal
Ranch Hand

Joined: May 19, 2004
Posts: 37
Hai i am facing a problem in sending and receiving data to and from servlet .

i am not using any userinterfaces to do so.

My client code is
------------------


After executing my client code i need to get a response or some confirmation
data from servlet. How do i get that.
And if i want to check whether the data sent to servlet is properly reached by servlet or not.
I am not able to properly use servletoutput streams in order to do so.

Thanks in advance.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
If this was my problem I would take out:
dstream.close();

just flush the stream, don't close it.
Also you have this:

You can't open a new reader on the closed connection.
Bill
Sarah Gaikwad
Ranch Hand

Joined: Feb 26, 2004
Posts: 35
hi pooja please write ur email id
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
Also, when calling the servlet, won't it make the call to doGet by default? Call doPost from doGet if so.


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
 
 
subject: invoking a servlet from client Java code