doGet() or doPost() methods will be called based on what method you define in the jsp/html i.e. if you define method="post", doPost() will be called, and if you define method="get", doGet() will be called. And again there is easiest way to find out what is getting called when, by using either debugger or logs
Swarna Kota wrote:Output:
Servlet TestServlet at /Servlets------GET
Why do you think you got that output? Just read the replies above to get an idea. You should not override the "service()" method. This post is almost two years old anyway. If you have any doubt you may start a new thread on your own.
And Welcome to JavaRanch