|
|
|
|||
|
Working with a Server-Side ApplicationApplets, like other Java programs, can use the API defined in thejava.net package
to communicate across the network.
The only difference is that,
for security reasons,
the only host an applet can communicate with
is the host it was delivered from.
It's easy to find out which host an applet came from.
Just use the String host = getCodeBase().getHost();
Once you have the right host name,
you can use all the networking code
that is documented in the
Custom Networking and Security
A Simple Network Client AppletHere's an example of implementing an applet that's a network client. Using a Server to Work Around Security RestrictionsHere's an example of implementing a server to get around applet security restrictions. | |||
|