Configuring the Java Applet
Introduction
The default WebChat! server distribution is configured with its built-in
web server (the integrated web server) turned on, running on port 40000. This
is the server which you use to configure the main options of WebChat! - however
it also has another purpose. The Java chat client can also run from
the integrated web server. Because of this it is very easy to set-up the
chat applet.
Setting up your pages
The first thing you must do is get your pages ready for the chat applet.
Normally the applet will run in a frameset; a frame at the top holds your
site logo and/or navigation bar, a frame in the middle holds the chat applet
and one at the bottom carries advertising. This allows the chat applet to
be as large as possible. An example of the code required is shown below:
<html>
<head>
<title>Chat</title>
<frameset rows="65,*,65">
<frame src="banner.asp" name="top">
<frame
name="middle" src="chat.asp">
<frame
name="bottom" src="ads.asp">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support
them.</p>
</body> </noframes> </frameset>
</html>
In this example the file "chat.asp" would have the chat applet inside it.
The page does not need any special formatting as the other frames define the
layout.
Using the applet
The integrated web server is fast and efficient so can easily serve
the chat applet to clients. The file "chat.asp" in the above example would
contain the following:
<html>
<head>
<title>Middle Chat Page</title>
</head>
<body>
<applet width="100%" height="100%" code="uk.co.ashleybrown.Chat"
codebase="http://ashley:40000/javachat" name="chat">
<param name="LoginPrompt" value="yes">
</applet>
</body>
</html>
The bold lines are the ones which actually do the work. As you can
see, not much is required. In a visual editor like FrontPage, you can
simple set up the codebase and code parameters, then add the custom
parameter "LoginPrompt".
See the
Java Applet Parameter Reference for a full list
of parameters.
|