Search Interview Questions
Question: What's causing ClassFormatErrors with my applet?
Answer: Problem: I downloaded your distribution and copied the classes to my HTTP server DocumentRoot. I created an applet that I ran successfully from my Netscape server. I placed it in the server directory /webz/ns-home/classes/applets/myapp.class and called it with the following:
<APPLET
CODEBASE=http://myserver.com/webz/ns-home/classes
CODE=applets.myapp.class>
Then I set my attributes in the Administration Console to listen on port 7001, and I started the WebLogic Server on the HTTP machine so I could use my applet with WebLogic JDBC, like this:
<APPLET
CODEBASE=t3://myserver.com:7001/webz/ns-home/classes
CODE=applets.myapp.class>
When I changed the CODEBASE tag to point to the WebLogic Server, I started getting ClassFormatErrors.
A. There are several problems with your setup. The most obvious have to do with your CODEBASE:
1. The CODEBASE tag in your applet should point to your HTTP server, not to WebLogic Server.
2. The directory path referenced in your CODEBASE tag is not an absolute directory path on the HTTP server; it is a configured path that originates from the HTTP Document Root. You are using the absolute path in your CODEBASE tag. If your class "myapp" is in the "applets" package, then the correct CODEBASE for your setup would be:
<APPLET
CODEBASE=http://myserver.com/classes
CODE=applets.myapp.class>
In addition, if you are getting a ClassFormatError, it signals a problem with your HTTP server configuration. It could be that you haven't loaded the WebLogic or applet classes in the correct directory on the HTTP server, or you are specifying the CODEBASE or the CODE incorrectly in your APPLET tag.
Remember, too, that if you installed the WebLogic distribution on the machine from which you are running the applet, your applet will first look for the WebLogic classes in your local CLASSPATH, which may obscure the fact that you haven't properly installed the classes for serving from the HTTP server. To test your HTTP configuration properly, you need to temporarily rename the WebLogic classes in your local CLASSPATH or try your applet from another machine.
|
|||||||||||
Question: What's causing ClassFormatErrors with my applet?
Answer: Problem: I downloaded your distribution and copied the classes to my HTTP server DocumentRoot. I created an applet that I ran successfully from my Netscape server. I placed it in the server directory /webz/ns-home/classes/applets/myapp.class and called it with the following: If you have the better answer, then send it to us. We will display your answer after the approval Rules to Post Answers in CoolInterview.com:-
|
Related Questions | ||
Why does my applet work with Appletviewer, but not with a browser? |
|
|
Why doesn't my browser applet connect to the database? |
|
|
Can I use a "native" two-tier driver for a browser applet? |
|
|
What are the alternatives to using applets? |
|
|
What are the Applet?s information methods? |
|
|
What are the Applet?s Life Cycle methods? Explain them? - Following are methods in the life cycle of an Applet |
|
|
What is an Applet? Should applets have constructors? |
|
|
What is an applet? |
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Applet Interview Questions & Answers - Exam Mode / Learning Mode
India News Network |