I need to connect to the middleware server using
java URL and URLConnection classes .
When googled on to net , i found out some examples
Where the url is ending with /
(http://www.oracle.com/)
URL oracle = new URL("http://www.oracle.com/");
And in some examples the url is without /
URL ur = new URL("http://www.mydomain.com/myfile.gif");
Could anybody please tell me , is that makes any difference , if so
then how ca we choose a URL value ??
Not necessary.
If the URL contain no path section (only has the domain name and its scheme), it may or may not contain trailing slash, i.e.
http://www.oracle.com/orhttp://www.oracle.com. Both should be accessible. However, a normailzed URL of this must have traling slash.URL normalization is a convention that allows a URL to be written in a consistent manner. In the URL normalization, the trailing slash indicate that the URL is a directory not a file. For example:
However, this convention is only applied to a normalized URL and whether one should have a trailing slash or not depends entirely on the service implmentations.