• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About GCF

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic