Link to home
Start Free TrialLog in
Avatar of sumantedla
sumantedla

asked on

relative links

Hi,

I am trying to extract links from webpages. I need a solution to convert the relative links to absolute links so that they can also be followed.

Any code is appreciated. I am doing this in java.

Thanks.
Avatar of danny_ebbers
danny_ebbers

Hi sumantedla,

Here you go: http://javaalmanac.com/egs/java.io/GetAbs.html?l=rel

Best regards,
Danny Ebbers
Avatar of sumantedla

ASKER

But how can i do that for links in webpages. When I extract the urls in a webpage, some of them are relative and someof them are absolute. I want to make the relative links absolute so that they can also be visited by connecting to that page.
ASKER CERTIFIED SOLUTION
Avatar of danny_ebbers
danny_ebbers

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