Author: germuska Date: Wed Apr 27 09:33:27 2005 New Revision: 165007 URL: http://svn.apache.org/viewcvs?rev=165007&view=rev Log: Add tiles-modified version of chain-config.xml and arrange to have it built into struts-tiles JAR. Users who just want Tiles support should not have to handle a chain-config file, but note that this brings some extra overhead to keep this version up-to-date with changes to the one in struts-core.
Added: struts/tiles/trunk/src/resource/ struts/tiles/trunk/src/resource/org/ struts/tiles/trunk/src/resource/org/apache/ struts/tiles/trunk/src/resource/org/apache/struts/ struts/tiles/trunk/src/resource/org/apache/struts/tiles/ struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml (with props) Modified: struts/tiles/trunk/project.xml Modified: struts/tiles/trunk/project.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/project.xml?rev=165007&r1=165006&r2=165007&view=diff ============================================================================== --- struts/tiles/trunk/project.xml (original) +++ struts/tiles/trunk/project.xml Wed Apr 27 09:33:27 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project> -<!-- + <!-- /* * Copyright 2001-2004 The Apache Software Foundation. * @@ -17,58 +17,51 @@ * limitations under the License. */ --> - - - <extend>build/project.xml</extend> - <id>struts-tiles</id> - <name>Struts Tiles</name> - - <inceptionYear>2003</inceptionYear> - <package>org.apache.struts.tiles</package> - <packageGroups> - <packageGroup> - <title>Struts Tiles</title> - <packages>org.apache.struts.tiles</packages> - </packageGroup> - </packageGroups> - - <shortDescription>Tiles library for defining view components.</shortDescription> - - <description> - Tiles can be used to simply define reusable layout components for multiple Servlet "view" - technologies. This library has been extracted from the Struts core. - </description> - - <url>http://struts.apache.org/tiles</url> - <repository> - <connection>scm|svn|http|//svn.apache.org/repos/asf/struts/tiles/trunk</connection> - <developerConnection>scm|svn|https|//svn.apache.org/repos/asf/struts/tiles/trunk</developerConnection> - <url>http://svn.apache.org/repos/asf/struts/tiles/trunk</url> - </repository> - - <dependencies> - - <dependency> - <groupId>struts</groupId> - <artifactId>struts-core</artifactId> - <version>1.3.0-dev</version> - <properties> - <war.bundle>true</war.bundle> - </properties> - <url>http://struts.apache.org/</url> - </dependency> - - </dependencies> - - <build> - <nagEmailAddress/> - <sourceDirectory>src/java</sourceDirectory> - - </build> - - <reports> - <!-- put tiles specific reports here --> - - </reports> - + <extend>build/project.xml</extend> + <pomVersion>3</pomVersion> + <id>struts-tiles:struts-tiles</id> + <artifactId>struts-tiles</artifactId> + <name>Struts Tiles</name> + <groupId>struts-tiles</groupId> + <inceptionYear>2003</inceptionYear> + <package>org.apache.struts.tiles</package> + <packageGroups> + <packageGroup> + <title>Struts Tiles</title> + <packages>org.apache.struts.tiles</packages> + </packageGroup> + </packageGroups> + <shortDescription>Tiles library for defining view components.</shortDescription> + <description>Tiles can be used to simply define reusable layout components for multiple Servlet "view" + technologies. This library has been extracted from the Struts core.</description> + <url>http://struts.apache.org/tiles</url> + <repository> + <connection>scm|svn|http|//svn.apache.org/repos/asf/struts/tiles/trunk</connection> + <developerConnection>scm|svn|https|//svn.apache.org/repos/asf/struts/tiles/trunk</developerConnection> + <url>http://svn.apache.org/repos/asf/struts/tiles/trunk</url> + </repository> + <dependencies> + <dependency> + <groupId>struts</groupId> + <artifactId>struts-core</artifactId> + <version>1.3.0-dev</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + <url>http://struts.apache.org/</url> + </dependency> + </dependencies> + <build> + <sourceDirectory>src/java</sourceDirectory> + <resources> + <resource> + <directory>src/resource</directory> + <includes> + <include>**/*.xml</include> + </includes> + <filtering>false</filtering> + </resource> + </resources> + </build> </project> + Added: struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml?rev=165007&view=auto ============================================================================== --- struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml (added) +++ struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml Wed Apr 27 09:33:27 2005 @@ -0,0 +1,245 @@ +<?xml version="1.0" ?> + + +<!-- + + Copyright 2002,2004 The Apache Software Foundation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> + + +<!-- + This file contains definitions of the standard Chain Of Responsibility + chains that emulate Struts 1.x processing functionality. These chains + are defined in a catalog named "struts" so that the application can + use the default catalog for its own purposes, without any potential for + name clashes. + + $Id$ +--> + + +<catalog name="struts"> + + <define name= "lookup" + className= "org.apache.commons.chain.generic.LookupCommand" /> + <!-- ========== Servlet Complete Request Chain ========================= --> + + <chain name="servlet-standard"> + + <!-- Establish exception handling filter --> + <command + className="org.apache.struts.chain.commands.ExceptionCatcher" + catalogName="struts" + exceptionCommand="servlet-exception"/> + + <lookup + catalogName="struts" + name="process-action" + optional="false"/> + + <lookup + catalogName="struts" + name="process-view" + optional="false"/> + + </chain> + + + <!-- ========== View Processing chain ======================== --> + <chain name="process-action"> + + <!-- + This chain attempts to emulate (most of) the standard request + processing in the standard org.apache.struts.action.RequestProcessor + class, by performing the corresponding tasks in individual Commands + that are composable. The following list defines a cross reference + between the processXxx methods and the Commands that perform the + corresponding functionality: + + processMultipart Integrated into servlet and legacy classes + + processPath SelectAction (which also does processMapping) + + processException ExceptionCatcher / ExceptionHandler + + processLocale SelectLocale + + processContent SetContentType + + processNoCache RequestNoCache + + processPreprocess LookupCommand with optional="true". Multiple + occurrences of this can easily be added, to + support additional processing hooks at any + point in the chain without modifying the + standard definition. + + processMapping SelectAction (which also does processPath) + + processRoles AuthorizeAction + + processActionForm CreateActionForm + + processPopulate PopulateActionForm + + processValidate ValidateActionForm / SelectInput + + processForward SelectForward + + processInclude SelectInclude / PerformInclude + + processActionCreate CreateAction + + processActionPerform ExecuteAction + --> + + + <!-- Look up optional preprocess command --> + <lookup + catalogName="struts" + name="servlet-standard-preprocess" + optional="true"/> + + + <!-- Identify the Locale for this request --> + <command + className="org.apache.struts.chain.commands.servlet.SelectLocale"/> + + + <!-- Set (if needed) no cache HTTP response headers --> + <command + className="org.apache.struts.chain.commands.servlet.RequestNoCache"/> + + + <!-- Set (if needed) the HTTP response content type --> + <command + className="org.apache.struts.chain.commands.servlet.SetContentType"/> + + + <!-- Identify the ActionConfig for this request --> + <command + className="org.apache.struts.chain.commands.servlet.SelectAction"/> + + + <!-- Authorize the selected ActionConfig for this request --> + <command + className="org.apache.struts.chain.commands.servlet.AuthorizeAction"/> + + + <!-- Create (if needed) the ActionForm for this request --> + <command + className="org.apache.struts.chain.commands.CreateActionForm"/> + + + <!-- Populate the ActionForm for this request --> + <command + className="org.apache.struts.chain.commands.servlet.PopulateActionForm"/> + + + <!-- Validate the ActionForm for this request --> + <command + className="org.apache.struts.chain.commands.servlet.ValidateActionForm"/> + + + <!-- Select the appropriate ForwardConfig for return to input page --> + <command + className="org.apache.struts.chain.commands.servlet.SelectInput"/> + + + <!-- Lookup and execute a chain command if the current ActionConfig is + so-configured. --> + <command + className="org.apache.struts.chain.commands.ExecuteCommand"/> + + + <!-- Select the appropriate ForwardConfig for action mappings that only + have an ActionForward --> + <command + className="org.apache.struts.chain.commands.servlet.SelectForward"/> + + + <!-- Select the include uri (if any) for the current action mapping --> + <command + className="org.apache.struts.chain.commands.SelectInclude"/> + + + <!-- Perform the include (if needed) --> + <command + className="org.apache.struts.chain.commands.servlet.PerformInclude"/> + + + <!-- Create (if needed) the Action for this request --> + <command + className="org.apache.struts.chain.commands.servlet.CreateAction"/> + + + <!-- Execute the Action for this request --> + <command + className="org.apache.struts.chain.commands.servlet.ExecuteAction"/> + </chain> + + <!-- ========== View Processing chain ======================== --> + <chain name="process-view"> + + + <!-- Lookup and execute a chain command if the current ForwardConfig is + so-configured. --> + <command + className="org.apache.struts.chain.commands.ExecuteForwardCommand"/> + + <command + className="org.apache.struts.tiles.commands.TilesPreProcessor"/> + + <!-- Follow the returned ForwardConfig (if any) --> + <command + className="org.apache.struts.chain.commands.servlet.PerformForward"/> + + + </chain> + + <!-- ========== Servlet Exception Handler Chain ======================== --> + + <chain name="servlet-exception"> + + <!-- + This chain is designed to be invoked (by o.a.s.c.ExceptionCatcher) + if an unhandled exception is thrown by any subsequent command + in a processing chain (including the one that invokes a Struts + action). The standard definition of this chain supports the + exception mapping of Struts 1.1, but can be replaced in order + to handle exceptions differently. + --> + + <!-- Execute the configured exception handler (if any) --> + <command + className="org.apache.struts.chain.commands.servlet.ExceptionHandler"/> + + <!-- Lookup and execute a chain command if the current ForwardConfig is + so-configured. --> + <command + className="org.apache.struts.chain.commands.ExecuteForwardCommand"/> + + <command + className="org.apache.struts.tiles.commands.TilesPreProcessor"/> + + <!-- Follow the returned ForwardConfig (if any) --> + <command + className="org.apache.struts.chain.commands.servlet.PerformForward"/> + + </chain> + + +</catalog> Propchange: struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: struts/tiles/trunk/src/resource/org/apache/struts/tiles/chain-config.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]