O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix D. Serving WAP Content from a Standard Web Server

All the popular web servers can be configured easily to serve WAP content. In most cases, all that is required is to add a few extra content-type mappings to the server.

Most web servers work out the content type of the data in their responses from the extension (suffix) on the filename. For example, a server may have a mapping that all files ending in .jpg or .jpeg have content type image/jpeg, and all files ending with .htm or .html have content type text/html.

To serve WML and WMLScript from a standard web server, therefore, it’s necessary to teach the server some new filename extensions and content types. The types that need to be added and the common extensions for them appear in Table 4.1.

Table D-1. WAP Content Types

File Type

MIME Type

Extension

WML source

text/vnd.wap.wml

.wml

WMLScript source

text/vnd.wap.wmlscript

.wmls

WBMP image

image/vnd.wap.wbmp

.wbmp

WML binary

application/vnd.wap.wmlc

.wmlc

WMLScript binary

application/vnd.wap.wmlscriptc

.wmlsc

The last two rows in the table, the binary forms of WML and WMLScript, aren’t as important as the others. They are useful only if you have access to a WML encoder or WMLScript compiler and want to preconvert your content. (This is a fairly advanced thing to do.) It won’t do any harm to have them in the server even if you don’t use them, though.

The method for actually adding these mappings to the server depends on the server ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required