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?

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.

@pradip.shingate well done you just replayed to almost 6 years old thread with information of very little value...

Thread closed!

commented: Yes! +20
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.