aspose file tools*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About GCF