SERVLET class missing

hi firends i am using j2ee 1.5.0and when ever i run jsp application or compile it it says class does not exist..please help... how to do..
[173 byte] By [virubhaia] at [2007-11-27 5:04:07]
# 1
can you please post a relevant portion of the code here:)
lem@phila at 2007-7-12 10:22:22 > top of Java-index,Java Essentials,New To Java...
# 2
My guess: You're probably missing the j2ee library in your classpath that provides the Servlet class you're extending? so add j2ee.jar (or whichever jar contains the servlet definition in JEE 5...But we need more info to be sure!
Peetzorea at 2007-7-12 10:22:22 > top of Java-index,Java Essentials,New To Java...
# 3
"run or compile"? What are you doing?java -cp . MyJsp.jsp?
CeciNEstPasUnProgrammeura at 2007-7-12 10:22:22 > top of Java-index,Java Essentials,New To Java...
# 4

whenever i compile this with javac hitcountServlet.java it shows the errors that following packages does not exist.....

the code is given below:

import javax.servlet.*;

import javax.*;

import javax.servlet.Http.*;

import java.io.*;

import java.util.*;

// hitcountservlet.java

public class hitcountServlet extends HttpServlet

{

/*counter to keep track of the number of users visiting the web site */

static int count;

public void init (ServletConfig config) throws ServletException

{

// the servletconfig object must be passed to the super class

super.init(config);

}

/* .............*/

public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

{

response.setContentType("text/html");

PrintWriter out=response.getWriter();

// increment counter

count++;

out.println("<html>");

out.println("<head><title> myFirstServlet</title></head>");

out.println("<body>");

out.println(" you are user number " + String.valueOf(count) + " visiting our web site" + "\n");

out.println("</body></html>");

}

// used by client browser

public String getServletInfo()

{

return "BasicServlet Infromation";

}

}

virubhaia at 2007-7-12 10:22:22 > top of Java-index,Java Essentials,New To Java...
# 5
Peetzore is right. You need to have the Java EE 5 SDK. Those indicatedpackages are located in that package.
lem@phila at 2007-7-12 10:22:22 > top of Java-index,Java Essentials,New To Java...
# 6
Its a problem with web.xml.Make sure that ur requested url pattern matching with the servlet class .Also check that .class files are generating or not.
Dutt.Javaa at 2007-7-12 10:22:22 > top of Java-index,Java Essentials,New To Java...