Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

Install and configure a development Web server in UNIX

Build a fast, functional, and free Web server while jump-starting your UNIX skills

Matthew Skamser, Software Consultant, Solution Destination, Inc.
author photo
Matthew L. Skamser is an IT consultant and Studio B author with more than 10 years of experience architecting, administering, troubleshooting, and tuning Web applications in enterprise server environments. His clients have included IBM, Lockheed Martin/United States Air Force, and WorldBank. He has multiple IBM Certified Systems Expert certifications and received his bachelor's degree in Computer Information Systems from Northern Arizona University. You can reach Matthew at matt@solutiondestination.com.

Summary:  Get a detailed, step-by-step approach to installing and configuring a development or test Apache Tomcat server. Along the way, pick up helpful tips on how to build and administer your Web or application server in a UNIX® environment.

Date:  15 Jul 2008
Level:  Intermediate PDF:  A4 and Letter (358 KB)Get Adobe® Reader®

Activity:  29066 views
Comments:  

Installing the sample application

Tomcat comes with one main sample application. This certainly isn't sufficient to test your specific application needs, but it will provide a functional test of a basic JSP application and basic servlet.

Find the location of the WAR

When you pull up the Tomcat Web Application Manager to deploy your application, you need to know which directory to look in to select the Web Archive (WAR) for deployment. Use the code in Listing 11 to find this file.


Listing 11. Find your WAR file for deployment
                    
bash-3.00# cd $CATALINA_HOME
bash-3.00# find . -name *.war
./webapps/docs/appdev/sample/sample.war
./webapps/sample.war


Open the Tomcat Web Application Manager Console to deploy the server

Under Manager Application, scroll down to the Deploy section, shown in Figure 5.


Figure 5. Sample application deployment
Sample application deployment

Under War file to deploy, simply click Browse. Select the sample application WAR using the path you found above. Click Open, and then click Deploy. Really, it's as simple as that to deploy the sample application.


Test the sample application

After you've deployed the application, you can see whether it came up by going to http://localhost:8080/sample/. Here, you can click JSP, and then click Servlet to verify that these come up and that basic application functionality is there, as shown in Figure 6. The server should now be ready for your application.


Figure 6. Sample application test and verification page
Sample application test and verification page

As you can tell, this is just a verification that your Tomcat server was installed correctly and is functioning as intended. To deploy your personal application, you must follow J2EE guidelines regarding packaging and installing under certain "context roots" under the Tomcat server directory.

8 of 11 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=320065
TutorialTitle=Install and configure a development Web server in UNIX
publish-date=07152008
author1-email=matt@solutiondestination.com
author1-email-cc=mmccrary@us.ibm.com