Answer Posted / sanjay sah
Yes, we can create constructor for servlet but that one
should be public no-args constructor.
If we do not create then compiler itself takes care for
it.Servlet container creates instance of servlet by invoking
public no-agrs constructor.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How do we translate jsp?
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
What is the difference between forward () and sendredirect () functions in servlet? Explain
Explain the concept of ssi ?
why we should override only no-agrs init() method.
Explain servlet life cycle?
Why jsp is better than servlet?
Who is responsible for writing a constructor?
Define the servlet mapping.
What is ServletContext object?
What is http servlet?
How can you run a servlet program?
How are filters?
What exactly is a servlet?
What are all the advantages of servlet over cgi?