tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Schild" <>
Subject Compile error: class file contains wrong class, bad class file???
Date Thu, 23 Jan 2003 22:35:18 GMT
Hi all, here is the error I get...
C:\Java\JCreator LE\MyProjects\Email\ cannot access ServletConfig
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 classpath.


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

I have searched for answer but I get nothing?!?
The classpath is set correctly - C:\Java\classes;C:\Java\javamail-1_3\mail.jar;C:\Java\jaf-1_0_2\activation.jar;C:\Java\servlet-2_3\javax\servlet;C:\Java\jsp-1_2\servlet.jar

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???
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message