×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    64

    how send the text via httpconnection

    Hi All,
    Am using lwuit ,and am created one TextArea field in this textarea if i enter the text without space ,Its working fine,it means storing into the database,once am entering text with space means it's not working.

    Example how am send means:
    TextArea textarea=new TextArea();
    textarea.getTex().toString();

    like this am sending to database via httpconnection..Please any one help me to solve this prob..

    Thanks,
    murugan.

  2. #2
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    59

    Re: how send the text via httpconnection

    Hi,

    You have to encode the data as per HTTP standard.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    64

    Re: how send the text via httpconnection

    Thank you for replying.........

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: how send the text via httpconnection

    Quote Originally Posted by murugacse4 View Post
    Hi All,
    Am using lwuit ,and am created one TextArea field in this textarea if i enter the text without space ,Its working fine,it means storing into the database,once am entering text with space means it's not working.
    like this am sending to database via httpconnection..Please any one help me to solve this prob..

    Thanks,
    murugan.
    murugan, I guess you are persisting the entered string in the remote database. In order to transfer the data on the remote server you are appending the string in the query string...correct.
    A URL must not contain a literal space. It must either be encoded using the percent-encoding or a different encoding that uses URL-safe characters (like application/x-www-form-urlencoded that uses + instead of %20 for spaces).

    Syntactically, a URI must not contain a literal space and it must be encoded; semantically, a %20 is not a space (obviously) but it represents a space. That is the answer and the solution of the issue you are facing right now. I hope that helps you.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Send a lot of data with httpconnection
    By laura_isabel in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2010-11-24, 05:30
  2. Replies: 7
    Last Post: 2009-07-03, 07:34
  3. How many character can send to server using httpconnection?
    By hkhan_2004 in forum Mobile Java General
    Replies: 1
    Last Post: 2008-08-04, 10:40
  4. send Form with POST on HTTPConnection
    By saifulhq in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-09-24, 08:49
  5. Can i use HttpConnection to send information to my website?
    By 180ºrevolution in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2004-10-21, 13:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×