Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion about Deployment

 
Simran Dass
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am very confused about what is deployment?


Suppose we are using Tomcat.

1. Suppose Tomcat is NOT running .When we write a jsp and put it in root of the application or put a servlet class file in WEB-INF/classes can we say that we have deployed the jsp and servlet OR do the jsp and the servlet get deployed after Tomcat STARTS running.

2. When we restart Tomcat ( or any other Container) is everything redeployed ?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2281
81
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Simran,

Deployment is about copying your .war file into the correct deployment-directory of your container (e.g. tomcat $CATALINA_HOME/webapps)
When tomcat is starting up it will startup/activate your wep-application.
When we restart Tomcat ( or any other Container) is everything redeployed ?

Yes, but you can even copy a new .war file on the deployment dir while tomcat is running and tomcat will uninstall the old version and install the new version.

have a look at the description tomcat gives:
Tomcat deploy

Regards,
Frits
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frits Walraven wrote:Deployment is about copying your .war file into the correct deployment-directory of your containe


Why do we need a new term "deployment", if the deployment is just "about copying"? This link http://en.wikipedia.org/wiki/Software_deployment have some insights on deployment.
 
Gaurav Sagar
Ranch Hand
Posts: 97
Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deployment is a lot different from the development, its from the application users point of view. It means a standard structure where to put what things, such as .class files in the yourapplication/WEB-INF/classes/ directory, similarly the .jar files in the yourapplication/WEB-INF/lib/ directory. Now this means that all the class files in the classes directory and the jar in the lib directory are set up in the classpath.
Normally for the sake of simplicity the developer just bundles the whole web-application into a .war file which could be copied to the webapps in TOMCAT. I hope you got it.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gaurav Sagar wrote:Deployment is a lot different from the development, its from the application users point of view. It means a standard structure where to put what things, such as .class files in the yourapplication/WEB-INF/classes/ directory, similarly the .jar files in the yourapplication/WEB-INF/lib/ directory. Now this means that all the class files in the classes directory and the jar in the lib directory are set up in the classpath..


Do application users really care about standard structure of the application or how do you put the files together?
 
Simran Dass
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks.

So Frits it means when you copy the files in appropriate directories they get deployed .
When Tomcat starts the appl is activated.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simran Dass wrote:So Frits it means when you copy the files in appropriate directories they get deployed


Nope. Please check this link above - "Software deployment is all of the activities that make a software system available for use"
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2281
81
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So Frits it means when you copy the files in appropriate directories they get deployed .
When Tomcat starts the appl is activated.

There comes a lot more to deployment then only installing and activating, but basically that is as much as you need to know for the exam. The specifications tell you more about the required directory structure before you can do deployment and that is important for the exam. Have a good look at the following Servlet 2.4 specification section:
SRV.9.4 Deployment Hierarchies

Regards,
Frits
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic