Try this Website Hit Counter
hai,
i am trying this program,but not executed,
simple one but error occur,try this and give best solution
run this below program,i got error msg, javax.servlet package does not exit
why this error occur
what is the solution for this
try to give correct solution as soon as possible
i am using j2sdk1.4.0_01
****
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 ServletException,IOException
{
response.setContextType("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)+" visiting our web site"+ "\n");
out.println("</body></html>");
}
public String getServletInfo()
{
return "BasicServlet Information";
}
}

