Applet Installation

  1. From the list below, right-click and save the applet you want to implement.
  2. Login to your account using telnet and change to your public_html directory with
    cd public_html
  3. Create a new directory in your public_html directory--call it myapplet.
    mkdir myapplet
  4. Make sure the permissions on myapplet are set correctly.
    chmod 755 myapplet
  5. FTP your applet class file (that you downloaded above) to your new myapplet directory.
  6. Change to your myapplet directory
    cd myapplet
  7. Your applet class file should now be in public_html/myapplet. Verify that this is correct by issuing an ls -l command from your myapplet directory.
  8. Give your applet class files executable permission.
    chmod 755 name-of-file
  9. Create a file called applet1.html inside of your myapplet directory.
    pico applet1.html
  10. This file is the html document that will display your applet. Add the required applet code to this file before the </body> tag. Follow the link below for instructions on how this file should look. To install more than one applet, simply create seperate html files for them - applet1.html, applet2.html, etc (each HTML file for each applet).

    Applet Name HTML demo Filename Customization Instructions
    Eat me pactxt.htm Here
    Rain RainExample.html Here
    CueCardsCueCard.htmlHere

  11. Okay, the applet is now ready to use on your page. Using pico, edit your main.html file in your public_html directory (or from index.html if you don't have frames). Create a link from this web page to your applet pages with the line

    <a href="myapplet/applet1.html">My Applet 1</a>

    Make sure this link is easy to find. Add more lines if you have more applet pages.
  12. Check to see that the applet works by bringing up your webpage in Firefox and clicking on the link to Myapplet that you just created.

    Note: If you get a forbidden error when using Firefox or IE then check the permissions. The myapplet directory needs to be 755 and all the files in it need to be 644. WS_FTP usually sets the permissions this way, if not fix them with chmod (see the tutorial on Unix Permissions).

    If you get an a file not found error then make sure that you typed the link to myapplet correctly.

    If you get an applet not found error, error loading applet or anything with applet and error in it then check that all the required files are in the correct directory. Remember, you MUST transfer everything in "binary" not "ascii" mode.

    One last note on applets. If the applet files (the .class and other non .html files used by the applet) are in a different directory then the html file that is "calling" or using the applet then you need to tell the browser where to look. This is like when you have a picture on your webpage in a different directory, you have to tell the browser where to look. Unfortunately, browsers don't allow the same method for applets as for pictures. You have to add something to the applet tag. For instance, if you had an applet named mytestapplet.class and it was in a subdirectory of public_html called testing then the applet tag would look like:
    <applet codebase="testing/" code="mytestapplet.class" height=50 width=100>
    The codebase attribute tells the browser what directory to look for the applet files.
    It's probably easiest just to put all your files into myapplet.


    Please send comments to CGS3063 STAFF