This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Confusion about Deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Confusion about Deployment" Watch "Confusion about Deployment" New topic
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
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1642
    
  23

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
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1642
    
  23

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confusion about Deployment
 
Similar Threads
Working with JSP & Servlet paths
How to enable debugging.
Exploded war is getting deleted during the tomcat shutdown
application server Tomcat and JWS confused..
deploying jsps and servlets to tomcat