• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Blackberry working with Tomcat

Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic