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

Web and WebWorks Development

New Contributor
Posts: 7
Registered: ‎12-16-2010
My Device: Not Specified

Web deployment of widget-based web app


I am new to BB development but am a seasoned Java developer.


I have serched the forums and scoured the BB dev documentation but can not find the exact answer.


How do you deploy a web app containing a widget to an app server such as tomcat and eventually Websphere so that BB users can access the web app (transparently download the widget-based app), and run it on their BB?


I am thinking of Java applets that are referenced within the html/JSP or a .jad file that is requested in a URL that is entered in the web browser.


Typically you deploy web apps in an app server in the form of a .war file. Can you just deploy the .jad file like a .war file?


I also already read that you deploy all .cod files alongside the .jad file.


Thanks a lot for any help.


Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Web deployment of widget-based web app



When you use the BlackBerry WebWorks development tools (either the plug-ins for Eclipse or Visual Studio, or the command line packager) to compile an application, it should create two folders:



  • build\StandardInstall - deployment files necessary to distribute your application through BlackBerry App World, a BlackBerry Enterprise Server or loaded via Desktop Manager.  There should be a single COD file and a single ALX file.




  • build\OTAInstall - deployment files necessary to distribute your application over the Internet to users via the BlackBerry browser.  There should be a single JAD file and one or more COD files (there could be many COD files depending on how big your app is).
You deploy the files from the OTAInstall folder to your web server, and your end users will load the JAD file using their BlackBerry browser.  The browser application then displays the "Download" page, and manages the installation of all the multiple COD files.
For your interest, here is some more learning resources that helps explain how to do this:


Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 7
Registered: ‎12-16-2010
My Device: Not Specified

Re: Web deployment of widget-based web app

Thanks, Adam, for your long response.


I am now able to download into the simulator browser my simple widget app from a tomcat server instance running in eclipse.


My current challenge is calling a javascript extension from a javascript function within the widget app.


I am able to debug in eclipse the widget app running in the simulator (very cool), but I get the following error:


          ReferenceError: abc is not defined.


for a javascript call of:


          alert( abc.list() );


to my JS extension, where I have all the subclasses defined for Scriptable, ScriptableFunction, and WidgetExtension, placed the jar of source in the ext folder of the widget project, zipped-up the widget project directory, and ran the blackberry loader on the zip file to create the jad and cod files.


I defined feature abc in the config.xml and in the JS extension's library.xml file.


What else is needed for the blackberry browser to see the definition of abc as an object to link it to my JS extension?


Thanks again.


New Contributor
Posts: 7
Registered: ‎12-16-2010
My Device: Not Specified

Re: Web deployment of widget-based web app

I am now able to get the javascript extension code to run from javascript.


I did not code the Scriptable.getField() function correctly. I did not return the ScriptableFunction subclass instance.


I was doing in getField() what I should do in ScriptableFunction.invoke().


Thanks again, Adam, for your help.