Java URI.resolve
        Posted  
        
            by twip
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by twip
        
        
        
        Published on 2010-03-28T19:03:24Z
        Indexed on 
            2010/03/28
            19:13 UTC
        
        
        Read the original article
        Hit count: 272
        
I'm trying to resolve two URIs, but it's not as straightforward as I'd like it to be.
URI a = new URI("http://www.foo.com");
URI b = new URI("bar.html");
The trouble is that a.resolve(b).toString() is now "http://www.foo.combar.html". How can I get away with that?
© Stack Overflow or respective owner