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
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What are different methods of session management in servlets?
What is the use of request dispatcher interface?
What is the difference between the http servlet and generic servlet?
Why are http servlets used in programming?
What’s the difference between genericservlet and httpservlet?
How do we share data using 'getservletcontext ()?
What is servlet in tomcat?
What are the type of protocols used in httpservlet?
What do you mean by scope object and what are its types?
What is servlet and how it works?
What is SingleThreadModel interface?
What is servlet collaboration?
What are the annotations used in servlet 3?
Is java servlet still used?