why are using HttpServlet in realtime projects and why are
not using Genericservlet
Answers were Sorted based on User's Feedback
Answer / arun sharma
HttpServlet is Http Protocol Specific whereas Generic
servlet is protocol independent and as we know that on
world wide web only http protocol exists thats why most of
the servlets are developed using HttpServlet class. but id
we want proocol independent servlet in that case we develop
servlet using GenericServlet class.
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / 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 |
What do you mean by web applications? Explain web application directory arrangement?
What do you mean by request dispatcher in servlet? Also explain its methods.
Which httpsession object is used to view and manipulate information about a session?
What are the uses of servlet and what is servlet chaining?
Name the packages that work with servlet?
What are the important functions of filters?
What is the directory structure of web application?
What are the types of protocols supported by httpservlet ?
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 >>
Is Servlet Class Thread safe?????? How to make servlet Thread safe ???
Can we write a constructor for a Servlet class ? if yes how ? if no why not ?
What advantages do servlets have over CGI programs?