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 is difference between get and post method?

572


What is the use of servlet context?

525


Explain Action Servlet?

621


What are session variable in servlets?

560


What are the features added in Servlet 2.5?

765






Write a simple servlet program to print the contents of html.

543


What is a java servlet?

552


How will two or three servlets interact or communicate with each other?

894


Who is responsible to create the object of servlet?

716


Define servlet mapping?

658


Explain the servlet context.

596


What are all the protocols supported by httpservlet?

646


What is the difference between forward () and sendredirect () functions in servlet? Explain

543


What are the different ways we can maintain state between requests?

567


What are the uses of servlet and what is servlet chaining?

559