Provided I have a java.net.URL object, pointing to let’s say
http://example.com/myItems or http://example.com/myItems/
Is there some helper somewhere to append some relative URL to this?
For instance append ./myItemId or myItemId to get :
http://example.com/myItems/myItemId
URLhas a constructor that takes a baseURLand aStringspec.Alternatively,
java.net.URIadheres more closely to the standards, and has aresolvemethod to do the same thing. Create aURIfrom yourURLusingURL.toURI.