permaculture playing cards
The moose likes Android and the fly likes Blackberry working with Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Blackberry working with Tomcat" Watch "Blackberry working with Tomcat" New topic

Blackberry working with Tomcat

Asheesh Nehra
Ranch Hand

Joined: Jun 25, 2009
Posts: 35
Hi experts, I am new to Blackberry and I am trying to call a very simple servlet from Tomcat. I am using Ecllipse with BlackBerry plug in but have also separate installs for Blackberry simulator and MDS-CS. My MDS is listening on port 8080 (at least that what they say it listens to by default), and my Tomcat is listening on port 8081. I have placed my simple servlet in WEB-APS directory on Tomcat server. When I try to access it from Internet Explorer by entering: http://localhost:8080/myDir/myServlet I get reply from my servlet as I expected. When i do request from blackberry application to that link then i got exception at HttpConnection.OpeninputStream . This piece of ccode is working for the MIDlet fine but when i run this in the blackberry application then throw exception at the HttpConnection.OpeninputStream.

please any body help me out
Carol Hamer

Joined: Sep 17, 2010
Posts: 26
To narrow down exactly where the problem is, I'd recommend the following tests:

1. Try accessing your servlet from a browser on the BlackBerry. If the servlet is accessible from IE on a computer but not from the BlackBerry's browser, then it's probably a network-level problem. (For example: the mobile operator may have restrictions on accessing non-standard ports via HTTP).
2. If you can access the servlet from your BlackBerry's browser, then try a test MIDlet -- with the same code -- but have it load another URL (one that you know should work like Google or JavaRanch). If you still get an exception, then the problem is the MIDlet code.

Learn BlackBerry Games Development
I agree. Here's the link:
subject: Blackberry working with Tomcat
It's not a secret anymore!