This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Post Problem in j2me application

 
Priyanka Gawada
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi have written a code which sends data from a midlet to the servlet using HTTP POST method.
When the HTTP GET method is used, data is received by the servlet, but with POST, it receives null.
What is the problem with the POST not able to find. Kindly help.

Here is the code of the midlet.



Here is the code of the servlet:

 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priyanka,

As far as my knowledge goes, getParameter works when the is data is sent through querystring or through request headers. But in this case as you are writing the data in outputstream at the midlet end, you have to read it from inputstream at the servlet end. I may be wrong on this but this my thought.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic