Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Regular Contributor
Posts: 55
Registered: ‎08-26-2010
My Device: 8520
Accepted Solution

ota app help

I'm trying to make a servlet that is going to deliver an application to a blackberry phone. My problem is that after i send the JAD file I cannot download the cod file. The bb browser gives me some Invalid COD error (not found).

My JAD file contains a referrence to a COD like this: RIM-COD-URL: xxxx.cod.

After the phone downloads the JAD and i hit download, I don't receive any requests in my servlet for the COD file.

Is it not using http protocol to download the COD ? or is it not using the same relative path to get CODs as it does for the JAD.


My url looks like this: "http:IP:8080/bbServlet" , bbServlet denotes my servlet.

When i access it with the phone i receive the JAD file, and i can detect this on the server side.

If I hit download on the phone , it gives me the error.

Isn't it suppose to make a request for the COD file like this:



I hope someone knows.

PS:I cannot make my application files public on the server.

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: ota app help

"I don't receive any requests in my servlet for the COD file."


I think the download processing expects to download the file directly itself and so will issue an http request for the specific files identified in the jad.  I think you will to intercept these to provide the cod file from your Servlet. 


In your case where the base URL is


I suspect the downloads will be directed to



It might be that by manipulating the jad you can do something different, look at the jad file itself, specifically the RIM URL lines and that will give you ideas.

Regular Contributor
Posts: 55
Registered: ‎08-26-2010
My Device: 8520

Re: ota app help

I managed to make it work. The problem was the BES that my company owns, i think. Imediately after the JAD request was made there was another request made by the phone but this time the User-Agent header was different: MDS_5.0.3.26; and it requested the first .cod file.

I sent all the cod files to each request that followed and it all worked.

The thing is I sent the 1st cod to the MDS request and also to the BlackBerry request and i wonder if i send the cod file twice.

Do you have any ideea why there was a request with the user-agent MDS ? And it is for ?


Regular Contributor
Posts: 55
Registered: ‎08-26-2010
My Device: 8520

Re: ota app help

Probably all the requests are made by the MDS.