You'd most likely will never use GenericServlet. That's a leftover from the early days of servlets when it was imagined that there might be other protocols besides HTTP you might want to use in a servlet. No such implementations ever came to life (besides SIP recently). See https://coderanch.com/how-to/java/ServletsFaq#otherProtocols for some more information.
yeah i agree with Ulf Dittmer... HttpServlet is more advanced than GenericServlet... it is protocol dependent and uses doGet() and doPost() unlike its predecessor... besides, GenericServlet is no longer in use...as coding as evolved...so have the programmers and they have switched to HttpServlet long time back...