Skip to main content


developerWorks  >  Java technology  >

Using multiple Struts configuration files

developerWorks

Level: Introductory

Brett McLaughlin, Sr. (brett@newInstance.com), Author/Editor, O'Reilly Media, Inc.

22 Nov 2005

Register now or sign in using your IBM ID and password.

Breaking a large configuration file into smaller, more manageable parts makes Struts applications easier to organize and maintain. In this tutorial, Brett McLaughlin shows how to set up Apache Struts to use multiple configuration files. The tutorial reviews Struts configuration, takes you step-by-step through execution of a divide-and-conquer configuration strategy, and guides you through some additional configuration cleanup options.

In this tutorial

This tutorial shows Java™ Web developers how to set up Apache Struts to use multiple configuration files. You'll learn about the purpose and structure of the various Struts configuration files and the rationale for working with smaller files. You'll follow steps to split a large, complex struts-config.xml file for an existing Struts application into multiple configuration files that are organized by function. You'll also learn about some other types of cleanup you can do to improve your Struts configurations.


Prerequisites

This tutorial is written for Java Web developers who have at least some basic experience with Apache Struts and the Apache Tomcat servlet engine. You should know how to start and stop Tomcat, install Struts, and deploy a Struts application.


System requirements

You need a machine -- or ISP -- that has a servlet engine installed. I highly recommend you run through this tutorial either locally, on a development machine, or on a nonproduction ISP account. Don't use a machine serving thousands of users because you'll need to make changes to your servlet container (and if your servlet engine doesn't automatically reload the changes, you'll also need to restart the container manually).

  • A text editor of your choice for working with XML.
  • To install Struts.
  • To configure the Struts Online Banking application.


Duration

Under two hours


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed