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
What is context in servlet?
What's the servlet interface?
What are the different methods involved in the process of session management in servlets?
The code in a finally clause will never fail to execute, right?
What is preinitialization of a servlet?
request parameter how to find whether a parameter exists in the request object?
Can we get PrintWriter and ServletOutputStream both in a servlet?
What is the difference between the http servlet and generic servlet?
Define the servlet mapping.
Explain the servlet context.
What is servlet container. how it works?
What is the servlet?
Explain the lifecycle of a servlet?
What is difference between cookies and httpsession?
What are the common methods that are included in the http servlet class?