Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / n.l.narayana
yes., when ever the servlet is executed .,it requires
configuration.,the configuration should be done in init()
method only.,
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is servlet container?
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 >>
Which are the different ways you can communicate between servlets?
What is the need of servlet filters?
What are the servlet events?
How do you run a servlet?
List out difference between a JavaBean from a Servlet?
Which HTTP method is non-idempotent?
Explain web application directory arrangement?
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
Write a simple servlet program to print the contents of html.
What is lazy loading and what is Generic Servlet Class?
What are the phases of servlet life cycle?
When should you prefer to use doget() over dopost()?
What is the difference between the include() and forward() methods?