Forums Register Login
J2ME HttpConnection problem ...
i am try to post data from j2me client side through http connection but code alway get exception massage i am comment that code plz help.because i am new in j2me

[ June 19, 2006: Message edited by: Mark Spritzler ]
1st. We have buttone below the Add Reply button for some nice things. One of them is for CODE. This will keep your code indented when posted, to make it easier to read.

2nd you are catching "catch(Exception _ex)" So you catch the generic Exception, which unless we see the stack trace, could be any subclass of Exception so it could be anyline. If you post the stack trace that might help.

3rd on some notes your line here

(httpconnection = (HttpConnection)Connector.open(i)).setRequestMethod("POST");

Why also call the setRequestMethodin the same line, that makes it less readable. Do that on a seperate line like

httpconnection = (HttpConnection)Connector.open(i);

Does HttpConnection support ""application/x-uppli-gateway""

thank for reply

i am change as ur replay but i am found another error

javax.microedition.io.ConnectionNotFoundException: TCP open

if((i1 = httpconnection.getResponseCode()) != 200)

on this line

plz replay

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 3974 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2018 16:36:52.