Solved

Applet caching - without need to reload applet every visit to page

Posted on 2004-10-21
349 Views
Last Modified: 2012-06-27

Hi guys,

I have an applet (3rd party) included are 2 files a .jar and a .cab

i'm trying to create a simple html page that will just load the applet and stick it into cache so that the client
doesn't have to go through downloading the applet everytime they go to the pages where the applet is on.

here is my code
<html><body>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="200" height="200" align="baseline"
    codebase="file://c:/gmsapplet">
<PARAM NAME="code" VALUE="com.chatspace.v400321.Chat">
<PARAM NAME="codebase" VALUE="file://c:/gmsapplet">
<PARAM NAME="archive" VALUE="cfs40321.jar">
<PARAM NAME="cache_archive" VALUE="cfs40321.jar">
<PARAM NAME="cache_version" VALUE="4.0.0.321">
<PARAM NAME="cache_archive_ex" VALUE="cfs40321.jar;preload">
</OBJECT>
</body></html>

--------------- as you can see the applet name is cfs40321.jar
its located locally on any machine this is run from in c:/gmsapplet/ directory
this directory currently includes cfs40321.jar, cfs40321.cab and the above shown html file

this is running on a browser that has Java v 1.4.2 installed
and Microsoft VM is turned off in the browser settings

.... the applet does load and i get promted to "Accept" the certificate and all, BUT it is not stored in the cache..

this is my first time working with applets, what am i doing wrong?

thanks
0
Question by:splavik
    6 Comments
     
    LVL 86

    Expert Comment

    by:CEHJ
    If you open the Plugin control 'applet' from Control Panel, you will be able to set the caching properties
    0
     

    Author Comment

    by:splavik
    CEHJ

    that is one of the problems, the caching is turned ON in the applet (when i go throught he Control Panel)

    also, when i look at the objects in cache the particual Applet is actually in the list, but
    still every time i go to the page it asks me to download it.

    very strange behaviour
    0
     
    LVL 92

    Expert Comment

    by:objects
    > <PARAM NAME="archive" VALUE="cfs40321.jar">

    remove that line
    0
     
    LVL 92

    Expert Comment

    by:objects
    > still every time i go to the page it asks me to download it.

    it doesn't actually 'ask' you to download it.
    Are you sure you're not referring to accepting the cert?
    To stop this click "Always" when prompted.
    0
     

    Author Comment

    by:splavik
    objects,

    it is the cert, but when i click on Tools | Internet Options |Settings |Objects - on my Internet Explorer java 1.4 shows up but this component does not...

    or should that not matter and just being in the "JVM" cache is enough?

    the reason for my post was that some clients who are behind a firewall do not have the ability to

    Run the page with the applet, so we need to give em some sort of a "workaround" which to me was
    enough to give them the files, the administrator would run that file logged in as admin on each machine, run the
    html and i guess always accept on the cert, and it should work ?

    i'll try that give u heads up tomorrow AM

    cheers
    thanks
    0
     
    LVL 92

    Accepted Solution

    by:
    no need to cache if you're running it locally.

    what is the firewall blocking thats causing a problem?
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    1. Package the applet into a JAR file. The applet must be in a JAR file before a certificate can be attached to it. Use the jar JDK utility. If the applet was previously referenced with the help of a codebase attribute in  tag, replace the codebase …
    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now