Article View: borland.public.jbuilder.java.api
Article #1196Re: URL authorisation info
From: Joi Ellis [TeamB]
Date: Thu, 25 Apr 2002 14:38
Date: Thu, 25 Apr 2002 14:38
39 lines
2569 bytes
2569 bytes
George Francis <george_f@hotmail.com> wrote: > "R.F. Pels" <ruurd@acklin.nl> wrote in message news:3cc7f206_1@dnews... >> George Francis wrote: >> >> > Hello >> > In the class, java.net.URL there is a method getAuthority, which allows >> > you to view the username and password associated with the URL object. >> > There is not, however, a corresponding set method. There doesn't even >> > seem to be a constructor that allows you to specify this information >> > during object creation. >> >> See: URL(String spec). >> >> -- >> >> Ruurd > the API documentation isnt very helpful for this constructor - it describes > the input string as "The String to parse as a URL." > This doesnt bring me any closer to knowing how to include authorisation > info. > Do you know aof a more specific description of this parameter? The stardard URL format provides a way to specify a username/password for ftp urls. For Http, the authentication information isn't passwd in the url, but in the request headers. I think perhaps you need to look at a different class of object specific to the type of request your URL is making. The javadoc for the protected set() method indicates that URLStreamHandler can set the authority fields. I'd start browsing there. -- Joi Ellis (TeamB) http://www.teamb.com/ No direct email, please. For best results, post on news server newsgroups.borland.com! Newsgroup Guidelines: http://www.borland.com/newsgroups/guide.html Only posts which violate the rules in guide.html are subject to cancelation.
Technical Details
Message-ID:
<3cc814e0_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!peer.news.opaltelecom.net!out.nntp.be!propagator2-SanJose!propagator-SanJose!in.nntp.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews!not-for-mailReferences:
<3cc79167$1_2@dnews> <3cc7f206_1@dnews> <3cc7f461_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,b1b009e94468e592
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-04-25 07:40:22 PST
Sender: Joi Ellis <joi@artoo.gyles19.visi.com>
Message-ID: <3cc814e0_2@dnews>
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: URL authorisation info
Newsgroups: borland.public.jbuilder.java.api
References: <3cc79167$1_2@dnews> <3cc7f206_1@dnews> <3cc7f461_2@dnews>
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.2.19-6.2.7 (i686))
NNTP-Posting-Host: 209.98.6.107
Date: 25 Apr 2002 07:38:24 -0700
X-Trace: dnews 1019745504 209.98.6.107 (25 Apr 2002 07:38:24 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!peer.news.opaltelecom.net!out.nntp.be!propagator2-SanJose!propagator-SanJose!in.nntp.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews!not-for-mail