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

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 ]
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic