Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:30:55+00:00 2026-05-29T21:30:55+00:00

I am trying to call HTTP request with network credential in blackberry. i have

  • 0

I am trying to call HTTP request with network credential in blackberry. i have already implement on Java, Android it’s working fine but not working on blackberry. Following step i have done in blackberry.

For set Network credential i have added three following jar.

  1. commons-codec-1.6.jar
  2. commons-httpclient-3.0.1.jar
  3. commons-logging-1.1.1.jar

add this jar files are in blackberry project.

Following sample Code that work fine in Core Java.

 try{
        HttpClient client = new HttpClient();
        GetMethod get = new GetMethod("http://www.google.com");
        get.setDoAuthentication( true );
        try {
            int status = client.executeMethod( get );
            System.out.println(status + "\n" + get.getResponseBodyAsString());

        } finally {
            get.releaseConnection();
        }
    }catch(Exception e){
        System.out.println("Error:>>>>>>"+e);
    }

Now there are not error on code but whenever try to click on application icon error face like “error starting appName: Module ‘commons-httpclient-3.0.1’ not found”

Can any one suggest what’s this error say.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:30:56+00:00Added an answer on May 29, 2026 at 9:30 pm

    BB does not support HttpClient. But it does support J2ME’s HttpConnection and is quite similar to HttpClient, so you can easily adjust with it. Here’s some sample code to get you started:

    try{
    HttpConnection mConn = (HttpConnection)Connector.open(urlToPost);
    
    mConn.setRequestMethod(HttpConnection.POST);
    mConn.setRequestProperty("IF-Modified-Since", "20 Jan 2001 16:19:14 GMT");
    mConn.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");
    mConn.setRequestProperty("Content-Language", "en-CA");
    //---------------------------------------------------
    mConn.setRequestProperty("User",usr);
    mConn.setRequestProperty("pass",pass);
    
    //---------------------------------------------------
    catch(Exception e){//---handle your exceptions---//}
    } finally {
        mConn.close();//don't forget to close connections, only a limited number are available
    }
    

    This is a good article for beter understanding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out how make a basic GET request using Network.HTTP.simpleHTTP that
I'm trying to call a API with a POST request. But my Chrome Inspector
I'm trying to call a custom instance of a 403 HTTP error in Rails
We're trying to use Axis2 to call a web service that cannot use HTTP/1.1
I am trying to get the code found here: http://snipplr.com/view/26643/mbprogresshud-with-an-asynchronous-nsurlconnection-call/ to work in my
I'm trying to call web service for few hours. I have added clientaccesspolicy.xml: <?xml
I am trying to implement a request to an unreliable server. The request is
I'm trying to send the xml to another webserver through Restclient's http POST request.This
Trying to call from an android client, using the signpost oauth libs. I generated
I am trying to send an HTTP request with the contents of a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.