Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating HTML page from applet on the fly

Posted on 1997-08-30
2
Medium Priority
?
192 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 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

721 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