20020813 Tuesday August 13, 2002

Struts 1.1 Beta 2 and Log4J From the Struts download page:

Log4J Users Please Note - A packaging error has been uncovered that caused the copy of commons-logging.jar included in the Struts 1.1 Beta 2 release to be built incorrectly. If you are using Log4J for your logging needs, you will need to download the Commons Logging 1.0.1 release (convenient links are provided in the logging directory) and replace your copy of commons-logging.jar with the one found in the 1.0.1 release.

Posted in Java at Aug 13 2002, 03:53:25 PM MDT Add a Comment

Struts 1.1 Beta 2 is released! Your 1.0.x application should work just fine with this latest release - if they don't, post a question to the Struts User List. One reason to upgrade (in my opinion) is that my favorite features, Validator and Tiles, are now part of the core package. And they are now easily configured as "plug-ins" in your struts-config.xml file. Here is how I configure them in my application:

<!-- ========== Plug Ins Configuration ================================== -->
<!-- Validator Plug-In Configuration -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

<!-- Tiles Plug-In Configuration -->
<plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" />
    <set-property property="definitions-debug" value="0" />
    <set-property property="definitions-parser-details" value="1" />
    <set-property property="definitions-parser-validate"
value="true" />
</plug-in>

There is also DynaBeans which make it easy to configure a FormBean in your struts-config.xml file without creating a concrete .java file. Here's an example:

<form-bean name="messageForm" type="org.apache.struts.action.DynaActionForm">
    <form-property name="toName" type="java.lang.String"/>
    <form-property name="toEmail" type="java.lang.String"/>
    <form-property name="subject" type="java.lang.String"/>
    <form-property name="content" type="java.lang.String"/>
</form-bean>

Posted in Java at Aug 13 2002, 02:19:44 AM MDT Add a Comment