Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how and who deploys servlet to servlet container  RSS feed

 
RabiDas Sharma
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone
I'm new to servlet and jsp.
could anyone please tell me
how servlet is deployed to servlet container?
who deploys servlet to servlet container?

I will tell what i hav understood please rectify if needed

when client presses url then as per the url mapping in web.xml(Deployment descriptor)
a particular servlet gets deployed to servlet container and servlet container
instantiates it and calls service method which inspects HTTP request if request is
get doget() is invoked and if request is post dopost() is invoked..
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's be precise about wording: A servlet does not get deployed - a web app gets deployed. A servlet gets put into service by the servlet container either a) when the web app starts up after deployment (if the load-at-startup feature is used for that servlet), or b) when the first request hits an URL that is mapped to a servlet.
 
RabiDas Sharma
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks dittmer
could you please tell me who and how web app is deployed?



with regards
thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Who: generally by a human being, although it could be done automatically by some build system.

How: depends on the servlet container. For Tomcat, you could drop a war file into the web apps directory, or upload the war file via the Manager web app.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!