Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General Overview of Environments Question

Status
Not open for further replies.

scripter73

Programmer
Apr 18, 2001
421
US

Hi,

I’m relatively new to Java and Tomcat and I’m having a “baptism by fire” to get my web application completed.

Here’s what’s happening. I am basically writing my web application in JSP. Other team members are creating class packages that I will be able to use. However, my main question is with the environment.

I have a:
- Code repository (like SourceSafe, ClearCase, etc.) where all of the code is to be stored
- I’m supposed to do an ANT build so everyone has “access” to everything

I’m familiar with the checkin/checkout process of these code repositories, but right now, I’m building my JSP code in C:\Tomcat 4.1\webapps\<web app name>. I want to use the classes that are in the repository.

I’ve been told to “do a build”, but my question is if I do that, then will I have all of the code/classes, etc that I need, and then where does my code get placed? I’m having trouble visualizing why I need to do all of these things and how they tie in together. Also, can you explain the purpose of a JAR file in this environment?

Can someone provide a general overview with how these checkin/checkout processes work with ANT and Java programming? I’m basically asking a really big “WHY?” question. Please let me know if I can provide more information.

Thanks in advance for your help.

Scripter73



Change Your Thinking, Change Your Life.
 
OK,

The point of a code repository (like VSS/CVS/SourceSafe etc)is that many people can check out/in code and mean that only one person can modify the code at the same time - this way changes to the code can be tracked and more imprtantly regressed if needed. Respect the rules of this (ie don't edit the files manually).

Ant is just used as a simple build tool that means you check out the VSS/CVS to a local directory and build it into a web application. Depending on how your code repository is organised, often the build will need to be tailored to a web app using ant, so that classes and JSP are organised into a directory format that tomcat or whatever will understand.

The point of a jar file is that it provides a single-point-contact for you build script and the webapp container - ie code for a webapp may come from many directories in VSS/CVS etc but may be wanted to be bundled into one jar file for deployment into tomcat.

We generally checkout/ get latest version of code into a non-tomcat directory, and then use ant to create a .war file which is then deployed into tomcat. Your code can be either deployed within the .war file or dumped into tomcat_home/common/lib - whichever suits you needs (ie if the jar is used by many webapps then common/lib is the way forward - else you may just dump the file in the war's WEB-INF/lib directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top