JavaHelp in an Applet

I have an applet that uses JavaHelp and it works.
The problem is that for every page i browse through the help pages, a request is made to the webserver to load the jar file that holds all the files, for every page. even if i've already been in this page.
Is that the normal behaviour? if i browse through a page, doesn't it cach it? why does it load it over and over again?

I'm using the Java(TM) Plug-in: Version 1.4.2_03 and i didn't disable caching.

Similar Messages

  • JavaHelp & multilanguage support

    Hello.
    I bumped into a big problem. I can't see any way to solve it.
    My Java applet has a help system. Also there is a multilanguage support within applet. And user can switch applet's language on fly without any restart procedure. And that created a big trouble for me.
    I can't realize the hot language switching winthin the JavaHelp system,
    Imagine that the user opened the help system and than switched to the applet. In that way the help window was went to inactive state. Than the user chose another language within applet.
    Can anybody tell me how do I switch the help system into another language without it appearance?
    I tried to use Presentation.setHelpSet() function but after I do that the help window appear again. But I don't need it.
    Any advices will be appreciated.

    I am sorry I can't help you, but perhaps you can help me. My applet
    (see www.rimfrost.no) is multilingual (english, french, spanish, german finish, icelandic, norwegian). All String and labels are arrays; the language pointer point at the String/label to be shown. However this will not work with russian. Do you have have any suggestions?
    Thank you in advance
    Sigmund Hov Moen

  • JavaHelp for web app?

    Hello,
    I'm trying to include JavaHelp for our web application.
    Has anyone used this tool or any other tool with javascript for displaying help for web apps?
    I tried to follow the browser demo that is in applet and comes with javahelp zip. It worked fine for me, but when tried to follow the same setting for the web application, I am getting this error.
    java.lang.NoClassDefFoundError: Could not initialize class com.inmedius.mentor.support.amecr.JavaHelpApplet
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)I know it cannot find the class, but I'm not sure how to configure it.
    I have the following call to applet:
    <Applet WIDTH = 26 HEIGHT = 26  codebase="http://tetra:80/AMECR" code = "com.inmedius.mentor.support.amecr.JavaHelpApplet.class" archive="AMECR.war">
         <PARAM NAME = HELPSETURL VALUE ="AMECR/GAPIHelp.hs">
         <PARAM NAME = HELPSETNAME VALUE ="GAPIHelp">
    </Applet>Also, since applet approach is not that much favored, do you know if any other way to include this tool within web applications or any other tool that would do the same thing?
    Any input is greatly appreciated.
    Thanks,

    Yes, as long as you conform to what the HelpSet specifies you can use Servlets / JSPs.

  • Firefox 2.0.0.8 = security alert when calling a Java applet method

    I have a JavaHelp applet that I launch using a method that I called
    from JavaScript when a user clicks on a link.
    A problem I found with Firefox 2.0.0.8 and JRE 1.4 is that when I
    click on the link it will try to display a security alert window, but
    the window appears to freeze up when it is being displayed and hangs
    the browser. For example, I cannot see any of the buttons that should
    be on the security window. Rather the main window is empty. However,
    if my applet exposes a button that the user can directly click, the
    security window displays properly and can be dismissed.
    With the same JavaHelp applet, the link works fine if I use it Firefox
    2.0 and JRE 1.6 or JRE 1.5, and with IE 6.0 and IE 7.0. I uninstalled
    and reinstalled Firefox with JRE 1.4, and I couldn't reproduce the
    problem. However, I'm concerned that this problem may resurface in
    the future.
    Has anyone ever seem a similar problem? And if so, are there any easy
    workarounds?

    >
    I have a JavaHelp applet.. >I suggest you launch it using Java Web Start (JWS).
    Here is a test of a direct launch of the HelpButton JavaHelp applet.
    <http://www.physci.org/jh/test.html#launch>
    It would only take minor changes to the code to make the button entirely redundant, and have the code automatically launch the HelpViewer, once the user clicks the link to the JNLP launch file.
    That 'JavaHelp/JWS' page is my test page for launching JavaHelp in a variety of forms.

  • JavaHelp - Tutorial?

    Hi, I just downloaded the JavaHelp API.
    I have to admit, I'm stumped, no idea how to use it. The demos are more complex than anything I want to implement, and would take me far longer than I have to understand. I need a simple guide that starts from the beginning. Again, the provided documentation is complex and just refers you to the demos.
    Anyone seen a tutorial? Or have any useful hints?!
    Thanks.

    I am writing the following code for an applet:
    * JavaHelpApplet.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.help.*;
    import java.net.*;
    public class JavaHelpApplet extends JApplet{
    private JButton openHelp;
    private HelpSet hs=null;
    private HelpBroker hb;
    private String helpset;
    private String name;
    private String startup;
    public void init() {
    helpset = getParameter( "helpset0" );
    startup = getParameter( "startup" );
    name = "jar:"+helpset+"!/"+startup;
    try {
    UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
    SwingUtilities.updateComponentTreeUI( this );
    catch (Exception ee)
    ee.printStackTrace();
    if (hs == null)
    try {
    URL url = this.getClass().getResource( name );
    hs = new HelpSet(null, url );
    catch (Exception ee)
    ee.printStackTrace();
    hb = hs.createHelpBroker();
    hb.setCurrentID("introduction");
    hb.setDisplayed( true );
    The applet html page has the following:
    <applet code="JavaHelpApplet.class" width="100" height="40">
    <param name = "helpset0" value = "http://localhost/help.jar">
    <param name = "startup" value = "help.hs">
    </applet>
    where,
    helpset0 parameter is the web server that I have my helpset jar
    startup is the parameter where my helpset file is named.
    When I run it from Sun ONE Studio 4 Update 1 CE, it gives me the following errors in the Output Window:
    GetIcon
    name: images/toc.gif
    klass: class javax.help.plaf.basic.BasicTOCNavigatorUI
    URL is null
    ImageIcon is null
    GetIcon
    name: images/index.gif
    klass: class javax.help.plaf.basic.BasicIndexNavigatorUI
    URL is null
    ImageIcon is null
    GetIcon
    name: images/search.gif
    klass: class javax.help.plaf.basic.BasicSearchNavigatorUI
    URL is null
    ImageIcon is null
    GetIcon
    name: images/high.gif
    klass: class javax.help.plaf.basic.BasicSearchCellRenderer
    URL is null
    ImageIcon is null
    GetIcon
    name: images/medhigh.gif
    klass: class javax.help.plaf.basic.BasicSearchCellRenderer
    URL is null
    ImageIcon is null
    GetIcon
    name: images/med.gif
    klass: class javax.help.plaf.basic.BasicSearchCellRenderer
    URL is null
    ImageIcon is null
    GetIcon
    name: images/medlow.gif
    klass: class javax.help.plaf.basic.BasicSearchCellRenderer
    URL is null
    ImageIcon is null
    GetIcon
    name: images/low.gif
    klass: class javax.help.plaf.basic.BasicSearchCellRenderer
    URL is null
    ImageIcon is null
    GetIcon
    name: images/prev.gif
    klass: class javax.help.plaf.basic.BasicHelpUI
    URL is null
    ImageIcon is null
    GetIcon
    name: images/next.gif
    klass: class javax.help.plaf.basic.BasicHelpUI
    URL is null
    ImageIcon is null
    GetIcon
    name: images/print.gif
    klass: class javax.help.plaf.basic.BasicHelpUI
    URL is null
    ImageIcon is null
    GetIcon
    name: images/pageSetup.gif
    klass: class javax.help.plaf.basic.BasicHelpUI
    URL is null
    ImageIcon is null
    My thought is that I can't get the resources from jhall.jar. How do I get them from jar? I use jhall.jar which is included on my project's classpath, also in the lib/ext on both the JRE and the JDK and S1Studio.
    What I am trying to do is have an applet that when loaded from an html page will popup a jhelp applet window.
    Is this possible to be done from struts framework?
    Thanks in advance.

  • JavaHelp in standard browsers

    How can I use JavaHelp without swing or applets? (Applets can cause problems encountered with firewalls etc.)

    Hi peter2y,
    JavaHelp can only be used in a browser without applets, if you use servlets or JSP. I.e., a Java application or dnymic web page that you produce that provides the content from a help set on the server side.
    Ulrich

  • JavaHelp Distribution

    I'm new to JavaHelp and haven't decided yet if I will use it. I'm not clear on one thing: do I have to distribute some file(s) to my users in order for their machines to work correctly with JavaHelp?
    As it is, the JRE is big for modem users to download. If they will also need to download another file, it may become prohibitively large.
    Mike

    Hi,
    there are several options with JavaHelp. If you plan to distribute a help set as electronic documentation for a Java application for instance, the user most probably has the JRE already or at least needs it for the Java application anyway.
    For watching JavaHelp help sets from out of an application, a version of the JRE with Swing is needed. In addidtion, the JavaHelp runtime extension must be present in the JRE.
    If you plan to use the help set for being viewed with a web browser, usually the browser needs to fulfill the same requirments. An alternative is to view the plain HTML topic files in the browser and use an applet to display the TOC tree without Swing.
    For doing this you would need something like what is available at http://www.calcom.de/eng/product/hlpex.htm or at http://www.calcom.de/eng/dev/index.htm
    Ulrich

  • JavaHelp/Browser/Plugin - HowTo ?

    Dear members !
    I'm a newbie to this topic ...
    I make an application which runs in a browser window, and I want to use JavaHelp.
    In IE, my browser wants to install Java Plug-in 1.3.1.
    But that file is about 5 MB !!!
    Do I really need this 5 MB ? I have located a file on our network (jinstall-111-win32.cab) which is only 39KB.
    In Netscape 4.7 it worked without installing something (maybe it was yet installed). On NC 4.6 it doesn't worked, so I copied some DLLs from 4.7-Plugins-Directory and it worked !
    Really don't understand whats going on.
    So can you help me pls ? Which files do I really need and where exactly do I get them (exact URL).
    Thank you !
    Arno

    Hi Arno,
    if you like to display JavaHelp help set in a plain browser window, this browser needs to have the JavaHelp runtime extension and Swing installed. An alternative is the applet that comes with my application HelpExpert.
    Best regards
    Ulrich

  • Including multiple jar files to applet

    In one of my application I am using severla third party apis (JavaHelp, JFreeReport, NanoXml ...) which comes as a seperate jar file each.
    Is there is a way that I can include these multiple jar files to be downloaded automaticaly when the applet is starting.
    currently I am extracting all the jar files and then re compressing them in to one file and place it in the archive property in the applet tab.
    Is there a way I can avoid extraction and recompression and directly use the jar files

    <param nama="archive" value="myjar.jar, myOtherjar.jar" />
    You could try to create an installer that wil put the 3rd party jars in the users lib/ext directory.

  • Multiple certificates and JavaHelp - A solution

    Hi,
    I have been trying to find a good solution to the problem of using JavaHelp, which is signed by Sun, with my JWS application, which is signed by my company. Given it is Friday afternoon, I have decided to share my solution with the rest of the forum.
    My initial thought was to simply pull everything out of the jh.jar, create a new jar and then sign it with the rest of the jars. This is "A bad thing" and after a lot of investigation, I came across the following solution.
    I had added an extension tag to the resources section of my JNLP file that refers to a second JNLP file <extension href="javaHelp.jnlp"/>. This second file, shown below, is then able to reference the real jh.jar file and I am now able to deploy all of the jars in the correct fashion.
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp  spec="1.0+"  codebase="...">
      <information>
        <title>Java Help</title>
        <vendor>Sun Microsystems</vendor>
        <homepage href="http://java.sun.com/products/javahelp/index.jspl"/>
        <description>JavaHelp software is a full-featured, platform-independent,
        extensible help system that enables you to incorporate online help in
        applets, components, applications, operating systems, and devices.
        Authors can also use the JavaHelp software to deliver online
        documentation for the Web and corporate intranet. </description>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <resources>
        <jar href="jh.jar"/>
    </resources>
    <component-desc/>
    </jnlp>Share and enjoy!

    If, and only if, the motor stage has a fixed interval you can forget the cluster stuff and put everything in a 3D array.
    Rows & Cols are XY data for each motor position, pages are the different motor positions.
    See screenshot for both ways
    Hope this helped
    Attachments:
    SNAG-001.jpg ‏170 KB

  • Problem with threads within applet

    Hello,
    I got an applet, inside this applet I have a singleton, inside this singleton I have a thread.
    this thread is running in endless loop.
    he is doing something and go to sleep on and on.
    the problem is,
    when I refresh my IE6 browser I see more than 1 thread.
    for debug matter, I did the following things:
    inside the thread, sysout every time he goes to sleep.
    sysout in the singleton constructor.
    sysout in the singleton destructor.
    the output goes like this:
    when refresh the page, the singleton constructor loading but not every refresh, sometimes I see the constructor output and sometimes I dont.
    The thread inside the singleton is giving me the same output, sometime I see more than one thread at a time and sometimes I dont.
    The destructor never works (no output there).
    I don't understand what is going on.
    someone can please shed some light?
    thanks.
    btw. I am working with JRE 1.1
    this is very old and big applet and I can't convert it to something new.

    Ooops. sorry!
    I did.
         public void start() {
         public void stop() {
         public void destroy() {
              try {
                   resetAll();
                   Configuration.closeConnection();
                   QuoteItem.closeConnection();
              } finally {
                   try {
                        super.finalize();
                   } catch (Throwable e) {
                        e.printStackTrace();
         }

  • Open web pages from an applet

    I'm developing an applet that has to open some web pages.
    The only way I know is to use the method showDocument that
    needs and URL. So, how to pass parameters to the web page?
    I don't want to put them in the URL: everyone can see
    "secret data"!
    Help me, please.

    Take a look at this example that uses a JEditor pane to hold the HTML page.
    //Create a new JEditor Pane
    jep = new JEditorPane( );
    //Ensure the pane is not editable
    jep.setEditable(false);  
    //Use this to get local HTML file
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");
    //add the html page to the JEditorPane
    jep.setPage(fileURL);Ok the core line of code here is this.
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");The standard method for accessing a html file via a URL is thus. As you can see its very similar.
    URL fileURL = new URL("http://www.comp.glam.ac.uk/pages/staff/asscott/progranimate/docs/Manual/Manual.htm");this.getClass().getResourse() will return the file location of the class you are working with.
    By doing the following you can access manual.html in a folder called Manual that sits in the same file location as the class file you are using.
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");I hope this helps.
    Andrew.

  • Unable to load database driver from my applet's jar file

    I'm trying to set up an applet that will talk to a MySQL database. I have no problem connecting to the database as I'm developing the code ("un-jarred"), but when I create a jar file of my code to test through a web browser, I cannot connect to the database due to the usual ClassNotFoundException. I have included mysql-connector-java-3.1.12-bin.jar (the current driver) in the jar, but I don't know if I'm supposed to supply some info through an attribute to the applet tag to let it know that the jar contains the driver it needs or if I have to call the driver differently in my code.
    Any help is appreciated, thanks.

    The simplest approach is always the best. :)Abso-lutely.
    Awesome, that worked perfectly. I Included the extra
    jar file in the applet tag and now my applet makes
    some sweet lovin' to the database.And you have succeeded where thousands have failed. Congratulations.

  • Applet java file not refreshing in browser

    I have an applet that I am updating and I am not seeing the corresponding update when I open the web page. I can manually download the java class file and look inside it and it definitely is the updated file. I have deleted the browser history. (I am running tests with Firefox 3, IE7, and Safari 4 public beta). Is there something else I need to do to make sure the browser pulls in the latest version of the class file referenced in the html?
    Here is the code:
    <HTML>
    <HEAD>
       <TITLE>A Simple Program</TITLE>
    </HEAD>
    <BODY>
       <CENTER>
          <APPLET CODE="SendRequest.class" WIDTH="500" HEIGHT="150">
          </APPLET>
       </CENTER>
    </BODY>
    </HTML>The applet refers to a hard coded URL to read through a urlconnection. It is always reading a file and showing content, but it is not showing the right file. If I change the name of the referenced file in the java program, it looks like the browser has cached the referred file, rather than throwing and error and saying the file doesn't exist.
    Here is the java
    import java.applet.*;
    import java.awt.*;
    import java.net.URLConnection;
    import java.net.URL;
    import org.w3c.dom.Document;
    import java.lang.String;
    import java.io.*;
    public class SendRequest extends Applet {
        @Override
        public void paint(Graphics g) {
            g.drawRect(0, 0, 499, 149);
            g.drawString(getResponseText(), 5, 70);
        public String getResponseText() {
            try {
                URL url = new URL("http://myserver.com/stats/logs/ex20090603000001-72.167.131.217.log");
                URLConnection urlconn = url.openConnection();
                BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    urlconn.getInputStream()));
                String inputLine;
                String htmlFile = "";
                try {
                    while ((inputLine = in.readLine()) != null)
                        htmlFile += inputLine;
                    in.close();
                    return htmlFile;
                } catch (Exception e) {
                    return "Can't get the string.";
            } catch (Exception e) {
                return "Problem accessing the response text.";
    }Any help would be appreciated. I heard that some files may cache more persistently than others, but I don't fully understand the details.
    Thanks,
    Jim

    Check this [document loader example|http://pscode.org/test/docload/] & follow the link to sandbox.html for tips on clearing the class cache. That relates specifically to caching a refused security certificate, but class caching is much the same. As an aside, getting a console can be tricky in modern times (unless the applet fails completely). It is handy to configure the [Java Control Panel|http://java.sun.com/docs/books/tutorial/information/player.jnlp] to pop the Java console on finding an applet (Advanced tab - Settings/Java Console/Show Console).
    Of course there are two better tools for testing applets, especially in regard to class caching. AppletViewer and Appleteer both make class refresh fairly easy. Appleteer is the better of the two. I can tell you that with confidence, since I wrote it. ;-)

  • EJB 3.0 - Communicate an Applet with a Session Bean

    Hello
    I'm developing an EJB 3.0 app (eclipse and glassfish tools bundle), and I have an applet that has to use remote session beans.
    QUESTION: Is it possible for the applet to connect to EJB?
    QUESTION: By creating a J2EE application client project, can I use @EJB annotations to inject the session bean directly to the applet, avoiding the JNDI lookup?
    (since I imagine that the anwser to the second one is NO, I do the following consideration)
    Given an application client project, I imagine that this application can run remotely on a client machine/JRE. Then this application can use Annotations/injection facilities whenever it runs on a J2EE client container (which I assume consists of a set of libraries provided by the application server vendor, Glassfish in that case). Could this application be deployed using Java Web Start? If so, why can't it be deployed as an applet? (both options run in a client JRE, don't they?).
    QUESTION: In either case (applet or JWS), how do I have to package the JAR file (using Eclipse) so that it contains the needed libraries for accessing the EJB? Which are those libraries?
    At the time being, I'm trying to implement a sample application that follows the "Applet doing JNDI lookup" approach. I have:
    - an EAR project
    - an EJB project (containing an Entity Bean and a Stateless Session Bean with a @Remote interface)
    @Remote
    public interface HelloRemote {
         public String hello(String name);
    @Stateless
    public class Hello implements HelloRemote {
         @Override
         public String hello(String name) {
              return "Hello "+name+"!!";
    }- an Application Client project (containing the applet code):
    public class ClientApplet extends JApplet {
         public void init(){     
              try {
                   Context jndiContext = getInitialContext( );
                   HelloRemote server = (HelloRemote) jndiContext.lookup(HelloRemote.class.getName());
                   setContentPane(new JLabel(server.hello("Gerard")));
              } catch (NamingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         private Context getInitialContext() throws NamingException{
              Properties props = new Properties();
              props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
              props.setProperty("org.omg.CORBA.ORBInitialHost", "myhost");
              props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
              return new InitialContext(props);
    }- a static web project (with a sample web page that contains the applet object the corresponding applet JAR file)
    I tried to export the Application Client project as an "application client JAR", in the hope that the java EE libraries bundled with glassfish (listed as libraries of this project) would be packaged too.
    No success, so now I'll try to copy all the JAR files (one by one) into the +\WebContent\+ folder of the Web Project, and add references to each of them in the archive="" attribute of the +<applet>+ HTML tag. Although this might work, I suspect that I am missing the good/easy way of doing it. Any suggestions?
    Thanks in advance,
    Gerard
    Edited by: gsoldevila on May 6, 2009 7:09 AM

    An Applet can communicate with an EJB via JNDI lookup but I would (personally) use an intermediate Servlet to handle this. Client to Servlet communication is http whereas to ejb is iiop - which might be blocked.
    Injection only works in managed classes (EJB, Servlet, Listeners..) and an Application Client main class. So yes you could use an app client for handling resource injection.
    m

Maybe you are looking for

  • JAVAMail API

    Anyone have any idea's on this error message when I run my JAVA Code: Error Below. The thing is if I use a internal E-mail TO: address the mail and attachement is send. This only happens when I try to send a letter outside the firms MS Exchange serve

  • I want to get improved with i5/ 8GB

    I have purchase one Thinkpad X 220 from one individual (Used Thinkpad 35 months old,fairly used).Its configuration is as follows'Intel i5 v Pro' processor,8 GB DDR3 RAM,320GB HDD,Windows 7 proffessional. After getting it I had restored this by using

  • Multiple reason codes in ICT HFM

    Dear all, We are implementing ICT Module for HFM 11.1.2.1 for one of our client. After the reconciliation by transaction ID and by Account, there have about hundreds of transactions that do not match and they have to enter reasons code. It seems that

  • AddressBook's (Mac ;-) "Me" card not transferred to iPhone

    I won't call myself very often, but... I'd like to have myself stored among contacts on my iPhone. Any suggestion? (apart... using a different name to avoid duplicates in AddressBook Thanks!

  • CS4 System Check Error

    I recently tried to isnstall CS4 on my Macbook and when I inserted the 2nd cd, it quit.  I then tried to uninstall and install again, but I get a System Check alert saying "Critical errors were found in setup for Adobe CS4 Design Premium:       undef