I want to load an applet locally from the client's hard drive from an
html/jsp page served by Tomcat on the local machine or a remote server.
The motivation is that I need to print to the local printer, but don't
want to fork out $$$ for a cert.
The applet is simple, and is only being used to try this whole scheme out.
Here it is:
// -------------------------------------------------------
import javax.swing.JApplet;
import javax.swing.JLabel;
public class TestApplet extends JApplet {
public void init() {
getContentPane().add(new JLabel("Applet!"));
}
}
// -------------------------------------------------------
The html file, TestApplet.html, is here:
<HTML>
<HEAD>
<TITLE>Applet Local Load Test</TITLE>
</HEAD>
<BODY BGCOLOR=#eeeeee style="font-family: Arial Narrow,,sans-serif; font-
size: 10pt; font-weight: 600;">
Test Applet<BR>
<applet code="TestApplet.class" codebase="file:///c:/temp/"
archive="TestApplet.jar" width=100 height=100></applet>
</BODY>
</HTML>
I then put the applet .class file in a jar and saved it in C:\temp on my
local machine.
I can put TestApplet.html anywhere on my local machine and everything
works great, but when I take the TestApplet.html file and move it to an
app directory under $TOMCAT_HOME/webapps/, either on the my local machine
or a remote one, things don't work.
I don't get a Java console load error, but I do get the the text from the
html page surrounding (top and bottom) a white 100x100 box which contains
only a graphics icon - like you get when a graphics file on a server is
not available for display.
Any clues?
Thanks in advance - dB