0

Possible Duplicate:
Country name with space not accepted in BlackBerry ObjectChoiceField

I have been researching a lot on how to append % 20 to a space. I used code from a couple of StackOverflow questions but none seem to work.

There is no way I am using POST. How can I use URLEncodedPostData and remove spaces in the url?

I am fetching response from my local server using the following code.

ConnectionFactory connFact = new ConnectionFactory();
ConnectionDescriptor connDesc;

connDesc = connFact.getConnection("http://www.XXXXXX.com/XXXXX/?

InputStream isText = httpConn.openInputStream();

byte[] bytes=new byte[isText.available()];
isText.read(bytes);
final String s = new String(bytes);
System.out.println(" SERVER RETURNS = "+s);
if(s.equals("successfull"))//&& loginid.indexOf("@"))
     {
         UiApplication.getUiApplication().invokeLater(new Runnable()
     {
         public void run()
           {
          Dialog.alert(("Registration success"));
                   }
          }
    }
Community
  • 1
  • 1
Rashmi.B
  • 1,787
  • 2
  • 18
  • 34
  • 1
    Your title implies that you don't want to use URLEncodedPostData, in the body you say you do. Which is it? I already gave you example code for using it and other people gave you other solutions, http://stackoverflow.com/questions/7538998/country-name-with-space-not-accepted-in-blackberry-objectchoicefield/7552367#7552367 – Ray Vahey Sep 30 '11 at 09:05

1 Answers1

0

Go to this below link and use the Utility.java code to append %20 for space;

Country name with space not accepted in BlackBerry ObjectChoiceField

If you have any doubt come on StackOverFlow chat room name "Life for Blackberry" to clarify Your and our doubts.

Community
  • 1
  • 1
alishaik786
  • 3,696
  • 2
  • 17
  • 25