Welcome!

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

Reply
Developer
parthv
Posts: 17
Registered: ‎01-02-2010
My Device: Not Specified
Accepted Solution

Problem in calling JSP from widget

Hi ALL,

 

   I m new to BB widgets development. I have a scenario in which from my main widget HTML page which is index.html upon clinking a button I m calling a JSP which on remote server inside my LAN. This JSP has code which connects to database and  fetch the  data from that database and return this data in HTML format to my index.html page and index.html page displays it on BB screen.

 

  To connect this JSP file which is on other server in my LAN I have created an PHP proxy on my local system. This is working  fine for my Nokia widget and  I tested it  successfully on NOKIA device.

 

  I used same index.html file to create .ZIP file for BB widget and assigned same file in my config.xml as <content src="index.html" />. After this I compile my widget .ZIP file from command prompt and it gets compiled successfully and generates .cod file. I m using BB widget SDK 1.0(BlackBerry Widget Packager).

 

  Now when I open BB simulator 9500 and try to load my .cod file it displays the index.html page but  when I click on the button nothing happens I mean it is not connecting to  remote JSP file on remote server .

 

 I have started my MDS before doing this testing.Still nothing happened  result is the same after clicking button on my index.html nothing happens.

 

To  avoid version compatibility issue I m using the same MDS and Emulator which comes default in my BB widget SDK.

 

 Hope my question is clear,

 

Thanks in Advance.

 

 

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Problem in calling JSP from widget

Have you added the domain of your JSP page to the whitelist of the widget.  You can do this using the <access> elements.  The origin of your outside resource needs to be declared in order to allow external communications.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
nrizz
Posts: 26
Registered: ‎01-13-2010
My Device: 8330

Re: Problem in calling JSP from widget

Hi parthv

 

I also had issues with JSPs but I have found a formula with varying success.

 

Are you invoking your JSP directly or with AJAX?