Can we define constructors in Servlet?
Answer Posted / qim2010
One can definitely have constructor in servlet. Even you can
use the constructor in servlet for initialization purpose,
but this type of approach is not so common. You can perform
common operations with the constructor as you normally do.
The only thing is that you cannot call that constructor
explicitly by the new keyword as we normally do. In the case
of servlet, servlet container is responsible for
instantiating the servlet, so the constructor is also called
by servlet container only.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is ripple effect?
What is mdb and what is the special feature of that?
Name the eight primitive java types.
How would you reatach detached objects to a session when the same object has already been loaded into the session?
Is jvm a overhead?
How will you pass parameters in RMI? Why do you serialize?
What event results from the clicking of a button?
what is a portable component?
what is a non-repeatable read?
Where can I find seam examples and documentation?
when A client sent a request to the server to open facebook page and close the browser after this request .at that time the same user do login by using a different browser then that session id will exist or not for the same client??
What is JTS?
Why do threads block on i/o?
What classes of exceptions may be caught by a catch clause?
What is the difference between session and entity beans?