This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java Micro Edition and the fly likes How to connect the mobile device to server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "How to connect the mobile device to server" Watch "How to connect the mobile device to server" New topic
Author

How to connect the mobile device to server

udsana ratana
Greenhorn

Joined: Oct 12, 2002
Posts: 2
Hi guys
I have a simple question to ask you. It might be a
little stupid but I really have no idea. Right now I
have developed midlet application by using J2ME by
using Tomcat to be servlet/jsp web container. I'm just
wondering that after I download the midlet to my cell
phone or PDA. How can I connect those device to the
server(for example, www.server.com). Where do I put
the server URL? (which actually i already wrote it in
the midlet program). Or we have to use dial up and
connect to the server by the phone number?
Thanks in advance if you can help me about this.
Jeremy Thornton
Ranch Hand

Joined: Feb 21, 2002
Posts: 91
You just use the standard HTTP connection to connect to the server at whatever address your servlet is running.
The following snippet of code shows the gist, although I haven't shown all the declarations.

There are a heap of good articles/examples at http://wireless.java.sun.com which should help.
simen chen
Greenhorn

Joined: Oct 18, 2002
Posts: 1
I know a little about how to connect server in cell phone.
In fact ,there is no way to connect the server in your mobile phone whithout the support of telecom carriers.
The server is in internet,and your cellphone can only connect to mobile network that it belong to.
so, it must have a gateway that is responsible for transferring the information from your phone to sever.
this is the carriers work.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
morningwind,
JavaRanch has a naming policy which is strictly enforced. Please read the policy and change your display name if you wish to continue posting here.
You can change your name: here


Matthew Phillips
udsana ratana
Greenhorn

Joined: Oct 12, 2002
Posts: 2
Hi guys
Thanks a lot for all suggestion. So that means it will be based on which network (phone company) we are belonged to, right? So if we have a cellphone, say Nokia and then we just pay for the service fee, and the phone model is java-enabled. So we should be able to type the URL that will get the servlet or connect to the server of each midlet application. Sth like that?
Udsanee

Originally posted by morningwind:
I know a little about how to connect server in cell phone.
In fact ,there is no way to connect the server in your mobile phone whithout the support of telecom carriers.
The server is in internet,and your cellphone can only connect to mobile network that it belong to.
so, it must have a gateway that is responsible for transferring the information from your phone to sever.
this is the carriers work.
 
Consider Paul's rocket mass heater.
 
subject: How to connect the mobile device to server