• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Is it possible to directly in a txt file using HttpConnection without any servlet?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to write some text from midlet to a .txt file one the server.

I have already a file on the server named a.txt

Here is the code segment..

I don't know if this is a stupid question...
However any help is greatly appreciated.
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here you are sending a hello string to server for adding to a b.text file which is in the server.This is what I assumed.
For adding or editing in the text file which is in the server You have to write the procedure in the server side according to
your request in the mobile.
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Thanks for the reply. your assumption is correct.

I have a very little experience on server side programming. Infact I am trying to upload an image on the server from MIDlet.

I am using PHP as server side language. I like to know that if it is possible to upload image using the POST method..

Can you please give me an example ?
 
Gopinath Karyadath
Ranch Hand
Posts: 87
 
Olga Flasza
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sending images as byte Array (data[])
but not sure how to handle it in PHP..

From midlet I send through the stream as


Here is my PHP code...


On the midlet screen It prints error only..
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic