rocket mass heater kickstarter
The moose likes Beginning Java and the fly likes url with a space giving problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "url with a space giving problem" Watch "url with a space giving problem" New topic

url with a space giving problem

Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
I am constructing an url like below and trying to get the JSON objects.

I get the following error.

Error retrieving library list java.lang.IllegalArgumentException: Invalid uri ' name/list/json': escaped absolute path not valid

If I paste the above URI on an browser, it goes through and I get the JSON object.
How to introduce a white space between "sample" + " " + "name" as the above construction doesn't pass.
Many Thanks in advance.
Darryl Burke

Joined: May 03, 2008
Posts: 4758


edit Which you could have discovered by reading the API for You would also have discovered an alternative approach.

luck, db
There are no new questions, but there may be new answers.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19908

+ is also an option for spaces.

How To Ask Questions How To Answer Questions
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: url with a space giving problem