S
S J Rulison
One more thing:
I'm still puzzled by this getCodeBase()getHost() method. If I'm
running the Server program from a PC named JServer and I'm loading the
Applet on a different PC, even if the applet.class file is stored on
the hard-drive of JServer, how will the getCodeBase()getHost() method
know to point to the PC named JServer? Is there something I need to
do to publish the java server application? Something that tells the
getHost() I'm JServer, a JAVA Server, and HERE I AM!
Keep in mind that JServer is nothing more than a PC running windows XP
with my java server application running on it. I don't have any type
of Windows XP Internet Server processes running on it. When I here
words like ORIGINATE or CALL BACK TO THE SERVER, the only thing that
means to me is that the java applet, Applet1.class and Applet1.html
are both stored on the hard-drive of the JServer PC. When I load
Applet1.html, I have to point the web browser to the JServer PC and I
guess that process alone could pass along the host information but if
there is something more to it than that, please let me know.
Thanks for your help.
<snippet>
public class Applet1 extends Applet
{
/*
How does the getHost() method know that I want to point to JServer as
opposed to any of the other PCs on the network?
*/
public void init() {
System.out.println("getCodeBase(): '" +
getCodeBase() + "'" );
System.out.println("getCodeBase().getHost(): '" +
getCodeBase().getHost() + "'" );
connect(getCodeBase().getHost());
}
public static void connect(String host)
{
try
{
Socket s = new Socket(host, 1427);
</snippet
I'm still puzzled by this getCodeBase()getHost() method. If I'm
running the Server program from a PC named JServer and I'm loading the
Applet on a different PC, even if the applet.class file is stored on
the hard-drive of JServer, how will the getCodeBase()getHost() method
know to point to the PC named JServer? Is there something I need to
do to publish the java server application? Something that tells the
getHost() I'm JServer, a JAVA Server, and HERE I AM!
Keep in mind that JServer is nothing more than a PC running windows XP
with my java server application running on it. I don't have any type
of Windows XP Internet Server processes running on it. When I here
words like ORIGINATE or CALL BACK TO THE SERVER, the only thing that
means to me is that the java applet, Applet1.class and Applet1.html
are both stored on the hard-drive of the JServer PC. When I load
Applet1.html, I have to point the web browser to the JServer PC and I
guess that process alone could pass along the host information but if
there is something more to it than that, please let me know.
Thanks for your help.
<snippet>
public class Applet1 extends Applet
{
/*
How does the getHost() method know that I want to point to JServer as
opposed to any of the other PCs on the network?
*/
public void init() {
System.out.println("getCodeBase(): '" +
getCodeBase() + "'" );
System.out.println("getCodeBase().getHost(): '" +
getCodeBase().getHost() + "'" );
connect(getCodeBase().getHost());
}
public static void connect(String host)
{
try
{
Socket s = new Socket(host, 1427);
</snippet