JamesHolmes.com Struts Resources JamesHolmes.com
Struts Resources

Struts Console
   The Struts Console is a FREE
standalone Java Swing application
for managing Struts-based
applications. With the Struts
Console you can visually edit
Struts, Tiles and Validator
configuration files.
 
   Struts: The Complete Reference, 2nd Edition
by James Holmes
McGraw Hill/Osborne 2006

Download a Sample Chapter


Struts Training
Core Struts: Developing Applications with Apache Struts
Course developed by James Holmes

Reuse Tiles and Simplify UI
by James Holmes
May/Jun 2004 Oracle Magazine
 
Check Your Form with Validator
by James Holmes
Jan/Feb 2004 Oracle Magazine



[PATCH] Allow Multiple Config Files
This is a patch for ActionServlet to allow for multiple config files. With this patch you can specify a comma separated list of config files in web.xml like this:
<init-param>
    <param-name>config</param-name>
    <param-value>
        /WEB-INF/struts-config.xml,
        /WEB-INF/struts-config2.xml,
        /WEB-INF/struts-config3.xml
    </param-value>
</init-param>
This patch is backwards compatible so that existing "config" <init-param> entries in web.xml will still work.

Struts 1.0 Patch
Struts 1.0.1 Patch
Struts 1.0.2 Patch



Breaking Struts Config Files Into Multiple Files
When working with Struts in a team environment, it may be advantageous to break the config file up into multiple smaller files. Breaking the file up allows separate sections of the file to be maintained individually. Below is an example of how to break up a config file.

NOTE: This strategy is NOT supported by Struts Console.



 <?xml version="1.0" encoding="UTF-8"?>

 <!DOCTYPE struts-config PUBLIC
     "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
     "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd" [

     <!ENTITY form_beans	SYSTEM "form_beans.xml">
     <!ENTITY forwards	SYSTEM "forwards.xml">
     <!ENTITY actions	SYSTEM "actions.xml">

 ]>

 <struts-config>

     <!-- source in <form-bean> defintions -->
     &form_beans;

     <!-- source in <forward> defintions -->
     &forwards;

     <!-- source in <action> defintions -->
     &actions;

 </struts-config>


JamesHolmes.com  |  james@jamesholmes.com