Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / sekhar babu
yes, we can write constructor on our own but it should be
no argument public constructor only, cause container will
create the object so it needs no argument constructor.
| Is This Answer Correct ? | 22 Yes | 1 No |
Post New Answer View All Answers
Which httpsession object is used to view and manipulate information about a session?
How to handle exceptions thrown by application with another servlet?
Whats the advantages using servlets over using CGI?
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?
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 if we pass negative value in load-on-startup?
What are the steps that are involved in using the httpservlet class?
What are its drawbacks of cgi?
How will two or three servlets interact or communicate with each other?
How many servlet objects are created?
request parameter how to find whether a parameter exists in the request object?
What is servlet api used for conneting database?
What is getservletcontext?
How can a servlet be used to generate plain text instead of html?
What do you mean by singlethreadmodel interface?