Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem in launch Applet with Browser on Tomcat.
Problem in launch Applet with Browser on Tomcat. [message #1832133] Wed, 09 September 2020 19:05 Go to next message
Eric Zuo is currently offline Eric ZuoFriend
Messages: 14
Registered: October 2014
Junior Member
Dear experts,
I have a very simple Applet, and html file, I can run it with appletviewer, but when I run the html on Tomcat with Firefox/Chrome; http://localhost:8080/openapplet1.html, i got an empty page-- no color, no border, and no error.
tomcat version: apache-tomcat-8.5.31 ,JRE 1.8.0_171. I can run http://localhost:8080. Both Applet and html file are put in ROOT folder. I tried also creating "classes" folder under WEB-INF, and put the class file there.

My code are: (jdk1.8.0_171)

import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;

public class openapplet1 extends Applet implements ActionListener {
private static final long serialVersionUID = 3388464579234129L;
Button btngo;
TextField txtUrl;
public void init() {
btngo = new Button("GO");
txtUrl = new TextField("Enter url here");
add (btngo);
add (txtUrl);
btngo.addActionListener(this);
}

public void actionPerformed(ActionEvent ae) {
try {
URL url= new URL("http://www.goog.com"); //" +txtUrl.getText()+"");
System.out.println(url.toString());
}catch(Exception e) {
e.printStackTrace();
}
}
}
--------------------------

<html>
<head>
<title>Applet Web</title>

</head>
<body>
<applet code="openapplet1.class" height="300" width="400">
</applet>
</body>
</html>

Please help.
Thanks,
Eric
Re: Problem in launch Applet with Browser on Tomcat. [message #1832203 is a reply to message #1832133] Fri, 11 September 2020 15:06 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
Eclipse Platform provides the core of the Eclipse IDE, it is not related to Applets or Tomcat. So I don't expect that the few exports in this part of the form will be able to answer your questions.
Re: Problem in launch Applet with Browser on Tomcat. [message #1832204 is a reply to message #1832203] Fri, 11 September 2020 15:57 Go to previous message
Eric Zuo is currently offline Eric ZuoFriend
Messages: 14
Registered: October 2014
Junior Member
I find it is security problem.
Previous Topic:Missing Junit Plugin in Container
Next Topic:Where to find status bar heap display
Goto Forum:
  


Current Time: Thu Apr 25 13:02:59 GMT 2024

Powered by FUDForum. Page generated in 0.02878 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top