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

Java Development

Reply
Developer
Posts: 126
Registered: ‎06-08-2009
My Device: Not Specified

Unable to get Http Communication.

Hi All,

 

I have try both StramConnection as well as HttpConnection but not succedd. The url is access through browser but when i try thro' program i got exception  "java.lang.IllegalArgumentException: no ':' in URL"

 

some code here where i got error -  

 

public String getHttp(String url){
    this.url = url;       
    HttpConnection c = null;
    InputStream s = null;       
   
    try {
        c = (HttpConnection)Connector.open(url); //get Error here.
        s = c.openInputStream();
    }
    catch(Exception e){       
        System.out.println("Exception occur while open a new connection :: "+e.toString());          
        e.getMessage();
    }
}

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Unable to get Http Communication.

Check with your url format.

Use Search. "Accept Solution" If the problem is resolved.