Tomcat - how to deploy war and set up classpath

Posted on 2006-06-07
Last Modified: 2013-11-24
Here's what should be a fairly simple question for a Tomcat expert.

I've created a Java web application as a war file and would now like to deploy it to my Tomcat server.

I have Tomcat running fine I just want to add a new application to it, configure the classpath, and run the new app.

How is this accomplished?  I'm running Tomcat 5.0

Question by:aflat362
    LVL 86

    Expert Comment

    LVL 92

    Accepted Solution

    you should just need to drop the war file in your webapps directory. Tomcat will then automatically deploy it for you.

    LVL 1

    Expert Comment

    at webapps directory put your WAR file.
    shutdown Tomcat  then restart it again..
    LVL 30

    Expert Comment

    The server might need to be restarted (if its an old version, I guess).
    LVL 30

    Expert Comment

    Sorry, didn't refresh.
    LVL 3

    Author Comment

    OK -

    After the WAR is in the webapps and I restart, how do I add jar files to my classpath definition for the web app?

    LVL 30

    Assisted Solution

    Keep them in WEB-INF\lib or in Tomcat's common\lib folder, before starting the server.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    scoresClump  challenge 31 87
    count7 challenge 12 52
    Safari, Firefox, IE, Java, Plugin, Java Security error 13 27
    allStar challenge 1 27
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now