Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

J2ME HttpConnection problem ...  RSS feed

 
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 ]
 
ranger
Sheriff
Posts: 17314
11
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!