Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / ravikiran
we cann't write a constructor because the servlet container
will create the instance of the servlet by calling the
no-arg constructor
| Is This Answer Correct ? | 1 Yes | 8 No |
Post New Answer View All Answers
What are the life-cycle methods for a servlet?
In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify
How do servlets work?
What is a web application and what is it’s directory structure?
Explain how does JSP handle run-time exceptions?
Differentiate between get and post?
explain the advantages of servlet life cycle?
Is servlet a controller?
Can servlet have a constructor ?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
What is the use of java servlet api?
What are the functions of an intercepting filter?
What is cgi and what are its drawbacks?
What are the steps involved in placing a servlet within a package?
A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?