• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2ME HttpConnection problem ...

 
Mania Pawar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


thank
[ June 19, 2006: Message edited by: Mark Spritzler ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
httpconnection.setRequestMethod("POST");

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


Mark
 
Mania Pawar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic