Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

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");
0
seoirse
Asked:
seoirse
1 Solution
 
CEHJCommented:
java.net.URLEncoder.encode("my test d data");
0
 
xxMariusxxCommented:
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
0
 
seoirseAuthor Commented:
cheers for teh help guys. both of you were correct
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now