When we don't write any constructor for the servlet, how
does container create an instance of servlet?

Answers were Sorted based on User's Feedback



When we don't write any constructor for the servlet, how does container create an instance of ..

Answer / mahesh

Container creates instance of servlet by calling
Class.forName(className).newInstance().

Is This Answer Correct ?    15 Yes 0 No

When we don't write any constructor for the servlet, how does container create an instance of ..

Answer / sk.jani

In the Servlet if we are not using any constructor
internally the compiler create the default Constructor.if u
want to see that default Constructor user this folling
command.

javap classname.

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More Servlets Interview Questions

Difference between java beans & servlets?

0 Answers  


What is a web container and what is its responsibility?

0 Answers  


How is a servlet implemented in code?

0 Answers  


What is the life cycle of a servlet?

1 Answers  


Why do we have servlet listeners?

0 Answers  






Can we override destroy method in servlet?

0 Answers  


Whether we can get deadlock situation in servlets?

0 Answers  


What is the need of session tracking in web application?

0 Answers  


How threads are implemented in servlets?

3 Answers  


What are the type of protocols used in httpservlet?

0 Answers  


List out the difference between ServletConfig and ServletContext?

0 Answers  


What is servlet mapping?

0 Answers  


Categories