Simplest servlet possible...what am I doing wrong
Take this simple servlet:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SimpleCounter extends HttpServlet {
int count = 0;
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
count++;
out.println("Since loading, this servlet has been accessed " +
count + " times.");
}
}
I copied this in tomcat/webapps/Root/Web-inf/classes and in the browser I wrote localhost:8080/servlet/SimpleCounter ....I get: The requested resource (/servlet/SimpleCounter) is not available.
I have jdk1.5.0 and Tomcat 5.0.28...when I type localhost:8080 I get the standard tomcat page..so it's installed corectly...if I run the example servlets they also work so I guess everything is ok from my point of view. The servlet that I copied works because it's taken from a site where I tried it and it worked. So why doesn't it work for me? If I compile this with javac I get the Exception in tread main error. So..anyone can tell me what am I doing wrong? 10x

