(keitai-l) Query regarding docomo phones

From: reks mk <haidhey_at_yahoo.com>
Date: 01/18/05
Message-ID: <20050118080439.22372.qmail@web51506.mail.yahoo.com>
Hi,

I will put the query i asked in my last mail in a more
precise manner.
I want to post HTTP request parameters to a servlet by
using an HttpConnection OutputStream.I am 

trying to simulate the upload of a web page form and
extract request parameters at the servlet 

via request.getParameter(parm), but I can't seem to
get it to work.

Here is sample code:

HttpConnection
hc=(HttpConnection)Connector.open("http://localhost:8080/abc.jsp",Connector.READ_WRITE,true);
hc.setRequestMethod(HttpConnection.POST);
hc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
OutputStream out = hc.openOutputStream();
byte[] data0;
String Para;
Para = "uid=" + t1.getText();
data0 = Para.getBytes();
System.out.println("val of"+Para);
out.write(data0);
out.close();
hc.connect();
hc.close();
etc

The servlet is properly called and run, but the value
of the
parms (para and data0) is null.  Any suggestions? 
Thanks.

 


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 
Received on Tue Jan 18 10:04:42 2005