This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet notinted error when imbedded in servlet html output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "Applet notinted error when imbedded in servlet html output" Watch "Applet notinted error when imbedded in servlet html output" New topic
Author

Applet notinted error when imbedded in servlet html output

DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
OK, Im really annoyed here & dont have aclue what the heck is the problem. I have this stupid little test applet that runs fine in appletviewer, fine in a browser when just using an html page but the minute I put the applet tag into the html for a servlet I get applet MessageAlerter notinited.... what the heck is wrong here. Ive even tried putting it in several places in the server file structure (the root, & the classes folder) just to try & figure it out & nothing seems to work!
Applet:
import java.awt.*;
import java.awt.event.*;
public class MessageAlerter extends java.applet.Applet {
public void paint(Graphics g){
g.drawString("Testing 1,2,3", 10, 10);
}
};
Code in html:
<APPLET code='MessageAlerter.class' width='200' height='100'></APPLET>
Like I said it works fine in a browser when I make an html page for it & it works fine in appletviewer...
Vadiraj Deshpande
Ranch Hand

Joined: Aug 16, 2000
Posts: 78
I put the applet tag into the html for a servlet I get applet MessageAlerter notinited....

Have you checked the code generated by the servlet coming onto your browser by rt.click/view source?

Ive even tried putting it in several places in the server file structure (the root, & the classes folder) just to try & figure it out & nothing seems to work!

As fas as I know Applet classes should be placed in the folder where you place all html files, as they should be served to the client when requested. The folder usually is the root folder of your web application.
For example:
in case of Tomcat,
the structure is :

Hope this helps....
Vadiraj
[ May 09, 2003: Message edited by: Vadiraj Deshpande ]
Nicholas Turner
Ranch Hand

Joined: May 24, 2003
Posts: 126
There is also an html converter tool that makes it possible to view them in browser that dont have current jre's but the class files has to be in a public place due to security applkets cannot access web-inf folders
 
GeeCON Prague 2014
 
subject: Applet notinted error when imbedded in servlet html output