Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / n.l.narayana
yes., when ever the servlet is executed .,it requires
configuration.,the configuration should be done in init()
method only.,
Is This Answer Correct ? | 4 Yes | 0 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 is pure servlet?
What is the servletconfig object?
Write a program to show the functionality of doget and dopost method?
Should I override the service() method?
What are all the ways for session tracking?
What is the use of java servlet api?
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
What is called Session Tracking?
When Servlet is unloaded?
Why is init() method is used in servlets?
Which event is fired at the time of session creation and destroy?
What is the difference between servlet and jsp?
How servlet is created?
Who is responsible for writing a constructor?