一个关于servlet的问题!请指教!!
初学jsp,编辑了一个计算网站访问量的java文件里面用到了servlet,可是 javac报错 说是找不到servlet包是怎么回事 啊?
代码如下
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class HitcountServlet extends HttpServlet
{
static int count;
public void init(ServletConfig config)throws ServletException
{
super.init(config);
}
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletExceptionm,IOException
{
response.setContentType("text/html");
PrintWriter out=response.getWriter();
count++;
out.println("<html>");
out.println("<head><title>basicServlet</title></head>");
out.println("<body>");
out.println("you are user number "+String.valueOf(count)+" visting our web site"+"\n");
out.println("</body></html>");
}
public String getServletInfo()
{
return "Basicservlet Information";
}
}
请高手指教