Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / ravi
No..not at all,,,,servlet is a class which is dynamically
loaded...dynamically loaded class never requires
constructors.
Is This Answer Correct ? | 8 Yes | 18 No |
Post New Answer View All Answers
What is cookie in servlet?
What is difference between cookies and httpsession?
What are the steps that are involved in using the httpservlet class?
How many objects of a servlet is created?
What is the difference between CGI and Servlet?
How to create war file?
What is meant by session? Tell me something about httpsession class?
What’s the difference between sendredirect and forward methods
Can servlet have a constructor ?
What mechanisms are used by a Servlet Container to maintain session 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()?
Is servlet a server side scripting language?
Why is a constructor needed in a servlet even if we use the init method?
What is Request Dispatcher?
Describe in brief RequestDespatcher?