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

Why is servlet used?

0 Answers  


Differentiate between the get and post method

0 Answers  


What method is used to create database connection in servlets?

2 Answers  


Why do we have servlet listeners?

0 Answers  


Define declaration.

0 Answers  






What are setSecure() and getSecure() methods in Cookies?

1 Answers  


Can you refresh servlet in client and server-side automatically?

0 Answers  


What is servlet in tomcat?

0 Answers  


Explain in detail about applet to servlet communication?

1 Answers  


Which application server is best for java?

0 Answers  


What is a servlet?

0 Answers  


How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255

0 Answers   Bosch, EF,


Categories