wood burning stoves 2.0*
The moose likes BlackBerry 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » BlackBerry
Bookmark "Blackberry working with Tomcat" Watch "Blackberry working with Tomcat" New topic
Author

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
Thanks
Carol Hamer
author
Greenhorn

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
 
Don't get me started about those stupid light bulbs.
 
subject: Blackberry working with Tomcat
 
Similar Threads
Problem accessing servlet through Tomcat 5.0.28
Solved: Tomcat wont start from Eclipse - java.net.SocketException: select failed
Http 404 Not found error
Configure Apache to forward request to Tomcat
Running as one process