facebook

Web Project Newbie Question – notinited

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #289345 Reply

    houckman
    Member

    Hi, I have seen this question asked a few times on the net (once in this forum), but I have not really seen it answered yet, so…

    I am new to MyEclipse and to Web Devellopment. I just installed everything and it all appears to be working ok. So, I thought I would write a very simple Web Application. I create a new project (Web Project) and basically followed all of the defaults. When I was done, I had a working index.jsp based app. When deployed it says “This is my first JSP Page”. I am sure most people have done this. So the, I want to add a Java screen… so, via the MyEcplise New menu, I added a new Java class, gave it a superclass of “javax.swing.JApplet” and created it. I added an override of the init(), that looks like this….

    public void init() {
    JLabel label = new JLabel(“Hi There”);
    add(label, SwingConstants.CENTER);
    }

    Then, I updated my index.jsp to have this line below the “This if my first JSP Page”:
    <applet code=”MyWebProject.class” Width=”200″ Height=”200″></applet>

    MyWebProject is, of course the name of my Java class.

    Runs in AppletViewer perfectly… but when I deploy to my Tomcat installation, it does not work. I still get the text (“This is my first….”), but an empty panel(?) with a red X below it. In the status bar, it says… “Applet MyWebProject noinited”.

    Here is the java console trace:

    load: class MyWebProject.class not found.
    java.lang.ClassNotFoundException: MyWebProject.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    So, it can’t find my class…., but I am not sure how to tell it where to look. I have moved the .class file around, and have added “codebase” specifications… but to no avail.

    Can anyone help? In advance, thanks!!!!!!

    #289355 Reply

    Loyal Water
    Member

    houckman,
    Im not sure what is the cause of this error. Some other user on the forum might be able to help you out.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Web Project Newbie Question – notinited

You must be logged in to post in the forum log in