Yes, this is confusing. The whole concept of a base URL comes from URL resolution in the context of a normal web page. A base URL is the URL of a document/resource. Other resources with relative URLs are then resolved with reference to the URL of that document. In practice that means a URL resolver will strip the last part of the base URL up to the last / and use this as the 'prefix' to prepend to relative URLs.
So if your document is http://myhost/in/some/dir/doc.html this is the base URL and the URL resolver will then use http://myhost/in/some/dir/ as the prefix for relative URLs. In your case you probably specified something like http://myhost/in/some/dir as base URL and any relative URLs would then be given the prefix http://myhost/in/some/ which is not what you intended. Appending the / fixed it. For more detail check the JDK Javadocs for the URL class and RFC2396. The relevant sentence in RFC2396 is in section 5.2 6) a): "All but the last segment of the base URI's path component is copied to the buffer. In other words, any characters after the last (right-most) slash character, if any, are excluded." Hope this explains the unintuitive but technically correct behaviour. Manuel > -----Original Message----- > From: Jean-François El Fouly [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 14 October 2008 11:09 PM > To: [email protected] > Subject: Re: URI resolving for image access > > In fact, the trailing slash was missing in the base URL as passed to the > FOUserAgent, and believe it or not, it won't work without it.... :-( > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
