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
New Contributor
Posts: 6
Registered: ‎04-10-2011
My Device: 8600
My Carrier: Vodafone

Facing issues to acess HTTP URL

Hello

 

I am a newbie for BlackBerry Development ,and I need to access one of the Apache Server.

 

So I started looking into samples available in BlackBerry eclipse.

 

I am able to run HelloWorld program However I am facing issue in running HTTPDemo where we acess some URL.

 

I tried googling and find MTSservice is one of the solution and other is to **bleep**

 

if (DeviceInfo.isSimulator()){
url=url+";deviceSide=true"
}

 

In Sample code _url is  type of EditFieldnot string ..I am not sure where exactly I need to add these lines and how to resolve type conflict error (Type mismatch : Can not convert EditField into String)

 

Pelase let me know how to procced in this case.

 

Thank you.

Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Facing issues to acess HTTP URL

Welcome to the forums.

 

What you'll need to do is just get what the user has entered using EditField.getText() and then you can add to the URL.

New Contributor
Posts: 6
Registered: ‎04-10-2011
My Device: 8600
My Carrier: Vodafone

Re: Facing issues to acess HTTP URL

Thank you for your responce.

 

Now I am able to access network using both the way MDS and mentioned code snippet.

 

My next target is to access some HTML Pages from one of the APACHE server and post credentials on that.

 

For that I tried finding some thing in given Samples by BB , However I found only HTTPPush and Filter demo.

 

I am in search of relevent document  , example code itself orlink where I can start.,

Please let me know your input on this.

 

Thank you