my dog learned polymorphism*
The moose likes Java in General and the fly likes  response code: 400 from google images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark " response code: 400 from google images" Watch " response code: 400 from google images" New topic
Author

response code: 400 from google images

Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 147
address = "http://images.google.com/images?q="Arcyptera fusca""


-->


No need to tell, if I put that address into browser it works.
Should that work, I tryed to escape, no effect ?


Searchable nature photo gallery: http://agrozoo.net/jsp/Galery.jsp?l2=en
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38040
    
  22
Try changing the space to its HTML escape which is something like %20.
Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 147
Yeah, managed to do it:
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

Campbell Ritchie wrote:Try changing the space to its HTML escape which is something like %20.

It's %22 for double quotes.

Miran Cvenkel wrote:Yeah, managed to do it:

You can also use URLEncoder:
Unfortunately there is an UnsupportedEncodingException that can be thrown so you'd need to handle that. However, it's a sub class of IOException, and you probably already have to handle IOException for the rest of the networking code, so that shouldn't be a problem.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: response code: 400 from google images
 
Similar Threads
BOW TO ME!
Trying out smilies
URL reader error in my web application
Servers down? Pants too?
Fav comic book character....