Home > Articles > Networking

  • Print
  • + Share This

Tip 1: Configuring a Web Server to Serve WAP Files

WAP consists of a mixture of WML and WMLScript code. Source files for these languages are stored in either .wml or .wmls files. When retrieved through a WAP gateway, these files are both compiled to binary form and are then transferred to the WAP browser as .wmlc and .wmlsc files (.wmlc standing for "wml-compiled" and .wmlsc stands for "wmlscript-compiled"). Standard Web servers must be made aware of the MIME type of a file before serving it; otherwise, you may receive a MIME Type Not Supported error message or something similar. Configuring the appropriate MIME types in the two most popular Web servers, Apache and Microsoft IIS, is a very straightforward task.

To enable WML/WMLScript support in Apache, modify the http.conf file (if you have root access) or to a directory's .htaccess file by adding the following lines:

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

The second line adds support for WAP's image format, WBMP (wireless bitmap). The third and fifth lines add support for compiled WML and WMLScript files, respectively.

If you're using the popular Microsoft Internet Information Server, modifying the server is done through a graphical user interface. Within the Internet Service Manager application, select the Web server you want to modify; then select the Properties menu option. From the Properties dialog box, select the HTTP Headers tab, and then select the Add button in the Custom HTTP Headers box. Add the appropriate MIME types to IIS using this option.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.