Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating HTML page from applet on the fly

Posted on 1997-08-30
2
Medium Priority
?
198 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
2 Comments
 
LVL 4

Accepted Solution

by:
russgold earned 60 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

824 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