How to send text to a text file using j2me through http connection?

Reply

Join Date: Sep 2004
Posts: 1
Reputation: yeap521 is an unknown quantity at this point 
Solved Threads: 0
yeap521 yeap521 is offline Offline
Newbie Poster

How to send text to a text file using j2me through http connection?

 
0
  #1
Sep 17th, 2004
Regarding the title, i want to know the exact way to writing text data to a text file on a web server using http connection in J2ME. I tried the way as below:

OutputConnection connection=)OutputConnection)Connector.open("http://localhost/message.txt;append=true",Connector.WRITE);
OutputStream out=connection.openOutputStream();
PrintStream output=new PrintStream(out);
output.println("Testing");
out.close();

the codes have no problem and no exception. But when i open the text file, nothing printed to the text file. Anybody has the appropriate solution?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC