Welcome to CodeRanch Nishin Kareem and dharmendra !
-->Servlet is a java class which comply servlet specification, so that it can be run in a server. Java class not required to comply Java Servlet API. - putting this point awkwardly
some other rancher may help you better.