tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Schild" <>
Subject Re: Compile error: class file contains wrong class, bad class file???
Date Thu, 23 Jan 2003 23:44:58 GMT
Sorry, I figured it out.  When I installed the Tomcat directory under
Apache.  The compiler was picking up %tomcat_home%/servlet.jar instead of
the servlet2_03/servlet.jar defined in the classpath....

----- Original Message -----
From: "Chris Schild" <>
To: "Tomcat Users List" <>
Sent: Thursday, January 23, 2003 4:35 PM
Subject: Compile error: class file contains wrong class, bad class file???

Hi all, here is the error I get...
C:\Java\JCreator LE\MyProjects\Email\ cannot access
bad class file: C:\Java\servlet-2_3\javax\servlet\ServletConfig.class
class file contains wrong class: javax.servlet.ServletConfig
Please remove or make sure it appears in the correct subdirectory of the


   public void init(ServletConfig config) throws ServletException
^1 error

I have searched for answer but I get nothing?!?
The classpath is set correctly -
I can't think of anything else....
Any suggestions?
Here is the code up to the error:


// import the JavaMail packagesimport javax.mail.*;import
javax.mail.internet.*; // import the servlet packagesimport
javax.servlet.*;import javax.servlet.http.*; // import misc classes that we
needimport java.util.*;import*; public class Email extends
HttpServlet {   String smtpServer;      public void init(ServletConfig
config) throws ServletException   {       super.init(config);
// get the SMTP server from the servlet properties       smtpServer =
config.getInitParameter("smtpServer");   }      public void
doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException   {I get this error whether it is from
the DOS cmd line or from the case tool JCreator???Anybody know about this???

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message