Article View: borland.public.jbuilder.java.language
Article #17277Re: FTP
From: John P. McGrath
Date: Tue, 24 Nov 1998 00:00
Date: Tue, 24 Nov 1998 00:00
30 lines
1404 bytes
1404 bytes
John P. McGrath <mcgrath@enter.net> wrote:
> Martin Schmitt <martin@binarycompass.com> wrote:
>
> > I'm trying to retrieve a file from a system on our LAN.
> > Figured ftp 'd be good idea, something like
> >
> > url = new URL("ftp://systemname/dir/file.log");
> >
> > Alas it tries to connect, but barfs at the lack of proper
> > login info (username, password). How the &*#$ do I supply
> > that -- or should I use the file: protocol?
>
> I believe the full format for an FTP URL is:
>
> ftp://user:password@host:port/path
This is the correct format for specifying a user name and password in
an FTP URL. I have checked the appropriate RFC, and also used this
syntax within Netscape. It works fine.
But when I tried it with Java, the URL parsing class messes up, and
interprets 'user' as the host name. <sigh>
--
Regards,
John P. McGrath
<mcgrath@enter.net>
<jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.10c45acef8b87a3b989736@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<71admh$iff18@forums.borland.com> <MPG.10a6cd322f4c36659896f4@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,685bcbce8584be24 X-Google-Attributes: gidf74b3,public From: mcgrath@enter.net (John P. McGrath) Subject: Re: FTP Date: 1998/11/24 Message-ID: <MPG.10c45acef8b87a3b989736@forums.inprise.com> X-Deja-AN: 415135253 References: <71admh$iff18@forums.borland.com> <MPG.10a6cd322f4c36659896f4@forums.inprise.com> Organization: Software Consulting Services Newsgroups: borland.public.jbuilder.java.language