wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes About GCF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "About GCF" Watch "About GCF" New topic
Author

About GCF

Harish Tiruvile
Ranch Hand

Joined: Dec 01, 2005
Posts: 99
Hi,

I have written one program which will send " String data " to servlet using POST method.The problem i am facing in this code is ...request.getParameter("name" ) is not getting the data which i have sent form MIDP application.
I am sure that servlet program is getting the data that i have sent from MIDP application...i have checked it by using BufferedReader br = req.getReader()

i have include following Headers:

cn = (HttpConnection)Connector.open("http://localhost:8080/IndianRailway",Connector.READ_WRITE);
cn.setRequestMethod( HttpConnection.POST );
cn.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.0");
cn.setRequestProperty("Content-Language", "en-US" );
cn.setRequestProperty("CONTENT-TYPE", "application/x-www-form-encoded");
cn.setRequestProperty( "Accept", "application/octet-stream" );



i am not getting where i made mistake ...if anybody knows please help me in finding the error in this code

[ April 06, 2006: Message edited by: harish thrivile ]

[ April 06, 2006: Message edited by: harish thrivile ]

[ April 07, 2006: Message edited by: harish thrivile ]
[ April 19, 2006: Message edited by: harish thrivile ]

Giving up is the easiest thing in the world to do..but holding it together when everything seems like falling apart is true strength!!
with regards, Harish.T
 
jQuery in Action, 2nd edition
 
subject: About GCF
 
Similar Threads
Inner class and multiple inheritance
How to invoke native methods in J2ME\MIDP application
sending email from MIDP devices
Can we store Objects other than String in RMS
synchronized(ObjectInstance){ //satements } AND Polymorphism