This file demonstrates how to use the
PollingBoothApplet
client to enable web-based voting with
browsers that support Java 1.2. For real use you would replace this
text with what you want the voter to see above the voting applet
The actual applet is below. It is embedded in an HTML file with the following code:
<applet codebase="(codebase)" code="uk.ac.cam.cl.CST1b2001.juliet.guiclient.PollingBoothApplet" width="600" height="400"> <param name="server-url" value="(rmi-url)"> </applet>
Where:
(codebase)
is an HTTP URL pointing to the
base directory where the Java classes from the Juliet
distribution are installed (usually the same as the
CODEBASE
environment variable used to invoke the
server). (rmi-url)
is the RMI URL and service name
used to invoke the server. The applet below points to a server running at RMI URL
rmi://hammer.thor.cam.ac.uk/~ams70/java/classes/ams70-ElectionServer-test
with the applet codebase at
http://hammer.thor.cam.ac.uk/~ams70/java/classes/
. If no
server is running at that URL then it will not work (it should display
an error message).
You could include additional text here, such as the election notices and contact details for the returning officer.
Note that because of applet security features, the applet must be served from a web server on the same machine that the election server is running on.