0

Can you please explain me how the HTTP request will be served in servlet?

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
user492052
  • 151
  • 1
  • 2
  • Related: http://stackoverflow.com/questions/3106452/java-servlet-instantiation-and-session-variables – BalusC Nov 02 '10 at 08:23
  • 1
    Please be more specific. "How" could mean many things, ranging through request interpreation, threading, business logic, response formatting, socket level network access, security, session management and so on. – djna Nov 02 '10 at 09:00

1 Answers1

1

Every request get a new Thread to a instance of servlet. The servlet service methods DOGET OR DOPOST which takes the request and reads the request headers as to what all things a browser accepts. On the basis of request. The servlet creates a responses and send it to the client browser on the same thread.

BenMorel
  • 30,280
  • 40
  • 163
  • 285
sushil bharwani
  • 27,522
  • 29
  • 88
  • 122