Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications

Note: IIS users / administrators might want to check out Howto: Setup a Microsoft IIS Webserver to deliver BlackBerry OTA Applications.

Setting up OTA downloads for the BlackBerry is pretty easy. Technically this is done by uploading your program’s files to a web server and storing it there in a directory that is accessible from the web.

The most famous free web server that powers the Internet is called Apache from the Apache HTTP Server Project. It is available for many platforms including the most common Windows (all versions), Linux, *BSD, Solaris, Mac OS X, and even more. All information you need to install the Apache web server you can find over here. Check out the complete documentation for more.

Let’s say your server is called and you want to place your BlackBerry application called BBCalls directly on that domain you would get an OTA download link like

Therefor, you first need to upload your OTA program files to your web server. Technically this are two files for each application; in our case this would be:

  1. bbcalls.jad: JAD = Java Application Descriptor; a text file that describes your application.
  2. bbcalls.cod: the actual program file; in binary format which can only be executed by the BlackBerry.

Once you uploaded those two files to your web server (e.g. via FTP) you should be able to access them via the following URLs:

  • bbcalls.jad
  • bbcalls.cod

You will still not be able to access those URLs from your BlackBerry and install the application. Your web server needs to know more about the content of those files. This is called “Mime Type” and has actually been created for emails many years ago. Anyway, the mime type setting is important as the web server will then understand which content this is, so it knows how to deliver those files to your BlackBerry browser. The web server is also telling the BlackBerry browser which kind of mime type will come in the file you want to download. This helps your BlackBerry browser to determine what to do with the data that will be downloaded. For example: an .html file will be shown in the browser, a .jpg file will be downloaded to your “Pictures” directory, a .avi file will be downloaded to your “Videos” directory, and a .jad file will tell the browser to install a new application.
Notepad Example .htaccess - Setup BlackBerry OTA Downloads
The easiest way to set up the mime type for our two file types (.jad and .cod; see above) can be done in a file called .htaccess. This is basically just a normal text file which can be created or edited in any kind of text editor like Notepad of your desktop Windows. Here is an example of a simple .htaccess file:

AddType text/ .jad
AddType application/vnd.rim.cod .cod

This is all you need. Now just upload your .htaccess file to the same directory where you placed your .jad and .cod files at.

You should now be able to install your application via the above mentioned OTA download link diretly with your BlackBerry browser.

In case it doesn’t work: It is important that your web server allows directory based overrides. So the Apache must have been set to “Allowoverride All” for example. For more detailed information on how to set up an .htaccess file please refer to Apache Tutorial: .htaccess files.

For advanced web server admins: You can also set this up in your web server’s main configuration file. In most cases (if you are on a shared hosting plan for example) you do not have access to this file. In case you have access and want to change the mime type setting for your server globally you need to change the main configuration file (mostly called apache2.conf or httpd.conf). for more on this topic please click here.

Important Note: Do not upload commercial program files from other companies to your server. By doing this, respectively publishing the download link and therefor the program itself will be considered as software piracy by nearly every country’s law.

Get our articles via email:

Looking for Software for your BlackBerry? BlackBerryInsight Software Store!

17 thoughts on “Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications

  1. Hi! We have configured the .htaccess file as shown, and verified with our ISP that the server does the AllowOverride All setting.

    Error: invalid manifest or application descriptor. the MIDlet Version attribute is not a valid version number.

    Any suggestions would be appreciated.

    Thanks in advance!

  2. I’m not sure what i’m doing wrong, I set the .htaccess file as:

    AddType text/ jad
    AddType application/vnd.rim.cod cod
    AddType application/java-archive jar

    But everytime i open the link to the .jad file, it opens up the coding of the .jad file and doesn’t allow the installation, can someone please help explain how to fix this?

    Thanks in advance.

  3. Check if your webserver’s config is set to “Allowoverride All” which allows the usage of .htaccess files :)

  4. Hello K,

    Thanks for the input, can you tell me how i can check the webserver config and how i can set it to allowoverride all?

  5. I really need help! I am trying to make a blog to post my themes. I downloaded apache but I dont know what to do now. I dont seem to understand how to create the link for my files?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>