Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / abhishek taneja
yes offcourse you can write a constructor for a servlet
after all it is a java class. you can simply provide but if
u do not provide then it is by default include the no
argument constructor that is used by the Init() method in
the servlet life cycle.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
How can you create a session in servlet?
what do you understand by url rewriting?
What are all the protocols supported by httpservlet?
What are the types of an http request?
What are different Authentication options available in Servlets.
What is servlet in tomcat?
What are important features of Servlet 3?
What is the difference between genericservlet and httpservlet
How to get the server information in a servlet?
Can we override servlet service method?
List out difference between a JavaBean from a Servlet?
How does Cookies work in Servlets?
What is servlet initializer?
List the Different types of servlet?