| Author |
Confusion about Deployment
|
Simran Dass
Ranch Hand
Joined: Jan 09, 2010
Posts: 183
|
|
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
Rancher
Joined: Apr 07, 2010
Posts: 1043
|
|
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
Joined: Mar 03, 2008
Posts: 470
|
|
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
Joined: Sep 08, 2010
Posts: 97
|
|
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.
|
SCJP 1.6(91%), SCWCD 1.5(100%), SCBCD in progress
|
 |
Misha Ver
Ranch Hand
Joined: Mar 03, 2008
Posts: 470
|
|
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
Joined: Jan 09, 2010
Posts: 183
|
|
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
Joined: Mar 03, 2008
Posts: 470
|
|
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
Rancher
Joined: Apr 07, 2010
Posts: 1043
|
|
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
|
 |
 |
|
|
subject: Confusion about Deployment
|
|
|