Can we define constructor in Servlet class?
Answer Posted / sanjeev kumar
We never can create the Servlet instance. hence there is no
chance of having constructor in servlets. Servlet life
cycle methods (init(), service(), destoy())are called by
the servlet container.
Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
If a servlet is not properly initialized, what exception may be thrown?
What is meant by session? Tell me something about httpsession class?
Can you send an authentication error from a servlet?
Why is init() method is used in servlets?
What do you mean by web applications? Explain web application directory arrangement?
What is the dispatcher servlet?
What is the web server used for running the Servlets?
What is servlet mapping?
Explain the servlet context.
Which is better jsp or servlet?
How do we share data using 'getservletcontext ()?
How servlet is created?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What is a java servlet?
Explain in brief the directory structure of a web application?