Question:
I have an applet. I have successfully added the class to a JAR, but when the web page tries to load the applet, the browser gives us an error "can't find class file". When unzipping the JAR, my added class is present.
Answer:
Do not forget to add the "ARCHIVE" option to the APPLET tag like this
<applet code=my.class archive=archive.jar width=10 height=10>
</applet>
If "archive" is missing the browser will not know that your class is in a jar file...
Question:
Is there a way to write information to cookies through an Applet?
Answer:
Applets are not allowed to access information on the Client Side...it overrides the Sandbox
restriction...
However, JavaScript can access cookies and Java applet can talk to JavaScript.
So, a Java applet indirectly has access to cookies... An example of JavaScript <-->
Java was published in my newsletter before...
Look for the JSObject class from Netscape which works in IE as well.
Question:
I am writing a chat applet and I would like to put icons in user messages. Is it possible?
Answer:
A text area can parse HTML. Add image (jpg or gif) into html code and it will display your icons.
Question:
Can one applet load another applet on runtime, and can these two applets talk?
Answer:
the Answer found on "Internet related technologies" site:
"Yes one applet can load another applet. And since you need both the applet to communicate, you
need to have both applets in the same page. But the problem in this case is that both the applets will
load independently of each other. You can control the behaviour of the other applet from the first
one. But your requirement is of loading another applet from the first one.You can have two frames in
a page. In one frame there will be your first applet which will load automatically when the page is
loaded. And the other frame will contain a blank page. Now on certain event in the first applet you
can use "this.showDocument("URL") " to make a call to another applet which you want to load.
Give the target parameter as the other frame. (You will have to give the name of the other frame)
Now when these two applets are loaded they can exchange data in their life time."
http://www.springsource.com/landing/free-yourself-cost-complexity-limitations-heavyweight-app-servers?q=landing/free-yourself-cost-complexity-limitations-heavyweight-app-servers&_kk=java%20server&_kt=dca135b8-442b-4eb9-a46d-9b816bea2ad6&gclid=CMXV542UsqYCFQNrKgodbD7QoQ
Question:
How do I hide system properties that applets are allowed to read by default?
Answer:
There's no way to hide the ten system properties (see below) from applets loaded into a Java-
enabled browser. The reason is that the browsers don't consult any external files as part their Java
configuration, as a security precaution, including the
~/.hotjava/properties file.
From the appletviewer, you can prevent applets from finding out anything about your system by
redefining the property in your
~/.hotjava/properties file. For example, to hide the name of the operating system that you are using,
add this line to your
~/.hotjava/properties file:
os.name=null
Ten OS propertis that accessible by applet:
java.version
java.vendor
java.vendor.url
java.class.version
os.name
os.arch
os.version
file.separator
path.separator
line.separator
-
No comments:
Post a Comment