if we don't write service method in userservelt(programmer) & write only doGet or doPost then how it will work.
If you're dealing with HTTP servlets, then you usually extend your servlet from HttpServlet, which deals with the service() method. If you extend from GenericServlet, you must implement the abstract service method, otherwise it won't compile.
What is FTPServlet
It is just an example, given by Ashwin, of another kind of class which could extend the GenericServlet. (it does not exist)
Posted by vilas if we don't write service method in userservelt(programmer) & write only doGet or doPost then how it will work.
The HttpServlet has overridden the service method which checks for the incoming request and invokes one of the method doGet,doPost.. depending on the type of request. There is nothing stopping you from overriding the service method of HttpServlet but why do you need to do it when you have the do<Method> available?