jQuery in Action, 2nd edition
The moose likes Java in General and the fly likes Extract absolute URL from Relative Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Extract absolute URL from Relative" Watch "Extract absolute URL from Relative" New topic
Author

Extract absolute URL from Relative

Mahadevan
Greenhorn

Joined: Oct 05, 2005
Posts: 6
HI,
I am using Apache HTTPClient. I need to get the absolute path from the relative image src urls.
Is there any apis in Apache HTTPs?

For ex: if you do google in IE view source logo will display the relative path. If you right click -> properities it is showing the absoulte path.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Use the URL constructor that takes a base URL. For instance:
If you don't have the base URL then there is nothing you can do though. After all, relative to what?


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Extract absolute URL from Relative
 
Similar Threads
Absolute path , Relative Path
doubt on absolute path and relative path
plz help me
relative and absolute path
Not able to find a File in servlet