Wap-Mobile phone side, Create a connection

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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:

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

ib00049Author Commented:
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
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

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 :-(
ib00049Author Commented:
yes, you are right!!!

But i realy need do this..

I need that my application have some communication with the web page.
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.
ib00049Author Commented:
I have all software that i need etc. etc.
Yes if you can help me with this code is nice, like with an example..
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:
ib00049Author Commented:
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
   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:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Wireless Networking

From novice to tech pro — start learning today.