Article View: borland.public.jbuilder.java.swing
Article #9342Applet:getCodeBase().getHost() returns null
From: Tom Corcoran
Date: Mon, 17 Apr 2000 00:00
Date: Mon, 17 Apr 2000 00:00
18 lines
1632 bytes
1632 bytes
In order to communicate between an applet and a servlet, I need to obtain
the value for
getCodeBase().getHost(), yet it returns null.
Here is my sample code:
public class QuoteClientApplet extends Applet
implements ActionListener {
public void init() {
String host = getCodeBase().getHost();
Do I have to have a web server started and if so how do I configure the
default java web server for the applet/servlet if needed.
Thanks
Tom
Technical Details
Message-ID:
<9YDK4.5382$sB3.3540@news.indigo.ie>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,42c1cf35225897b1,start X-Google-Attributes: gid111d45,public X-Google-Thread: 111d6b,42c1cf35225897b1,start X-Google-Attributes: gid111d6b,public X-Google-Thread: 10a146,42c1cf35225897b1,start X-Google-Attributes: gid10a146,public X-Google-Thread: f5d71,42c1cf35225897b1,start X-Google-Attributes: gidf5d71,public X-Google-Thread: 10fd6d,42c1cf35225897b1,start X-Google-Attributes: gid10fd6d,public X-Google-Thread: fecd1,42c1cf35225897b1,start X-Google-Attributes: gidfecd1,public From: "Tom Corcoran" <tom_corc@hotmail.com> Subject: Applet:getCodeBase().getHost() returns null Date: 2000/04/17 Message-ID: <9YDK4.5382$sB3.3540@news.indigo.ie> X-Deja-AN: 612215150 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: news@indigo.ie X-Trace: news.indigo.ie 955976581 194.125.175.198 (Mon, 17 Apr 2000 14:03:01 BST) Organization: Indigo NNTP-Posting-Date: Mon, 17 Apr 2000 14:03:01 BST Newsgroups: borland.public.jbuilder.java.swing,comp.lang.java,comp.lang.java.api,comp.lang.java.gui,comp.lang.java.misc,comp.lang.java.programmer