Hello World in WAP

I am VC++ programmer, I need to write a WAP application, How can I write my first, Hello World, program using WAP. Where to find tutorials and technical documentation about WAP. How to compare Web application to Wap application.

Any sort of help for a beginner is most welcome.

Who is Participating?
Michel SakrConnect With a Mentor Commented:
If you don't know about the developing environnement I recommend to download the nokiawap toolkit from

I wrote about it also in previous posts:

You will use the nokia toolkit emulator to browse your wap site, the toolkit to check for deck info...
debug the wml.. all waht is related to wml, if you're using asp with the wml applications then you need
to use also your favorite asp developer, vis interdev or drumbeat or just frontpage (if you're coding
manually) , you tell the server to send a response that supports the wap format,
in asp we add:
Response.ContentType = "text/vnd.wap.wml"
now the application is hosted on a regular web server (like IIS) but you have to add additional mime
type in the default site or in the particular wml site being hosted (check wml developers guid for the
full set of mime types to be added) , now where 's the gateways role? the gateway plays as a translator
for the wap devices, it fetches the information from the web server and translates it to the device
in a readable for it format... the gateway can be located anywhere between the ISP and the web server..

the wml is derived from xml which is the HTML extensebile (extention!) so you can code it in a text
document or in the nokia toolkit, I recommend to code it in your server scripting development tool environnement
(for me it's visual interdev) and debug it using the nokia toolkit...
PS: the emulator don't need a gateway to show results..


As far as I know the only issue to take care is deck size.. depending on what will be the targeted device
if you know it , but usually it shouldn't exceed 1397bytes since Nokia 7110 (the first wap devices available
everywher) accept decks smaller than 1397bytes while ericsson 320 can take 3000 bytes.. now enough with
this,  know also that databases are not affected from wap technology, you can store your info in SQL
or access the technique is the same but the input/output device is new, for wap we use the same ASP
(you can use other server side scripts also) coding as for HTML (with minor cahnges) as we said only
the output is limited by the device, like you can't also display 32bit colored vga graphics, instead
you have a grayscaled (i'll say even 2 colored) wbmp graphics that are limited in file size and image
pixel range.. all this is directly reletad with the device technology and the output will evolve paralelly
to that.
about security we have one issue to take in consideration which is encription between the wap gateway
and the web server (the broken link) , which is not supported yet in moste gateways and web servers
so we can outrun this by putting the gateway and the webserver together...


I'll add to this links you can serch for more info:

and others..

Happy coding :+)
Writing a WAP program is similar to writing a web program except you use different tags. Here is a small wap example that prints Hello World.

<?xml version="1.0"?>

  <CARD id="MyCard" title="This is a test program">
     Hello World

This would just be put in a file with the extension .wml and if the web server is configured correctly when the URL is called from the phone the wml file will be run and the user will see the output on the phone.

Hope this helps

ahmadrazakhanAuthor Commented:
thanks Darren,
if the web server is configured correctly ...
above statemet is still ambigous to me, can u explain how,
-Do I need Nokia Wap Server.
-at which place in WAP environment the wire less bits (data) get into some wired media, as the server will always connected to som wire.
-Nokia supports servlets, which Wap server supports Microsoft technologies, like ISAPI, ASP
WEBINAR: GDPR Implemented - Tips & Lessons Learned

Join the WatchGuard team on Thursday, March 29th as we recount some valuable lessons learned in weighing the needs of a business against the new regulatory environment, look ahead at the two months left before implementation, and help you understand the steps you can take today!

You need a web server configured, which web server are you using, I have used IIS and Apache both work fine but IIS is easier to set up. It is useful if you install the Nokia simulator but you should not need to use the Nokia WAP server IIS will work fine for WAP as well as web pages. If you let me know the web server you are using I will try to help you on the configuration or at least point you to some documentation that might help.

1. if you just want to view how the content is displayed in wap browser, you don't need a web server.
you can use Nokia wap simulator to view files as well.
(using 'compile' option).

2. to configure the web server, you need to add mime types mapping for wml (text/vnd.wap.wml) and wbmp (image/vnd.wap.wbmp)to the list of the server supported mime types.

then you can connect the wml page from a wap simulator,
or using a wap-enabled phone on the actual cellular net.
in this case, you should ask your mobile service provider how to configure the phone to use their wap gateway.
ahmadrazakhanAuthor Commented:
Actually I have to develop WAP software for a Stock Exchange. I have expertise in VC++, I can use IIS and ISAPI dlls. My requirement is traders could enter their orders from their mobiles and should b able to see current stock rates. How should I proceed, which architecture suits me.

You want to connect to a database using ASP and WAP. Here's a excellent code that I checked:


"How should I proceed, which architecture suits me."

It's actually really simple... You know VC++, IIS and ISAPI. So you do your app the same way as if you were doing an "normal" HTML app. But instead of returning HTML to the client, you return WML (and your IIS must be set up to accept requests for WML documents).

THen, for an even better application you let your app create XML content. As a last step you check the user agent (it's an HTTP header telling what browser the client uses) and select an appropiate XSL stylesheet and let that stylesheet generate HTML for "standard browsers" and WML for WAP users (remember that PDAs like Palm and Epoc have large screens while phones have tiny displays, hence differend WML should probably be generated for different WAP devices).
Please update and finalize your open questions.


Community Support Moderator @ Experts Exchange

You have many open questions:


To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!

community support moderator

Admin notified of user neglect. Force/accepted by

Community Support Moderator
Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.