aspose file tools*
The moose likes Java Micro Edition and the fly likes HTTP Post Problem in j2me application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "HTTP Post Problem in j2me application" Watch "HTTP Post Problem in j2me application" New topic
Author

HTTP Post Problem in j2me application

Priyanka Gawada
Greenhorn

Joined: May 08, 2012
Posts: 12
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

Joined: Jan 08, 2009
Posts: 1400
    
    6

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.


Swastik
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Post Problem in j2me application
 
Similar Threads
Access Dbase with Http connection
the problem abt communication between serlvet & midlet
HOW TO COMMUNICATE JAVA APPLICATION TO SERVLETS
Help: Potential deadlock in commandAction() ?
sending mail using servlet