Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / saikiran
that is one of the specification rule that
1.instantiated by constructior with no argument.
2.implementd class should be public and non-abstract.
3.should be implemnt javax.servlet.Servlet
We can Write it
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What if you need to span your transaction across multiple servlet invocations?
What is servlet container. how it works?
Explain request dispatcher and its methods.
Tell us something about servletconfig interface.
Can you send an authentication error from a servlet?
What are some disadvantages of storing session state in cookies?
Why do we need servlet filter?
How can you push data from an Applet to a Servlet?
What exactly is a servlet?
Is that servlet is pure java object or not?
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 string tokenizer?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
Who is responsible for writing a constructor?
What are the difference between session and cookies in servlet? Explain