Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / February 2006

Tip: Looking for answers? Try searching our database.

applet problems

Thread view: 
C P - 13 Feb 2006 22:27 GMT
Hello
I have an html page with this in it
<APPLET codebase="." code="client.Applet.class" archive="applets.jar"
width=350 height=200></APPLET>
at the same level I have applets.jar with client.Applet.class

all this is in the root directory of a webapplication(at the same level of
the WEB-INF). When I
access it with http://localhost/context1/test.html it fails with the typical
ClassNotFound client.Applet.class. Can someone please expalin? tia.
Roedy Green - 14 Feb 2006 04:20 GMT
>ClassNotFound

I think you mean NoClassDefFoundError

see http://mindprod.com/jgloss/caq.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

C P - 14 Feb 2006 12:52 GMT
Hello
Yes, but can someone help as to the correct syntax.  I need to be edified as
to what is correct, as I beleive the way stated is.  

I am trying to access the applet (client.MyApplet.class) in the jar (applets)
from an html (test.html) at the same directory level as the aplets.jar with
this syntax in the html.
<applet codebase="." code="client.MyApplet.class" archive="applets.jar" />
Any help understanding the correct synatx would be greately appreciated.

>>ClassNotFound
>
>I think you mean NoClassDefFoundError
>
>see http://mindprod.com/jgloss/caq.html
Roedy Green - 14 Feb 2006 17:15 GMT
><applet codebase="." code="client.MyApplet.class" archive="applets.jar" />
>Any help understanding the correct synatx would be greately appreciated.
see http://mindprod.com/jgloss/applet.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

cypher - 14 Feb 2006 13:55 GMT
you have to access the Application in the same way you would an
application form the the commandline...

if your Applet.class had a main method you'd say: java Applet to run
it, that said, try this:

<APPLET codebase="." code="client.Applet" archive="applets.jar"
width=350 height=200></APPLET>
Nigel Wade - 14 Feb 2006 17:14 GMT
> Hello
> I have an html page with this in it
[quoted text clipped - 6 lines]
> access it with http://localhost/context1/test.html it fails with the typical
> ClassNotFound client.Applet.class. Can someone please expalin? tia.

Files in context of a web application cannot be served by HTTP. This is to
protect the content of your web application directory from being downloaded.
There's a good chance those files contain information which should not be
publicly available.

A URL which is not a servlet is based on the ROOT webapps context, at least it
is in Tomcat 4. In my installation this base is <CATALINA_HOME>/webapps/ROOT/,
and when I use a URL of http://server:8080/java/lib/some.jar it is served from
the directory <CATALINA_HOME>/webapps/ROOT/java/lib.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.