Link to home
Start Free TrialLog in
Avatar of seoirse
seoirse

asked on

How to encode a hyper link string

Hi,
  I ahve tried to encode a hyperlink to get rid of spaces passed through ina querystring. however I keep getting errors saying that "URLEncode" is either a misplaced package name or a non-existent entity.

Can you give me an example of how my encoding should work?

my test is as follows java.net.URLEncode.encode("my test d data");
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xxMariusxx
xxMariusxx

heheh...Typo.  You're just missing the 'r';-)  

java.net.URLEncode'r'.encode("my test d data");

Don't worry...happens to the best of us! :-)

Marius
Avatar of seoirse

ASKER

cheers for teh help guys. both of you were correct