Wap-Mobile phone side, Create a connection

Posted on 2003-11-20
Medium Priority
Last Modified: 2013-12-27
Hei!! I'm a portuguese student, and I'm a beginner.

I want do an application to a mobile phone in Java, to connect a web site using WAP.

What I need do?? If some one can give me a example or steps to do that fine.

 - I don't know how begin a wap connection and how set the id addrss
  - I need AT COMMANDS ??? (how I do that?)

 Tanks bye bye

Vasco Mouta
Question by:ib00049
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 15

Expert Comment

ID: 9786696
A WAP browser on your phone works just like an HTML browser on your desktop.  There is no need to deal with AT commands and things like that.

Where you would write HTML for a web page, you use WML for a WAP page.  Here is an example:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.x
  <card id="card1" title="First card">
    <p>Welcome to the <strong> My First Card </strong> on my first WAP site.</p>

You just need to save this file on your web server and then enter the URL on your phone.  eg. If this file is saved as "index.wml" and your web server is at "http://www.myserver.com", on your WAP phone, you need to enter the URL as:


You need to ensure that your web server supports the correct MIME types for WAP (most do):

wbmp  image/vnd.wap.wbmp
wml  text/vnd.wap.wml
wmlc  application/vnd.wap.wmlc
wmls  text/vnd.wap.wmlscript
wmlscriptc  application/vnd.wap.wmlscriptc

Have a look at this site too:

LVL 15

Expert Comment

ID: 9786699
Sorry ;-)  That link is on my local system.  It should have been:


Author Comment

ID: 9786719
tanks men, i need that side to.

But what I want do is one application to run in the nokia mobile phone serie60, and when i begin this application i go to the site along, whithout insert the url name for the site.

You give me the solution to the page and no to the mobile application

Sorry about the Inglish

Thanks, if you can help in this to nice, the points gone to you

Vasco Mouta
Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

LVL 15

Expert Comment

ID: 9786761
The Nokia series 60 phones have a built-in WAP browser (go to the Services menu and look for "Go to address" or "Go to URL" (or similar) where you can enter the URL).

Alternatively, you could store a bookmark for the site - to avoid having to enter the URL every time.

If you want to write your own application to access the site, you are looking at a *massive* project :-(

Author Comment

ID: 9786785
yes, you are right!!!

But i realy need do this..

I need that my application have some communication with the web page.
LVL 15

Expert Comment

ID: 9786836
OK.  What programming languages have you used?

If you've used mainly Java, then you need to be looking at creating a J2ME application.  This (again) uses the http protocol to communicate across the network.


If you haven't used Java and you want to write native code for the device(s), then I can't really help much further.

Author Comment

ID: 9786940
I have all software that i need etc. etc.
Yes if you can help me with this code is nice, like with an example..
LVL 15

Expert Comment

ID: 9787193
Have you written anything at all yet?

How much Java experience do you have (specifically J2ME)?

You're asking too much for 50 points - "This question is not important and easy (50 points)".

Here's a link that might help:

Author Comment

ID: 9787375
you are right but i don´t have to much points.

I only know do simple things nothing more.
I can do my simple applications in JAVA(J2ME) but i don't know yet how do this.

ib00049@alunos.deis.isec.pt  is you want privaciti :o)

if you can send me i little example to begin the connection, i try do the rest. I want finish my studies :o)

Tanks men again
LVL 15

Accepted Solution

jimmack earned 400 total points
ID: 9787480
   private HttpConnection conn;
    private DataInputStream dis;

    private void openConnection(String url) throws IOException
        conn = (HttpConnection)Connector.open(url);
        conn.setRequestProperty("connection", "close");
        dis = conn.openDataInputStream();

    private void closeConnection()
            if (dis != null)

            if (conn != null)
        catch (IOException ioe)

        dis = null;
        conn = null;

    public void manageConnection() throws IOException

        // Read any data you want here, eg:
        int anInteger = dis.readInt();
        String aString = dis.readUTF();


Include your data/commands/instructions to the server in the URL that you use to open the connection (just as you would with a normal browser request), eg:


Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MAC Filtering: MAC filtering is like handing a list of names to a doorman. If someone comes to the door and mentions a name, this name is checked by the doorman on his list and granted or denied access by this. This means that if someone menti…
DECT technology has become a popular standard for wireless voice communication. DECT devices are not likely to be affected by other electronic devices and signals because they operate in a separate frequency-band.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question