Hi Ryan,

I am not sure, but I would suggest that you specify the codebase directory
completely since I do
not belief that your Applet code is in the same directory as your servlet class
file resides.

cheers

[mg]





Ryan Richards <[EMAIL PROTECTED]> am 05.04.2000 18:18:21

Bitte antworten an "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>



 An:         [EMAIL PROTECTED]

 Kopie:

 Blindkopie:

 Thema:      This makes NO sense.






I have been battling this Servlet Applet problem off and on and cannot figure
out what is causing this problem. Here is my servlet code:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class pageGenerator extends HttpServlet
                                    implements SingleThreadModel {

  public void init( ServletConfig config ) throws ServletException {
    super.init(config);
  }

  public void doGet( HttpServletRequest req,
                      HttpServletResponse res )
    throws ServletException, IOException {

        // Setup the stream
        PrintWriter out = res.getWriter();
        res.setContentType("text/html");

        out.println(
          "<HTML>"+
          "<TITLE>Multiple Well Selection Form</TITLE>"+
          "<BODY>"+
           "<CENTER>"+
            "<APPLET CODE=MultiList.class"+
              "codebase=\".\""+
              "width=430"+
              "height=410>"+
            "</APPLET>"+
           "</CENTER>"+
          "</BODY>"+
          "</HTML>"
        );
        out.close();
  }
}


I keep getting this error in java console:

# Applet exception: error: java.lang.ClassFormatError: Bad magic number

If I print the html out as ascii it loads the applet fine!

Any help would be appreicated!

Ryan Richards
Technical Consultant
Database Consultants, Inc.
Oklahoma City, OK
-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to