why are using HttpServlet in realtime projects and why are
not using Genericservlet
Answer Posted / prakash
Generic servlet is a abstract class which is not
implementing service() method,to serve the client requests
service method has to execute. and also generic servlet is
containing all general statements,and methods which are
changing by protocol wise.
But HttpServlet is a Http protocol specific class,it is also
one abstract class,eventhough all methods got implemented it
is qualified as abstract class to restrict the creation of
objects. Httpservlt class is implementing service() method
to serve the client requests.
so we are using HttpServlet in realtime projects.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>
What are the different methods of session management in servlets?
What is servlet lazy loading?
How to rectify errors in java servlet while compilation?
What are the disadvantages of storing session state in cookies?
What do you mean by web applications? Explain web application directory arrangement?
What is the advantage of Servlets when compared with other server side technologies?
How does java thread pool work?
What is the purpose of inter-servlet communication?
How do I know if java is running on linux?
Define the servlet mapping.
What is servlet used for?
What is cookies in servlet with example?
Can we refresh servlet in client and server side automatically?
What is servlet in tomcat?