Solved

Creating HTML page from applet on the fly

Posted on 1997-08-30
2
177 Views
Last Modified: 2010-04-16
Hi!
I want to create a new HTML page from my applet on the fly but I'm not exactly sure how to do it.
On this HTML page I want to have another applet which uses data from the other applet.
Is this possible ??? If it is, then how can I do it ???

Yours sincerely
 Tomas Helgi Johannsson
0
Comment
Question by:Tomas_Helgi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
russgold earned 30 total points
ID: 1226031
What you are asking for is not impossible, but...  The problem is that applets are generally not permitted to write files of any kind (including HTML files).  In browsers that permit it (such as HotJava, you can choose to "trust" a signed applet and allow it to write files. In JDK 1.2, you may even be able to allocate a specific directory for applets to write to.  Of course, all of this is dependant on the browser.  Current browsers generally do not permit this.

On alternative is to have a server process, accessed via RMI, CORBA, or sockets, create the file for you on the server.

Once you have managed to create the new file, you can use the Applet.showDocument() method to invoke it.

You can have the new applet use data from the launching applet by passing the data as parameters in the <APPLET> statement.
0
 

Expert Comment

by:gagnonr
ID: 1226032
You can construct in JAVA the HTML and call a JAVASCRIPT to create the HTML "on-the-fly". Look at my site
  http://www.geocities.com/SiliconValley/Vista/1337
in the JAVASCRIPT-JAVA interaction How-to section for a
snippet. Of course that solution is Ok with Netscape or IE4
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What's wrong with this code? 4 46
String array comparison 4 58
servlet and mdb, jms error 1 82
Tomcat 9 + java 8 error while trying to deploy a war file 2 858
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

751 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