BlackBerryInsight Forums
Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications | BlackBerryInsight
Get into the BlackBerry World!

Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...
July 8, 2008 at 5:23 am · Filed under Howtos


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 http://www.blackberryinsight.com and you want to place your BlackBerry application called BBCalls directly on that domain you would get an OTA download link like www.yourdomain.com/bbcalls.jad.

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:

  • www.yourdomain.com/ bbcalls.jad
  • www.yourdomain.com/ 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/vnd.sun.j2me.app-descriptor .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!


Previous Posts

4 Comments »

  1. » Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications Apache: What The World Is Saying About Apache said,

    July 8, 2008 @ 7:02 am

    [...] 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 [...]

  2. » Howto: Setup an Apache Webserver to deliver BlackBerry OTA Apache: What The World Is Saying About Apache said,

    July 8, 2008 @ 10:17 am

    [...] Howto: Setup an Apache Webserver to deliver BlackBerry OTA …that powers the Internet is called Apache from the Apache HTTP Server … .htaccess … file please refer to Apache Tutorial: .htaccess files. [...]

  3. Howto: Setup a Microsoft IIS Webserver to deliver BlackBerry OTA Applications | BlackBerryInsight said,

    July 14, 2008 @ 5:24 am

    [...] This howto should be considered as extension to the Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications which describes why you need to set mime types in your web server. Here is what you should do if [...]

  4. Help with OTA install file. - BlackBerryForums.com : Your Number One BlackBerry Community said,

    July 23, 2008 @ 10:14 am

    [...] it in the directory with the files, this will solve your problem. He is a nice guide to help you. Howto: Setup an Apache Webserver to deliver BlackBerry OTA Applications | BlackBerryInsight http://www.BlackBerryBoards.com "The [...]

RSS feed for comments on this post · TrackBack URI

Leave a Comment

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

Close
E-mail It