why not instantiating servet using new operator?



why not instantiating servet using new operator?..

Answer / Uttam Kumar Mishra

In Java, Servlets should be instantiated by the Servlet container (such as Tomcat or GlassFish) and not directly using the `new` operator. This is because Servlets are part of the server-side infrastructure and should be managed by the container, which handles tasks like loading, initializing, and managing servlet instances, as well as providing access to resources such as request and response objects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

1 Answers  


if try is followed by finally block what happen to exception occured in try block

3 Answers   Professional Access,


Hi, I'm doing B.com 3rd year. Simultaneously I'm doing software engineering in a private institution. I would like to know whether my B.com graduation alone is enough to get me a job in the IT field or should I do some PG course not MBA... suggest me...

1 Answers  


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.

1 Answers   Amazon,


how to swap all the values without using temporary variable. tha values r a = 20, x=60 and p=2.

5 Answers   DST Global Solutions, iGate,


what is the system development cycle

1 Answers  


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

1 Answers   SGT,


Delta 5 weight scale not connect with oracle application what i can do?

1 Answers  


what is database?how to tell 3years boy or girl by using toys?

1 Answers  


Is strus threadsafe or not?

1 Answers  


I would like to know what is Intellimatch and some interview questions which could be asked related to Intellimatch.

3 Answers  


Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance

0 Answers  


Categories