944,070 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 13525
  • Java RSS
Sep 17th, 2004
0

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

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yeap521 is offline Offline
1 posts
since Sep 2004
Apr 16th, 2010
-2
Re: How to send text to a text file using j2me through http connection?
you r writing data to only port no. 80,you r not reading data from that port,http port is 80,so you must know the server side programming.so you can read it and save in message.txt file on server side,so u have to write code for it also.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pradip.shingate is offline Offline
1 posts
since Apr 2010
Apr 16th, 2010
1
Re: How to send text to a text file using j2me through http connection?
@pradip.shingate well done you just replayed to almost 6 years old thread with information of very little value...

Thread closed!
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in Java Forum Timeline: array and setBackground()
Next Thread in Java Forum Timeline: Regular expressions checking, by the format "*,txt",ab* etc'





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC