hi i am new to j2me. can any body say how an http connection could be done in j2me
Samudricka
0
Newbie Poster
Recommended Answers
Jump to PostHttp connection is very little different from classic java http connection. If we omit IOExceptions, code would look like this
String url = "http://www.daniweb.com"; InputConnection ic = (InputConnection)Connector.open(url); InputStream in = ic.openInputStream(); // read from InputStream ic.close();
Jump to PostThat code that you provided is absolutely fine. I run the code and tried few pages, the output depends on "language" that is used in the site plus security implied.
The screenshot attached to post show output from my website that is just under construction, plain html used.
Output bellow …
Jump to PostTo open a webpage on mobile phone in visual form you need either micro browser whch is on advanced mobile phones or PDAs. Else you had to create MIDlet that will translate receive content of webpage to visual form, which will be pointless.
All 9 Replies
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Samudricka
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Samudricka
0
Newbie Poster
Samudricka
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Samudricka
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Samudricka
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.