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
Write a command to get actual path of a servlet to the server?
What do you mean by httpservlet?
How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255
When a client request is sent to the servlet container, how does the container choose which servlet to invoke?
What is the use of request dispatcher interface?
Servlet is pure java object or not?
What do you mean by request dispatcher in servlet? Also explain its methods.
Is it good idea to create servlet constructor?
Which exception is thrown if the servlet is not initialized properly?
How to handle exceptions thrown by application with another servlet?
how the HTML data stored in web server?
How can we achieve transport layer security for our web application?
What are the life cycle methods of a servlet?
What is http servlet?
What are the types of an http request?