Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > why does getByName() fails?

Reply
Thread Tools

why does getByName() fails?

 
 
FB
Guest
Posts: n/a
 
      08-03-2004
I have an applet that checks it's origins but sometimes it just fails...

if the browser can resolve
http://www.somedomain.com/somefolder/somepage.html why the applet won't
resolve www.somedomain.com?

code used:

sref = this.getDocumentBase().getHost();

try
{
hip = hip.getByName(sref);
ship = hip.toString();
}
catch(UnknownHostException uhe)
{
ship = "[" + this.getDocumentBase().toString() + "][" + sref + "]";
}

System.out.println(ship);


it fails about 5% of the time...

thanks for any help

FB




 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      08-03-2004
On Tue, 3 Aug 2004 12:05:15 -0300, FB wrote:

> I have an applet


URL?

>..that checks it's origins but sometimes it just fails...


<http://www.physci.org/codes/javafaq.jsp#exact>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Gordon Beaton
Guest
Posts: n/a
 
      08-03-2004
On Tue, 3 Aug 2004 12:05:15 -0300, FB wrote:
> I have an applet that checks it's origins but sometimes it just
> fails...
>
> if the browser can resolve
> http://www.somedomain.com/somefolder/somepage.html why the applet
> won't resolve www.somedomain.com?


Does the browser use a proxy? If so, it's the proxy that does the
lookup on its behalf.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
 
Reply With Quote
 
FB
Guest
Posts: n/a
 
      08-03-2004
"Andrew Thompson" <> wrote in message
news:urblskporusi.477ygzx0y3db$....
: On Tue, 3 Aug 2004 12:05:15 -0300, FB wrote:
:
: > I have an applet
:
: URL?
:
: >..that checks it's origins but sometimes it just fails...
:
: <http://www.physci.org/codes/javafaq.jsp#exact>
:

sorry, I should have said that I get the message from the catch part,
meaning it didn't get resolved...


: --
: Andrew Thompson
: http://www.PhySci.org/ Open-source software suite
: http://www.PhySci.org/codes/ Web & IT Help
: http://www.1point1C.org/ Science & Technology



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 5.38 Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl? PerlFAQ Server Perl Misc 0 03-09-2011 11:00 PM
FAQ 5.38 Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl? PerlFAQ Server Perl Misc 0 02-11-2011 05:00 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why why why does function not work Horace Nunley ASP .Net 1 09-27-2006 09:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57