when the several requests comes to server..how it manage
the requests

Answer Posted / goutham

When several requests comes to the server,I am assuming here
the requests coming to the same servlet,then the
webcontainer sees whether the Servlet is instantiated if it
is not the servlet is instantiated (only for the first time)
then a thread is spawned for each request and assigned to it.

*servlets does not implement singlethreadmodel , this
interface is depricated and hits the performance very
badly..instead of singlethreadmodel you can use sychronized
blocks(not methods)

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different methods involved in generic servlet?

556


What are the life-cycle methods for a servlet?

555


How can you create a session in servlet?

596


What is the life cycle of a servlet?

789


What is http servlet? Explain with the help of an example.

581






Explain the difference between servletconfig and servletcontext in servlet?

571


How to get the current httpsession object?

653


What is servlet and its use?

627


What are the common methods that are included in the http servlet class?

578


Should I override the service() method?

670


What is servlet collaboration?

663


What are the types of an http request?

582


Describe in brief RequestDespatcher?

596


Which method of the httpservletrequest object is used?

569


What is the difference between the servlets and cgi programs?

551