import java.net.*;
import java.io.*;
public class four
{
static char c;
public static void main(String[] args)
{
int x = 0;
try
{
URL url = new
URL("http://164.164.61.118:8080/servlet/test");
URLConnection urlc = url.openConnection();
urlc.connect();
System.out.println("Finished startinmg");
OutputStreamWriter os = new
OutputStreamWriter(urlc.getOutputStream());
System.out.println("Inside stuff");
os.write('s');
os.close();
System.out.println("finished writing");
InputStreamReader is = new
InputStreamReader(url.openStream());
while ( x != -1)
{
System.out.println("The str is " + is.read());
}
is.close();
}
catch(MalformedURLException mue)
{
}
catch(IOException ioe)
{}
}
}
Experts pls consider thiscode i am trying to write soem data toi a servlet and
getting back them can i able to write to a servlet thro a url connection???
Please clarify.
Thanks
Srini
___________________________________________________________________________
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