You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/31 21:38:44 UTC

svn commit: r265562 [1/4] - in /beehive/trunk/netui: src/core/org/apache/beehive/netui/core/factory/ src/pageflow/org/apache/beehive/netui/pageflow/ src/pageflow/org/apache/beehive/netui/pageflow/config/ src/pageflow/org/apache/beehive/netui/pageflow/h...

Author: ekoneil
Date: Wed Aug 31 12:37:55 2005
New Revision: 265562

URL: http://svn.apache.org/viewcvs?rev=265562&view=rev
Log:
Implement a JavaBean replacement for the XMLBean Document based NetuiConfigDocument model for turning knobs in Beehive.

This change just adds the JavaBeans that are used for configuration but leaves in place the XMLBeans so that it's possible to make this change in two parts.  The JavaBean layer isn't used for anything now but a JUnit test that ensures the correct application of default values.

The conventions followed here are:

- o.a.b.n.u.c.bean package contains *Config classes that have two constructors.  A default, no-args constructor for those JavaBeans that must *always* be available for configuration because they provide some sort of default value.  And, a constructor that takes all of the property values available through the JavaBean.
- XSD enums have been replaced with JDK 5 / XMLBean like enumeration types, for example PreventCache, DocType, etc.
- the ConfigUtil class has been changed to allow for a pluggable ConfigFactory class.  There is an XmlBeanConfigFactory class that provides an implementation to convert the XMLBean to the NetUIConfig JavaBean.

Also included here are changes that:

- rename netui-config.xsd to beehive-netui-config.xsd.  This was just an addition of "beehive-" to the file's name
- move all of the source files in src/core, src/tags, src/pageflow off of the old XMLBean package and onto the new package
- repackage the generated XMLBean from o.a.b.n.u.c.bean.* to o.a.b.n.u.c.internal.xmlbean.generated.*.  This better isolates the XMLBean dependencies.
- add an XmlBeanConfigFactory class that creates a NetUIConfig object from the XMLBean
- there are also some cosmetic changes that remove some of the hierarchy necessitated by XMLBeans to accurately represent XML.  For example, an array of TypeConverter objects is directly available from the NetUIConfig object now.

And, of course, a JUnit test that just makes sure the basics work:
- netui/test/src/junitTests in o.a.b.n.t.u.c.ConfigBeanTest

Once we've agreed that this is a good approach, we can start migrating off of NetuiConfig and onto the new JavaBeans.  In doing that, we'll need to remove some of the APIs on ConfigUtil and ConfigFactory that support fetching both the XMLBean and the JavaBean.

BB: self
DRT: NetUI pass


Added:
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/ConfigFactory.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/BindingContextConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/CustomPropertyConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/DocType.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/ExpressionLanguageConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/ExpressionLanguagesConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/GlobalPageFlowActionInterceptorConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/HandlerConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/IdJavascript.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/InterceptorConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/IteratorFactoryConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/JspTagConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/ModuleConfigLocatorConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/MultipartHandler.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/NetUIConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PageFlowActionInterceptorsConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PageFlowConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PageFlowFactoriesConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PageFlowFactoryConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PageFlowHandlersConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PerActionInterceptorConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PerPageFlowActionInterceptorConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PrefixHandlerConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/PreventCache.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/RequestInterceptorsConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/SharedFlowRefConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/SimpleActionInterceptorConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/TypeConverterConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/bean/UrlConfig.java   (with props)
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/internal/
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/internal/XmlBeanConfigFactory.java   (with props)
    beehive/trunk/netui/src/util/schema/netui-config/beehive-netui-config.xsd
      - copied unchanged from r264166, beehive/trunk/netui/src/util/schema/netui-config/netui-config.xsd
    beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/ConfigBeanTest.java   (with props)
Removed:
    beehive/trunk/netui/src/util/schema/netui-config/netui-config.xsd
Modified:
    beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/Factory.java
    beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/FactoryUtils.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/config/PageFlowControllerConfig.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/handler/Handlers.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/InterceptorContext.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/action/ActionInterceptorContext.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/request/RequestInterceptorContext.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/LegacySettings.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/URIContextFactory.java
    beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/ExpressionEvaluatorFactory.java
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/TagConfig.java
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RewriteURL.java
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/rendering/TagRenderingBase.java
    beehive/trunk/netui/src/util/beehive-netui-config-default.xml
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/ConfigInitializationException.java
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/config/ConfigUtil.java
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/iterator/IteratorFactory.java
    beehive/trunk/netui/src/util/org/apache/beehive/netui/util/type/TypeUtils.java
    beehive/trunk/netui/src/util/schema/netui-config/config.xsdconfig
    beehive/trunk/netui/test/ant/junitCore.xml
    beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/ConfigTest.java
    beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/TestConfigUtil.java

Modified: beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/Factory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/Factory.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/Factory.java (original)
+++ beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/Factory.java Wed Aug 31 12:37:55 2005
@@ -17,9 +17,6 @@
  */
 package org.apache.beehive.netui.core.factory;
 
-import org.apache.beehive.netui.util.config.bean.CustomProperty;
-import org.apache.beehive.netui.util.config.bean.PageflowFactory;
-import org.apache.beehive.netui.util.internal.DiscoveryUtils;
 import org.apache.beehive.netui.util.logging.Logger;
 
 import javax.servlet.ServletContext;

Modified: beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/FactoryUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/FactoryUtils.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/FactoryUtils.java (original)
+++ beehive/trunk/netui/src/core/org/apache/beehive/netui/core/factory/FactoryUtils.java Wed Aug 31 12:37:55 2005
@@ -17,8 +17,8 @@
  */
 package org.apache.beehive.netui.core.factory;
 
-import org.apache.beehive.netui.util.config.bean.CustomProperty;
-import org.apache.beehive.netui.util.config.bean.PageflowFactory;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowFactory;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.CustomProperty;
 import org.apache.beehive.netui.util.internal.DiscoveryUtils;
 import org.apache.beehive.netui.util.logging.Logger;
 

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java Wed Aug 31 12:37:55 2005
@@ -27,8 +27,8 @@
 import org.apache.beehive.netui.util.Bundle;
 import org.apache.beehive.netui.util.internal.DiscoveryUtils;
 import org.apache.beehive.netui.util.config.ConfigUtil;
-import org.apache.beehive.netui.util.config.bean.ModuleConfigLocators;
-import org.apache.beehive.netui.util.config.bean.PageflowConfig;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.ModuleConfigLocators;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowConfig;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.commons.digester.Digester;
 import org.apache.struts.Globals;

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java Wed Aug 31 12:37:55 2005
@@ -26,8 +26,8 @@
 import org.apache.beehive.netui.pageflow.handler.ReloadableClassHandler;
 import org.apache.beehive.netui.util.internal.FileUtils;
 import org.apache.beehive.netui.util.logging.Logger;
-import org.apache.beehive.netui.util.config.bean.PageflowFactories;
-import org.apache.beehive.netui.util.config.bean.PageflowFactory;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowFactories;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowFactory;
 import org.apache.beehive.netui.util.config.ConfigUtil;
 
 import javax.servlet.http.HttpServletRequest;

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java Wed Aug 31 12:37:55 2005
@@ -21,11 +21,11 @@
 import org.apache.beehive.netui.core.factory.FactoryUtils;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.beehive.netui.util.config.ConfigUtil;
-import org.apache.beehive.netui.util.config.bean.PageflowConfig;
-import org.apache.beehive.netui.util.config.bean.DefaultSharedFlowRefs;
-import org.apache.beehive.netui.util.config.bean.SharedFlowRef;
-import org.apache.beehive.netui.util.config.bean.PageflowFactories;
-import org.apache.beehive.netui.util.config.bean.PageflowFactory;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowConfig;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.DefaultSharedFlowRefs;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.SharedFlowRef;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowFactories;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowFactory;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 import org.apache.beehive.netui.pageflow.config.PageFlowControllerConfig;
@@ -50,46 +50,46 @@
 
 /**
  * Factory for creating {@link FlowController}s - user {@link PageFlowController}s and {@link SharedFlowController}s.
- */ 
+ */
 public class FlowControllerFactory
         extends Factory
 {
     private static final Logger _log = Logger.getInstance( FlowControllerFactory.class );
-    
+
     private static final String CONTEXT_ATTR = InternalConstants.ATTR_PREFIX + "fcFactory";
-    
+
     private transient ReloadableClassHandler _rch;
-    
+
     protected FlowControllerFactory()
     {
     }
-    
+
     protected void onCreate()
     {
     }
-    
+
     static void init( ServletContext servletContext )
     {
         PageflowFactories factoriesBean = ConfigUtil.getConfig().getPageflowFactories();
         FlowControllerFactory factory = null;
-        
+
         if ( factoriesBean != null )
         {
             PageflowFactory fcFactoryBean = factoriesBean.getFlowcontrollerFactory();
             factory = ( FlowControllerFactory ) FactoryUtils.getFactory( servletContext, fcFactoryBean, FlowControllerFactory.class );
         }
-        
+
         if ( factory == null ) factory = new FlowControllerFactory();
         factory.reinit( servletContext );
-        
+
         servletContext.setAttribute( CONTEXT_ATTR, factory );
     }
 
     /**
      * Called to reinitialize this instance, most importantly after it has been serialized/deserialized.
-     * 
+     *
      * @param servletContext the current ServletContext.
-     */ 
+     */
     protected void reinit( ServletContext servletContext )
     {
         super.reinit( servletContext );
@@ -98,10 +98,10 @@
 
     /**
      * Get a FlowControllerFactory.
-     * 
+     *
      * @param servletContext the current ServletContext.
      * @return a FlowControllerFactory for the given ServletContext.  It may or may not be a cached instance.
-     */ 
+     */
     public static FlowControllerFactory get( ServletContext servletContext )
     {
         FlowControllerFactory factory = ( FlowControllerFactory ) servletContext.getAttribute( CONTEXT_ATTR );
@@ -110,12 +110,12 @@
         factory.reinit( servletContext );
         return factory;
     }
-    
+
     /**
-     * Get the page flow instance that should be associated with the given request.  If it doesn't exist, create it. 
+     * Get the page flow instance that should be associated with the given request.  If it doesn't exist, create it.
      * If one is created, the page flow stack (for nesting) will be cleared or pushed, and the new instance will be
      * stored as the current page flow.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @return the {@link PageFlowController} for the request, or <code>null</code> if none was found.
      */
@@ -124,13 +124,13 @@
     {
         String servletPath = InternalUtils.getDecodedServletPath( context.getHttpRequest() );
         return getPageFlowForPath( context, servletPath );
-    }     
-    
+    }
+
     /**
-     * Get the page flow instance that should be associated with the given path.  If it doesn't exist, create it. 
+     * Get the page flow instance that should be associated with the given path.  If it doesn't exist, create it.
      * If one is created, the page flow stack (for nesting) will be cleared or pushed, and the new instance will be
      * stored as the current page flow.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @param path a <strong>webapp-relative</strong> path.  The path should not contain the webapp context path.
      * @return the {@link PageFlowController} for the given path, or <code>null</code> if none was found.
@@ -142,12 +142,12 @@
         HttpServletResponse response = context.getHttpResponse();
         PageFlowController cur = PageFlowUtils.getCurrentPageFlow( request, getServletContext() );
         String parentDir = PageFlowUtils.getModulePathForRelativeURI( path );
-        
+
         //
         // Reinitialize transient data that may have been lost on session failover.
         //
         if ( cur != null ) cur.reinitialize( request, response, getServletContext() );
-        
+
         //
         // If there's no current PageFlow, or if the current PageFlowController has a module path that
         // is incompatible with the current request URI, then create the appropriate PageFlowController.
@@ -165,14 +165,14 @@
                 return null;
             }
         }
-        
+
         return cur;
-    }     
-    
+    }
+
     /**
      * Create a page flow of the given type.  The page flow stack (for nesting) will be cleared or pushed, and the new
      * instance will be stored as the current page flow.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @param pageFlowClassName the type name of the desired page flow.
      * @return the newly-created {@link PageFlowController}, or <code>null</code> if none was found.
@@ -182,13 +182,13 @@
     {
         Class pageFlowClass = getFlowControllerClass( pageFlowClassName );
         return createPageFlow( context, pageFlowClass );
-    }    
-    
+    }
+
     /**
      * Create a {@link PageFlowController} of the given type.  The PageFlowController stack (for
      * nesting) will be cleared or pushed, and the new instance will be stored as the current
      * PageFlowController.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @param pageFlowClass the type of the desired PageFlowController.
      * @return the newly-created PageFlowController, or <code>null</code> if none was found.
@@ -197,7 +197,7 @@
             throws InstantiationException, IllegalAccessException
     {
         if ( ! PageFlowController.class.isAssignableFrom( pageFlowClass ) ) return null;
-        
+
         //
         // First check if this is a request for a "long lived" page flow.  If so, try
         // PageFlowUtils.getCurrentPageFlow again, with the longLived flag.
@@ -208,18 +208,18 @@
         PageFlowController retVal = null;
         String modulePath = InternalUtils.inferModulePathFromClassName( pageFlowClass.getName() );
         ModuleConfig mc = ensureModule( modulePath, request, servletContext );
-        
+
         if ( mc == null )
         {
             _log.error( "Struts module " + modulePath + " not found for " + pageFlowClass.getName()
                         + "; cannot create page flow.");
             return null;
         }
-        
+
         if ( InternalUtils.isLongLived( mc ) )
         {
             retVal = PageFlowUtils.getLongLivedPageFlow( modulePath, request );
-            
+
             if ( _log.isDebugEnabled() )
             {
                 if ( retVal != null )
@@ -228,7 +228,7 @@
                 }
             }
         }
-        
+
         //
         // First, see if this is a nested page flow that's already on the stack.  Unless "renesting" is explicitly
         // enabled, we don't want to allow another instance of this page flow to be nested.  This is a common
@@ -244,15 +244,15 @@
         boolean createdNew = false;
         boolean isNestable = InternalUtils.isNestable( mc );
         PageFlowStack pfStack = PageFlowStack.get( request, getServletContext(), false );
-        
+
         if ( isNestable && pfStack != null )
         {
             PageflowConfig options = ConfigUtil.getConfig().getPageflowConfig();
-            
+
             if ( options == null || ! options.getEnableSelfNesting() )
             {
                 int lastIndexOfJpfClass = pfStack.lastIndexOf( request, pageFlowClass );
-                
+
                 if ( lastIndexOfJpfClass != -1 )
                 {
                     retVal = pfStack.popUntil( request, lastIndexOfJpfClass );
@@ -261,7 +261,7 @@
                 }
             }
         }
-        
+
         //
         // OK, if it's not an existing long lived page flow, and if this wasn't a nested page flow already on the
         // stack, then create a new instance.
@@ -272,11 +272,11 @@
             {
                 _log.debug( "Creating PageFlowController of type " + pageFlowClass.getName() );
             }
-            
+
             retVal = ( PageFlowController ) getFlowControllerInstance( pageFlowClass );
             createdNew = true;
         }
-        
+
         //
         // Store the previous PageFlowController on the nesting stack (if this one is nestable),
         // or destroy the nesting stack.
@@ -288,18 +288,18 @@
             //
             if ( createdNew ) retVal.create( request, response, servletContext );
             PageFlowController current = PageFlowUtils.getCurrentPageFlow( request, getServletContext() );
-            
+
             if ( current != null )
             {
                 if ( _log.isDebugEnabled() )
                 {
                     _log.debug( "Pushing PageFlowController " + current + " onto the nesting stack" );
                 }
-                
+
                 if ( pfStack == null ) pfStack = PageFlowStack.get( request, getServletContext(), true );
                 pfStack.push( current, request );
             }
-            
+
             retVal.reinitialize( request, response, servletContext );
             retVal.persistInSession( request, response );
         }
@@ -314,7 +314,7 @@
                 {
                     _log.debug( "Destroying the PageFlowController stack." );
                 }
-                
+
                 //
                 // Start popping page flows until 1) there are none left on the stack, or 2) we find
                 // one of the type we're returning.  If (2), we'll use that one (this means that executing
@@ -322,7 +322,7 @@
                 // page flow only to create a new instance of it).
                 //
                 PageFlowController onStackAlready = pfStack.popUntil( request, retVal.getClass() );
-                
+
                 if ( onStackAlready != null )
                 {
                     if ( _log.isDebugEnabled() )
@@ -330,7 +330,7 @@
                         _log.debug( "Found a page flow of type " + retVal.getClass() + " in the stack; "
                                     + "using that instance and stopping destruction of the nesting stack." );
                     }
-                    
+
                     retVal = onStackAlready;
                     retVal.persistInSession( request, response );
                 }
@@ -358,13 +358,13 @@
                 if ( createdNew ) retVal.create( request, response, servletContext );
             }
         }
-        
+
         return retVal;
     }
-    
+
     /**
      * Create a {@link SharedFlowController} of the given type.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @param sharedFlowClassName the type name of the desired SharedFlowController.
      * @return the newly-created SharedFlowController, or <code>null</code> if none was found.
@@ -374,11 +374,11 @@
     {
         Class sharedFlowClass = getFlowControllerClass( sharedFlowClassName );
         return createSharedFlow( context, sharedFlowClass );
-    }    
-    
+    }
+
     /**
      * Create a {@link SharedFlowController} of the given type.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @param sharedFlowClass the type of the desired SharedFlowController.
      * @return the newly-created SharedFlowController, or <code>null</code> if none was found.
@@ -387,56 +387,56 @@
             throws InstantiationException, IllegalAccessException
     {
         assert SharedFlowController.class.isAssignableFrom( sharedFlowClass ) : sharedFlowClass.getName();
-        
+
         if ( _log.isDebugEnabled() )
         {
             _log.debug( "Creating SharedFlowController of type " + sharedFlowClass.getName() );
         }
-        
+
         SharedFlowController retVal = ( SharedFlowController ) getFlowControllerInstance( sharedFlowClass );
         HttpServletRequest request = context.getHttpRequest();
         HttpServletResponse response = context.getHttpResponse();
         retVal.create( request, response, getServletContext() );
-        
+
         if ( _log.isDebugEnabled() )
         {
             _log.debug( "Storing " + retVal + " in the session..." );
         }
-        
+
         retVal.persistInSession( request, response );
         return retVal;
     }
-    
+
     /**
      * Get the map of shared flows for the given request.  The map is derived from the shared flows
      * that are declared (through the <code>sharedFlowRefs</code> attribute of
      * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.Controller &#64;Jpf.Controller}) in the page flow for the request.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @return a Map of shared-flow-name (String) to {@link SharedFlowController}.
      * @throws ClassNotFoundException if a declared shared flow class could not be found.
      * @throws InstantiationException if a declared shared flow class could not be instantiated.
      * @throws IllegalAccessException if a declared shared flow class was not accessible.
-     */ 
+     */
     public Map/*< String, SharedFlowController >*/ getSharedFlowsForRequest( RequestContext context )
             throws ClassNotFoundException, InstantiationException, IllegalAccessException
     {
         String path = InternalUtils.getDecodedServletPath( context.getHttpRequest() );
         return getSharedFlowsForPath( context, path );
     }
-    
+
     /**
      * Get the map of shared flows for the given path.  The map is derived from the shared flows
      * that are declared (through the <code>sharedFlowRefs</code> attribute of
      * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.Controller &#64;Jpf.Controller}) in the page flow for the path.
-     * 
+     *
      * @param context a {@link RequestContext} object which contains the current request and response.
      * @param path a <strong>webapp-relative</strong> path.  The path should not contain the webapp context path.
      * @return a Map of shared-flow-name (String) to {@link SharedFlowController}.
      * @throws ClassNotFoundException if a declared shared flow class could not be found.
      * @throws InstantiationException if a declared shared flow class could not be instantiated.
      * @throws IllegalAccessException if a declared shared flow class was not accessible.
-     */ 
+     */
     public Map/*< String, SharedFlowController >*/ getSharedFlowsForPath( RequestContext context, String path )
         throws ClassNotFoundException, InstantiationException, IllegalAccessException
     {
@@ -445,19 +445,19 @@
         HttpServletResponse response = context.getHttpResponse();
         ModuleConfig mc = InternalUtils.ensureModuleConfig( parentDir, request, getServletContext() );
         LinkedHashMap/*< String, SharedFlowController >*/ sharedFlows = getDefaultSharedFlows( context );
-        
+
         if ( mc != null )
         {
             ControllerConfig cc = mc.getControllerConfig();
-            
+
             if ( cc instanceof PageFlowControllerConfig )
             {
                 Map/*< String, String >*/ sharedFlowTypes = ( ( PageFlowControllerConfig ) cc ).getSharedFlowTypes();
-                
+
                 if ( sharedFlowTypes != null && sharedFlowTypes.size() > 0 )
                 {
                     if ( sharedFlows == null ) sharedFlows = new LinkedHashMap/*< String, SharedFlowController >*/();
-                    
+
                     for ( Iterator/*<Map.Entry>*/ i = sharedFlowTypes.entrySet().iterator(); i.hasNext(); )
                     {
                         Map.Entry entry = ( Map.Entry ) i.next();
@@ -465,17 +465,17 @@
                         String type = ( String ) entry.getValue();
                         addSharedFlow( context, name, type, sharedFlows );
                     }
-                    
+
                     return sharedFlows;
                 }
             }
         }
-        
+
         //
         // Legacy behavior: if there's no shared flow for the request, initialize a GlobalApp instance.
         //
         SharedFlowController ga = PageFlowUtils.getGlobalApp( request );
-        
+
         if ( ga != null )
         {
             ga.reinitialize( request, response, getServletContext() );
@@ -484,23 +484,23 @@
         {
             getGlobalApp( request, response, getServletContext() );
         }
-        
+
         return sharedFlows;
     }
-    
+
     LinkedHashMap/*< String, SharedFlowController >*/ getDefaultSharedFlows( RequestContext context )
             throws ClassNotFoundException, InstantiationException, IllegalAccessException
     {
         DefaultSharedFlowRefs defaultRefs = ConfigUtil.getConfig().getDefaultSharedFlowRefs();
-        
+
         if ( defaultRefs != null )
         {
             SharedFlowRef[] refs = defaultRefs.getSharedFlowRefArray();
-           
+
             if ( refs.length > 0 )
             {
                 LinkedHashMap/*< String, SharedFlowController >*/ sharedFlows = new LinkedHashMap();
-                
+
                 for ( int i = 0; i < refs.length; i++ )
                 {
                     SharedFlowRef ref = refs[i];
@@ -511,7 +511,7 @@
                     }
                     addSharedFlow( context, ref.getName(), ref.getType(), sharedFlows );
                 }
-                
+
                 return sharedFlows;
             }
         }

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java Wed Aug 31 12:37:55 2005
@@ -17,15 +17,13 @@
  */
 package org.apache.beehive.netui.pageflow;
 
-import org.apache.beehive.netui.util.internal.InternalStringBuilder;
-
 import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 import org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrapper;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 import org.apache.beehive.netui.pageflow.handler.Handlers;
 import org.apache.beehive.netui.pageflow.handler.FlowControllerHandlerContext;
 import org.apache.beehive.netui.pageflow.handler.ForwardRedirectHandler;
-import org.apache.beehive.netui.pageflow.config.PageFlowControllerConfig;
+import org.apache.beehive.netui.util.internal.InternalStringBuilder;
 import org.apache.beehive.netui.util.internal.ServletUtils;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.struts.config.ModuleConfig;
@@ -38,10 +36,6 @@
 import java.io.Serializable;
 import java.io.IOException;
 import java.util.Map;
-import java.util.List;
-import java.util.Collection;
-
-
 
 /**
  * ActionServlet that dynamically registers modules based on naming/location conventions for Struts

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java Wed Aug 31 12:37:55 2005
@@ -26,8 +26,8 @@
 import org.apache.beehive.netui.pageflow.internal.LegacySettings;
 import org.apache.beehive.netui.util.config.ConfigInitializationException;
 import org.apache.beehive.netui.util.config.ConfigUtil;
-import org.apache.beehive.netui.util.config.bean.PrefixHandlers;
-import org.apache.beehive.netui.util.config.bean.UrlConfig;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PrefixHandlers;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.UrlConfig;
 import org.apache.beehive.netui.util.internal.DiscoveryUtils;
 import org.apache.beehive.netui.util.logging.Logger;
 

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java Wed Aug 31 12:37:55 2005
@@ -52,7 +52,7 @@
 import org.apache.beehive.netui.util.internal.FileUtils;
 import org.apache.beehive.netui.util.internal.ServletUtils;
 import org.apache.beehive.netui.util.config.ConfigUtil;
-import org.apache.beehive.netui.util.config.bean.PageflowConfig;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.PageflowConfig;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.struts.Globals;
 import org.apache.struts.action.Action;
@@ -109,7 +109,7 @@
     private static int requestNumber = 0;
 
     private static final Logger _log = Logger.getInstance( PageFlowRequestProcessor.class );
-    
+
     private static final String ACTION_OVERRIDE_PARAM_PREFIX = "actionOverride:";
     private static final int    ACTION_OVERRIDE_PARAM_PREFIX_LEN = ACTION_OVERRIDE_PARAM_PREFIX.length();
     private static final String SCHEME_UNSECURE = "http";
@@ -118,8 +118,8 @@
     private static final String REDIRECT_REQUEST_ATTRS_PARAM = "forceRedirect";
     private static final String FLOW_CONTROLLER_ACTION_CLASSNAME = FlowControllerAction.class.getName();
     private static final NullActionForm NULL_ACTION_FORM = new NullActionForm();
-    
-    
+
+
     private Map/*< String, Class >*/ _formBeanClasses = new HashMap/*< String, Class >*/();
     private Map/*< String, List< ActionMapping > >*/ _overloadedActions = new HashMap/*< String, List< ActionMapping > >*/();
     private ServletContainerAdapter _servletContainerAdapter;
@@ -128,7 +128,7 @@
     private LegacySettings _legacySettings;
     private InternalConcurrentHashMap/*< String, Class >*/ _pageServletClasses = new InternalConcurrentHashMap/*< String, Class >*/();
     private PageFlowPageFilter _pageServletFilter;
-    
+
     protected Action processActionCreate( HttpServletRequest request, HttpServletResponse response,
                                           ActionMapping actionMapping )
         throws IOException
@@ -142,7 +142,7 @@
             assert fc.getClass().getName().equals( actionMapping.getParameter() )
                     : "current page flow  type " + fc.getClass().getName() + " does not match type specified in "
                       + FLOW_CONTROLLER_ACTION_CLASSNAME + ": " + actionMapping.getParameter();
-            
+
             Action action = new FlowControllerAction( fc );
             action.setServlet( servlet );
             return action;
@@ -154,7 +154,7 @@
     /**
      * Same as code in RequestUtils.createActionForm(), but doesn't try to get the form bean out of
      * the request/session (i.e., always creates a new one).
-     */ 
+     */
     private ActionForm createActionForm( ActionMapping mapping, HttpServletRequest request )
     {
         String name = mapping.getName();
@@ -164,7 +164,7 @@
 
         FormBeanConfig config = moduleConfig.findFormBeanConfig( name );
         ActionForm instance;
-        
+
         //
         // Create the form bean.  There's special handling for dyna-form-beans.
         //
@@ -175,7 +175,7 @@
                 DynaActionFormClass dynaClass = DynaActionFormClass.createDynaActionFormClass( config );
                 instance = ( ActionForm ) dynaClass.newInstance();
                 ( ( DynaActionForm ) instance ).initialize( mapping );
-                
+
                 if ( _log.isDebugEnabled() )
                 {
                     _log.debug( " Creating new DynaActionForm instance " + "of type '" + config.getType() + '\'' );
@@ -192,7 +192,7 @@
             try
             {
                 instance = ( ActionForm ) InternalUtils.newReloadableInstance( config.getType(), getServletContext() );
-                
+
                 if ( _log.isDebugEnabled() )
                 {
                     _log.debug( " Creating new ActionForm instance " + "of type '" + config.getType() + '\'' );
@@ -204,18 +204,18 @@
                 return null;
             }
         }
-        
+
         instance.setServlet( servlet );
         return instance;
     }
-    
+
     private Field getPageFlowScopedFormMember( ActionMapping mapping, HttpServletRequest request )
     {
         if ( mapping instanceof PageFlowActionMapping )
         {
             PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
             String formMember = pfam.getFormMember();
-            
+
             try
             {
                 if ( formMember != null )
@@ -231,10 +231,10 @@
                 _log.error( "Could not use page flow member " + formMember + " as the form bean.", e );
             }
         }
-        
+
         return null;
     }
-    
+
     protected ActionForm processActionForm( HttpServletRequest request, HttpServletResponse response,
                                             ActionMapping mapping )
     {
@@ -242,7 +242,7 @@
         // See if we're using a pageflow-scoped form (a member variable in the current pageflow).
         //
         Field formMemberField = getPageFlowScopedFormMember( mapping, request );
-        
+
         //
         // First look to see whether the input form was overridden in the request.
         // This happens when a pageflow action forwards to another pageflow,
@@ -251,7 +251,7 @@
         // parameters.
         //
         ActionForm previousForm = InternalUtils.getForwardedFormBean( request, false );
-        
+
         if ( previousForm != null )
         {
             //
@@ -272,14 +272,14 @@
                                   + " as the form bean.", e );
                 }
             }
-            
+
             //
             // Return the forwarded form.
             //
             previousForm.setServlet( servlet );
             return previousForm;
         }
-        
+
         //
         // First see if the previous action put a pageflow-scoped form in the request.  If so, remove it;
         // we don't want a normal request-scoped action to use this pageflow-scoped form.
@@ -290,7 +290,7 @@
             request.removeAttribute( pageFlowScopedFormName );
             PageFlowRequestWrapper.get( request ).setPageFlowScopedFormName( null );
         }
-        
+
         //
         // If this action specifies a pageflow-scoped form member variable, use it.
         //
@@ -300,14 +300,14 @@
             {
                 FlowController fc = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
                 ActionForm form = InternalUtils.wrapFormBean( formMemberField.get( fc ) );
-                
+
                 if ( form == null ) // the pageflow hasn't filled the value yet
                 {
                     form = createActionForm( mapping, request );
                     form.reset( mapping, request );
                     formMemberField.set( fc, InternalUtils.unwrapFormBean( form ) );
                 }
-                
+
                 //
                 // Store the form in the right place in the request, so Struts can see it.
                 // But, mark a flag so we know to remove this on the next action request -- we don't
@@ -324,16 +324,16 @@
                 _log.error( "Could not access page flow member " + formMemberField.getName() + " as the form bean.", e );
             }
         }
-        
+
         ActionForm bean = super.processActionForm( request, response, mapping );
         if ( bean == null )
         {
             bean = InternalUtils.createActionForm( mapping, moduleConfig, servlet, getServletContext() );
         }
-        
+
         return bean;
     }
-    
+
     protected void processPopulate( HttpServletRequest request, HttpServletResponse response, ActionForm form,
                                     ActionMapping mapping )
         throws ServletException
@@ -368,7 +368,7 @@
         PageFlowRequestWrapper requestWrapper = PageFlowRequestWrapper.get( request );
         boolean alreadyCalledInRequest = requestWrapper.isProcessPopulateAlreadyCalled();
         if ( ! alreadyCalledInRequest ) requestWrapper.setProcessPopulateAlreadyCalled( true );
-        
+
         //
         // If this is a forwarded request and the form-bean is null, don't call to ProcessPopulate.
         // We don't want to expose errors due to parameters from the original request, which won't
@@ -381,7 +381,7 @@
             // no databinding errors when the override action does not use a form bean.
             //
             if ( form == null && requestWrapper.isForwardedByButton() ) form = NULL_ACTION_FORM;
-            
+
             ProcessPopulate.populate( request, response, form, alreadyCalledInRequest );
         }
     }
@@ -389,14 +389,14 @@
     /**
      * The requested action can be overridden by a request parameter.  In this case, we parse the action from
      * the request parameter and forward to a URI constructed from it.
-     * 
+     *
      * @param request the current HttpServletRequest
      * @param response the current HttpServletResponse
      * @return <code>true</code> if the action was overridden by a request parameter, in which case the request
      *         was forwarded.
      * @throws IOException
-     * @throws ServletException    
-     */ 
+     * @throws ServletException
+     */
     protected boolean processActionOverride( HttpServletRequest request, HttpServletResponse response )
         throws IOException, ServletException
     {
@@ -413,7 +413,7 @@
             // interface that makes them look like normal request parameters.
             //
             HttpServletRequest multipartAwareRequest = processMultipart( request );
-            
+
             for ( Enumeration e = multipartAwareRequest.getParameterNames(); e.hasMoreElements(); )
             {
                 String paramName = ( String ) e.nextElement();
@@ -437,10 +437,10 @@
                 }
             }
         }
-        
+
         return false;
     }
-    
+
     private void processInternal( HttpServletRequest request, HttpServletResponse response )
             throws IOException, ServletException
     {
@@ -449,7 +449,7 @@
         // is faster than sticking everything into attributes on the request (then basically reading from a HashMap).
         //
         request = PageFlowRequestWrapper.wrapRequest( request );
-        
+
         String uri = InternalUtils.getDecodedServletPath( request );
         ServletContext servletContext = getServletContext();
 
@@ -471,7 +471,7 @@
                     _log.debug( "checkSecurity() caused a redirect.  Ending processing for this request "
                                + '(' + uri + ')' );
                 }
-                
+
                 return;
             }
         }
@@ -512,7 +512,7 @@
         // the request parameter and forward to a URI constructed from it.  If this happens, just return.
         //
         if ( processActionOverride( request, response ) ) return;
-        
+
         //
         // Process any direct request for a page flow by forwarding to its "begin" action.
         //
@@ -522,7 +522,7 @@
         // Get the FlowController for this request (page flow or shared flow), and cache it in the request.
         //
         String flowControllerClassName = InternalUtils.getFlowControllerClassName( moduleConfig );
-        
+
         if ( flowControllerClassName == null &&
              ! ( moduleConfig instanceof AutoRegisterActionServlet.MissingRootModuleControllerConfig ) )
         {
@@ -534,7 +534,7 @@
                         + " as the request processor, but the <controller> element does not contain a <set-property>"
                         + " for \"controllerClass\".  Page Flow actions in this module may not be handled correctly." );
         }
-        
+
         //
         // Create the appropriate SharedFlowController if it doesn't exist.
         //
@@ -542,9 +542,9 @@
         {
             _log.info( "Attempting to instantiate SharedFlowControllers for request " + request.getRequestURI() );
         }
-        
+
         FlowController currentFlowController = null;
-        
+
         try
         {
             RequestContext requestContext = new RequestContext( request, response );
@@ -552,7 +552,7 @@
                     _flowControllerFactory.getSharedFlowsForRequest( requestContext );
             ImplicitObjectUtil.loadSharedFlow( request, sharedFlows );
             ImplicitObjectUtil.loadGlobalApp( request, PageFlowUtils.getGlobalApp( request ) );
-            
+
             if ( flowControllerClassName != null )
             {
                 currentFlowController = getFlowController( requestContext, flowControllerClassName );
@@ -578,23 +578,23 @@
             _log.error( "Could not instantiate FlowController of type " + flowControllerClassName, e );
             throw new ServletException( e );
         }
-        
+
         //
         // Get the page flow for this request.
         //
         PageFlowController jpf = PageFlowUtils.getCurrentPageFlow( request, getServletContext() );
-        
+
         //
         // Remove any current JavaServer Faces backing bean.  We have "left" any JSF page and are now processing a
         // Page Flow action.
         //
         InternalUtils.removeCurrentFacesBackingBean( request, servletContext );
-        
+
         //
         // Set up implicit objects used by the expression language in simple actions and in declarative validation.
         //
         ImplicitObjectUtil.loadImplicitObjects( request, response, servletContext, jpf );
-        
+
         try
         {
             super.process( request, response );
@@ -624,50 +624,50 @@
             }
         }
     }
-    
+
     private FlowController getFlowController( RequestContext requestContext, String fcClassName )
         throws ClassNotFoundException, InstantiationException, IllegalAccessException
     {
         Class fcClass = _flowControllerFactory.getFlowControllerClass( fcClassName );
         HttpServletRequest request = requestContext.getHttpRequest();
         HttpServletResponse response = requestContext.getHttpResponse();
-        
+
         if ( PageFlowController.class.isAssignableFrom( fcClass ) )
         {
             PageFlowController current = PageFlowUtils.getCurrentPageFlow( request, getServletContext() );
-            
+
             if ( current != null && current.getClass().equals( fcClass ) )
             {
                 if ( _log.isDebugEnabled() )
                 {
                     _log.debug( "Using current page flow: " + current );
                 }
-                
+
                 //
                 // Reinitialize transient data that may have been lost on session failover.
                 //
                 current.reinitialize( request, response, getServletContext() );
                 return current;
             }
-            
+
             return _flowControllerFactory.createPageFlow( new RequestContext( request, response ), fcClass );
         }
         else
         {
             assert SharedFlowController.class.isAssignableFrom( fcClass ) : fcClass.getName();
-            
+
             SharedFlowController current = PageFlowUtils.getSharedFlow( fcClass.getName(), request );
-            
+
             if ( current != null )
             {
                 current.reinitialize( request, response, getServletContext() );
                 return current;
             }
-            
+
             return _flowControllerFactory.createSharedFlow( new RequestContext( request, response ), fcClass );
         }
     }
-    
+
     private boolean handleException( Throwable th, FlowController fc, HttpServletRequest request,
                                      HttpServletResponse response )
     {
@@ -687,7 +687,7 @@
                 {
                     _log.info( "This exception was unhandled by any exception handler.", unhandledException );
                 }
-                
+
                 return false;
             }
             catch ( Throwable t )
@@ -697,20 +697,20 @@
                 return false;
             }
         }
-        
+
         return false;
     }
-    
+
     /**
      * Process any direct request for a page flow by forwarding to its "begin" action.
-     * 
+     *
      * @param request the current HttpServletRequest
      * @param response the current HttpServletResponse
      * @param uri the decoded request URI
      * @return <code>true</code> if the request was for a page flow, in which case it was forwarded.
      * @throws IOException
      * @throws ServletException
-     */ 
+     */
     protected boolean processPageFlowRequest( HttpServletRequest request, HttpServletResponse response, String uri )
         throws IOException, ServletException
     {
@@ -783,24 +783,24 @@
 
             doForward( uri, request, response );
             return true;
-        } 
-        
+        }
+
         return false;
     }
-    
+
     /**
      * A MultipartRequestWrapper that we cache in the outer request once we've handled the multipart request once.
      * It extends the base Struts MultipartRequestWrapper by being aware of ScopedRequests; for ScopedRequests, it
      * filters the parameter names accordingly.
-     */ 
+     */
     private static class RehydratedMultipartRequestWrapper extends MultipartRequestWrapper
     {
         public RehydratedMultipartRequestWrapper( HttpServletRequest req )
         {
             super( req );
-             
+
             MultipartRequestHandler handler = MultipartRequestUtils.getCachedMultipartHandler( req );
-             
+
             if ( handler != null )
             {
                 ScopedRequest scopedRequest = ScopedServletUtils.unwrapRequest( req );
@@ -827,24 +827,24 @@
         //
         ServletContext servletContext = getServletContext();
         _handlers.getReloadableClassHandler().reloadClasses( new RequestContext( request, response ) );
-        
+
         //
         // Go through the chain of pre-request interceptors.
         //
         RequestInterceptorContext context = new RequestInterceptorContext( request, response, getServletContext() );
         List/*< Interceptor >*/ interceptors = context.getRequestInterceptors();
-        
+
         try
         {
             Interceptors.doPreIntercept( context, interceptors );
-            
+
             if ( context.requestWasCancelled() )
             {
                 if ( _log.isDebugEnabled() )
                 {
                     _log.debug ( "Interceptor " + context.getOverridingInterceptor() + " cancelled the request." );
                 }
-                
+
                 return;
             }
         }
@@ -852,13 +852,13 @@
         {
             throw new ServletException( e );
         }
-        
+
         //
         // Initialize the ServletContext in the request.  Often, we need access to the ServletContext when we only
         // have a ServletRequest.
         //
         InternalUtils.setServletContext( request, servletContext );
-        
+
         //
         // Callback to the server adapter.
         //
@@ -867,7 +867,7 @@
         RequestContext requestContext = new RequestContext( request, response );
         er.beginActionRequest( requestContext );
         long startTime = System.currentTimeMillis();
-        
+
         //
         // Initialize the ControlBeanContext in the session.
         //
@@ -877,7 +877,7 @@
         // Register the default URLRewriter
         //
         URLRewriterService.registerURLRewriter( 0, request, new DefaultURLRewriter() );
-        
+
         PageFlowRequestWrapper rw = PageFlowRequestWrapper.unwrap( request );
         boolean isForwardedRequest = rw != null && rw.isForwardedRequest();
 
@@ -895,12 +895,12 @@
             {
                 Handlers.get( getServletContext() ).getStorageHandler().applyChanges( requestContext );
             }
-            
+
             //
             // Clean up the ControlBeanContext in the session.
             //
             JavaControlUtils.uninitializeControlContext( request, response, getServletContext() );
-            
+
             //
             // Callback to the server adapter.
             //
@@ -920,14 +920,14 @@
         {
             throw new ServletException( e );
         }
-        
+
         if ( _log.isTraceEnabled() )
         {
             _log.trace( "-------------------------------- End Request #" + localRequestCount
                        + " ------------------------------------" );
         }
     }
-    
+
     /**
      * If this is a multipart request, wrap it with a special wrapper.  Otherwise, return the request unchanged.
      *
@@ -941,14 +941,14 @@
         if ( contentType != null && contentType.startsWith( "multipart/form-data" ) )
         {
             PageFlowRequestWrapper pageFlowRequestWrapper = PageFlowRequestWrapper.get( request );
-            
+
             //
             // We may have already gotten a multipart wrapper during process().  If so, use that.
             //
             MultipartRequestWrapper cachedWrapper = pageFlowRequestWrapper.getMultipartRequestWrapper();
-            
+
             if ( cachedWrapper != null && cachedWrapper.getRequest() == request ) return cachedWrapper;
-            
+
             try
             {
                 //
@@ -962,7 +962,7 @@
                 _log.error( "Could not parse multipart request.", e.getRootCause() );
                 return request;
             }
-            
+
             MultipartRequestWrapper ret = new RehydratedMultipartRequestWrapper( request );
             pageFlowRequestWrapper.setMultipartRequestWrapper( ret );
             return ret;
@@ -973,22 +973,22 @@
         }
 
     }
-    
+
     protected ActionMapping getBeginMapping()
     {
         return ( ActionMapping ) moduleConfig.findActionConfig( BEGIN_ACTION_PATH );
     }
-    
+
     private static String makeRedirectedRequestAttrsKey( String webappRelativeURI, String hash )
     {
         return REDIRECT_REQUEST_ATTRS_PREFIX + hash + webappRelativeURI;
     }
-    
+
     private static final void rethrowUnhandledException( UnhandledException ex )
         throws ServletException
     {
         Throwable rootCause = ex.getRootCause();
-        
+
         //
         // We shouldn't (and don't need to) wrap Errors or RuntimeExceptions.
         //
@@ -1000,10 +1000,10 @@
         {
             throw ( RuntimeException ) rootCause;
         }
-        
+
         throw ex;
     }
-    
+
     public ActionForward processException( HttpServletRequest request, HttpServletResponse response,
                                            Exception ex, ActionForm form, ActionMapping mapping )
         throws IOException, ServletException
@@ -1014,7 +1014,7 @@
         //
         // If this is an UnhandledException thrown from FlowController.handleException, don't try to re-handle it here.
         //
-        
+
         if ( ex instanceof UnhandledException )
         {
             rethrowUnhandledException( ( UnhandledException ) ex );
@@ -1026,59 +1026,59 @@
             return super.processException( request, response, ex, form, mapping );
         }
     }
-    
+
     /**
      * Used by {@link PageFlowRequestProcessor#processMapping}.  Its main job is to return
      * {@link ExceptionHandledAction} as the type.
-     */ 
+     */
     protected static class ExceptionHandledActionMapping extends ActionMapping
     {
         private ActionForward _fwd;
-        
+
         public ExceptionHandledActionMapping( String actionPath, ActionForward fwd )
         {
             setPath( actionPath );
             _fwd = fwd;
         }
-        
+
         public String getType()
         {
             return ExceptionHandledAction.class.getName();
         }
-        
+
         public ActionForward getActionForward()
         {
             return _fwd;
         }
-        
+
         public boolean getValidate()
         {
             return false;
         }
     }
-    
+
     /**
      * Used by {@link PageFlowRequestProcessor#processMapping}.  This action simply returns the ActionForward stored in the
      * ExceptionHandledActionMapping that's passed in.
-     */ 
+     */
     public static class ExceptionHandledAction extends Action
     {
         public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request,
                                       HttpServletResponse response )
         {
             assert mapping instanceof ExceptionHandledActionMapping : mapping.getClass().getName();
-            
+
             return ( ( ExceptionHandledActionMapping ) mapping ).getActionForward();
         }
     }
-    
+
     private boolean isCorrectFormType( Class formBeanClass, ActionMapping mapping )
     {
         assert mapping.getName() != null : "cannot pass an ActionMapping that has no form bean";
         Class cachedFormBeanClass = ( Class ) _formBeanClasses.get( mapping.getName() );
         return isCorrectFormType( formBeanClass, cachedFormBeanClass, mapping );
     }
-    
+
     private boolean isCorrectFormType( Class formBeanClass, Class actionMappingFormBeanClass, ActionMapping mapping )
     {
         if ( actionMappingFormBeanClass != null )
@@ -1092,19 +1092,19 @@
             //
             FormBeanConfig mappingFormBean = moduleConfig.findFormBeanConfig( mapping.getName() );
             String formClassName = formBeanClass.getName();
-            
+
             if ( mappingFormBean != null && mappingFormBean.getType().equals( formClassName ) ) return true;
-            
+
             if ( mapping instanceof PageFlowActionMapping )
             {
                 String desiredType = ( ( PageFlowActionMapping ) mapping ).getFormClass();
                 if ( formClassName.equals( desiredType ) ) return true;
             }
         }
-        
+
         return false;
     }
-    
+
     private ActionMapping checkTransaction( HttpServletRequest request, HttpServletResponse response,
                                             ActionMapping mapping, String actionPath )
         throws IOException
@@ -1116,7 +1116,7 @@
                 FlowController currentFC = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
                 String actionName = InternalUtils.getActionName( mapping );
                 DoubleSubmitException ex = new DoubleSubmitException( actionName, currentFC );
-                
+
                 if ( currentFC != null )
                 {
                     try
@@ -1129,22 +1129,22 @@
                         _log.error( "Exception occurred while handling " + ex.getClass().getName(), servletException );
                     }
                 }
-                
+
                 ex.sendResponseErrorCode( response );
                 return null;
             }
         }
-        
+
         return mapping;
     }
-   
+
     public void init( ActionServlet actionServlet, ModuleConfig mc )
         throws ServletException
     {
         super.init( actionServlet, mc );
-        
+
         ServletContext servletContext = getServletContext();
-        
+
         //
         // Cache a reference to the ServletContainerAdapter, the Handlers, and the LegacySettings.
         //
@@ -1152,26 +1152,26 @@
         _legacySettings = LegacySettings.get( servletContext );
         _handlers = Handlers.get( servletContext );
         _flowControllerFactory = FlowControllerFactory.get( servletContext );
-        
+
         //
         // Cache a list of overloaded actions for each overloaded action path (actions are overloaded by form bean type).
         //
         cacheOverloadedActionMappings();
-        
+
         //
         // Cache the form bean Classes by form bean name.
         //
         cacheFormClasses();
-        
+
         //
         // Initialize the request interceptors and action interceptors.
         //
         ActionInterceptorContext.init( servletContext );
         RequestInterceptorContext.init( servletContext );
-        
+
         _pageServletFilter = new PageServletFilter();
     }
-    
+
     private class PageServletFilter extends PageFlowPageFilter
     {
         public PageServletFilter()
@@ -1184,46 +1184,46 @@
             return null;    // accept all
         }
     }
-    
+
     private void cacheOverloadedActionMappings()
     {
         ActionConfig[] actionConfigs = moduleConfig.findActionConfigs();
-        
+
         for ( int i = 0; i < actionConfigs.length; i++ )
         {
             ActionConfig actionConfig = actionConfigs[i];
-            
+
             if ( actionConfig instanceof PageFlowActionMapping )
             {
                 PageFlowActionMapping mapping = ( PageFlowActionMapping ) actionConfig;
                 String unqualifiedActionPath = ( ( PageFlowActionMapping ) actionConfig ).getUnqualifiedActionPath();
-                
+
                 if ( unqualifiedActionPath != null )
                 {
                     List/*< ActionMapping >*/ overloaded = ( List ) _overloadedActions.get( unqualifiedActionPath );
-                    
+
                     if ( overloaded == null )
                     {
                         overloaded = new ArrayList/*< ActionMapping >*/();
                         _overloadedActions.put( unqualifiedActionPath, overloaded );
                     }
-                    
+
                     overloaded.add( mapping );
                 }
             }
         }
     }
-    
+
     private void cacheFormClasses()
     {
         FormBeanConfig[] formBeans = moduleConfig.findFormBeanConfigs();
         ReloadableClassHandler rch = _handlers.getReloadableClassHandler();
-        
+
         for ( int i = 0; i < formBeans.length; i++ )
         {
             FormBeanConfig formBeanConfig = formBeans[i];
             String formType = InternalUtils.getFormBeanType( formBeanConfig );
-            
+
             try
             {
                 Class formBeanClass = rch.loadClass( formType );
@@ -1241,7 +1241,7 @@
      * Read component instance mapping configuration file.
      * This is where we read files properties.
      */
-    
+
     protected void initDefinitionsMapping() throws ServletException
     {
         definitionsFactory = null;
@@ -1266,25 +1266,25 @@
     {
         FlowController fc = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
         Object forwardedForm = InternalUtils.unwrapFormBean( InternalUtils.getForwardedFormBean( request, false ) );
-        
+
         //
         // First, see if this is a request for a shared flow action.  The shared flow's name (as declared by the
         // current page flow) will precede the dot.
         //
         if ( fc != null && ! processSharedFlowMapping( request, response, path, fc ) ) return null;
-        
+
         //
         // Look for a form-specific action path.  This is used when there are two actions with the same
         // name, but different forms (in nesting).
         //
         Class forwardedFormClass = null;
-        
+
         if ( forwardedForm != null )
         {
             forwardedFormClass = forwardedForm.getClass();
             List/*< ActionMapping >*/ possibleMatches = ( List ) _overloadedActions.get( path );
             ActionMapping bestMatch = null;
-            
+
             //
             // Troll through the overloaded actions for the given path.  Look for the one whose form bean class is
             // exactly the class of the forwarded form; failing that, look for one that's assignable from the class
@@ -1295,7 +1295,7 @@
                 ActionMapping possibleMatch = ( ActionMapping ) possibleMatches.get( i );
                 assert possibleMatch instanceof PageFlowActionMapping : possibleMatch.getClass();
                 Class cachedFormBeanClass = ( Class ) _formBeanClasses.get( possibleMatch.getName() );
-                
+
                 if ( forwardedFormClass.equals( cachedFormBeanClass ) )
                 {
                     bestMatch = possibleMatch;
@@ -1306,30 +1306,30 @@
                     bestMatch = possibleMatch;
                 }
             }
-            
+
             if ( bestMatch != null )
             {
                 request.setAttribute( Globals.MAPPING_KEY, bestMatch );
-                
+
                 if ( _log.isDebugEnabled() )
                 {
                     _log.debug( "Found form-specific action mapping " + bestMatch.getPath() + " for " + path
                                 + ", form " + forwardedFormClass.getName() );
                 }
-                
+
                 return checkTransaction( request, response, bestMatch, path );
             }
         }
-        
+
         //
         // Look for a directly-defined mapping for this path.
         //
         ActionMapping mapping = ( ActionMapping ) moduleConfig.findActionConfig( path );
-        
+
         if ( mapping != null )
         {
             boolean wrongForm = false;
-            
+
             //
             // We're going to bail out if there is a forwarded form and this mapping requires a different form type.
             //
@@ -1338,7 +1338,7 @@
                 boolean mappingHasNoFormBean = mapping.getName() == null;
                 wrongForm = mappingHasNoFormBean || ! isCorrectFormType( forwardedFormClass, mapping );
             }
-            
+
             if ( ! wrongForm )
             {
                 request.setAttribute( Globals.MAPPING_KEY, mapping );
@@ -1365,7 +1365,7 @@
         // in a shared flow.
         //
         String errorServletPath = PageFlowRequestWrapper.get( request ).getOriginalServletPath();
-        
+
         if ( errorServletPath == null
              && InternalUtils.getModuleConfig( GLOBALAPP_MODULE_CONTEXT_PATH, getServletContext() ) != null )
         {
@@ -1373,7 +1373,7 @@
             {
                 _log.debug( "Trying Global.app for unhandled action " + path );
             }
-            
+
             //
             // We haven't tried the deprecated Global.app fallback yet.  Try it now.
             //
@@ -1400,7 +1400,7 @@
             return processUnresolvedAction( path, request, response, forwardedForm );
         }
     }
-    
+
     protected boolean processSharedFlowMapping( HttpServletRequest request, HttpServletResponse response,
                                                 String actionPath, FlowController currentFlowController )
             throws IOException
@@ -1408,7 +1408,7 @@
         if ( currentFlowController.isPageFlow() )
         {
             int dot = actionPath.indexOf( '.' );
-            
+
             if ( dot != -1 )
             {
                 Map/*< String, SharedFlowController >*/ sharedFlows = PageFlowUtils.getSharedFlows( request );
@@ -1417,7 +1417,7 @@
                 assert actionPath.length() > 0 && actionPath.charAt( 0 ) == '/' : actionPath;
                 String sharedFlowName = actionPath.substring( 1, dot );
                 SharedFlowController sf = ( SharedFlowController ) sharedFlows.get( sharedFlowName );
-                
+
                 if ( sf != null )
                 {
                     if ( _log.isDebugEnabled() )
@@ -1425,13 +1425,13 @@
                         _log.debug( "Forwarding to shared flow " + sf.getDisplayName() + " to handle action \""
                                     + actionPath + "\"." );
                     }
-                    
+
                     //
                     // Save the original request URI, so if the action fails on the shared flow, too, then we can
                     // give an error message that includes *this* URI, not the shared flow URI.
                     //
                     PageFlowRequestWrapper.get( request ).setOriginalServletPath( InternalUtils.getDecodedServletPath( request ) );
-                    
+
                     //
                     // Construct a URI that is [shared flow module path] + [base action path] + [action-extension (.do)]
                     //
@@ -1441,7 +1441,7 @@
                     uri.append( '/' );
                     uri.append( actionPath.substring( dot + 1 ) );
                     uri.append( ACTION_EXTENSION );
-                    
+
                     try
                     {
                         doForward( uri.toString(), request, response );
@@ -1454,10 +1454,10 @@
                 }
             }
         }
-        
+
         return true;
     }
-    
+
     protected ActionMapping processUnresolvedAction( String actionPath, HttpServletRequest request,
                                                      HttpServletResponse response, Object returningForm )
         throws IOException
@@ -1467,14 +1467,14 @@
             InternalStringBuilder msg = new InternalStringBuilder( "Action \"" ).append( actionPath );
             _log.info( msg.append( "\" was also unhandled by Global.app." ).toString() );
         }
-        
+
         //
         // If there's a PageFlowController for this request, try and let it handle an
         // action-not-found exception.  Otherwise, let Struts print out its "invalid path"
         // message.
         //
         FlowController fc = PageFlowUtils.getCurrentPageFlow( request, getServletContext() );
-        
+
         try
         {
             if ( fc != null )
@@ -1488,23 +1488,23 @@
         catch ( ServletException e )
         {
             // ignore this -- just let Struts do its thing.
-            
+
             if ( _log.isDebugEnabled() )
             {
                 _log.debug( e );
             }
         }
-                    
+
         if ( _log.isDebugEnabled() )
         {
-            _log.debug( "Couldn't handle an ActionNotFoundException -- delegating to Struts" ); 
+            _log.debug( "Couldn't handle an ActionNotFoundException -- delegating to Struts" );
         }
-        
+
         return super.processMapping( request, response, actionPath );
     }
-    
+
     protected boolean processRoles( HttpServletRequest request, HttpServletResponse response, ActionMapping mapping )
-        throws IOException, ServletException 
+        throws IOException, ServletException
     {
         //
         // If there are no required roles for this action, just return.
@@ -1518,7 +1518,7 @@
         // Check the current user against the list of required roles
         FlowController fc = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
         FlowControllerHandlerContext context = new FlowControllerHandlerContext( request, response, fc );
-        
+
         for ( int i = 0; i < roles.length; i++ )
         {
             if ( _handlers.getLoginHandler().isUserInRole( context, roles[i] ) )
@@ -1527,7 +1527,7 @@
                 {
                     _log.debug( " User " + request.getRemoteUser() + " has role '" + roles[i] + "', granting access" );
                 }
-                
+
                 return true;
             }
         }
@@ -1537,7 +1537,7 @@
         {
             _log.debug( " User '" + request.getRemoteUser() + "' does not have any required role, denying access" );
         }
-                
+
         //
         // Here, Struts sends an HTTP error.  We try to let the current page flow handle a relevant exception.
         //
@@ -1545,7 +1545,7 @@
         String actionName = InternalUtils.getActionName( mapping );
         FlowController currentFC = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
         PageFlowException ex;
-        
+
         if ( loginHandler.getUserPrincipal( context ) == null )
         {
             ex = currentFC.createNotLoggedInException( actionName, request );
@@ -1554,7 +1554,7 @@
         {
             ex = new UnfulfilledRolesException( mapping.getRoleNames(), mapping.getRoles(), actionName, currentFC );
         }
-        
+
         if ( currentFC != null )
         {
             ActionForward fwd = currentFC.handleException( ex, mapping, null, request, response );
@@ -1564,10 +1564,10 @@
         {
             ( ( ResponseErrorCodeSender ) ex ).sendResponseErrorCode( response );
         }
-        
+
         return false;
     }
-    
+
     private static String addScopeParams( String url, HttpServletRequest request )
     {
         //
@@ -1583,7 +1583,7 @@
             return url;
         }
     }
-    
+
     /**
      * This override of the base method ensures that absolute URIs don't get the context
      * path prepended, and handles forwards to special things like return-to="currentPage".
@@ -1601,7 +1601,7 @@
         {
             InternalUtils.setForwardingModule( request, fc.getModulePath() );
         }
-        
+
         //
         // The following is similar to what's in super.processForwardConfig(), but it avoids putting
         // a slash in front of absolute URLs (e.g., ones that start with "http:").
@@ -1609,7 +1609,7 @@
         if ( fwd != null )
         {
             if ( _log.isDebugEnabled() ) _log.debug( "processForwardConfig(" + fwd + ')' );
-    
+
             //
             // Try to process a tiles definition. If the forward doesn't contain a
             // a tiles definition, continue on.
@@ -1638,10 +1638,10 @@
                 ActionForwardHandler handler = _handlers.getActionForwardHandler();
                 fwd = handler.doForward( context, pfFwd, mapping, InternalUtils.getActionName( mapping ), null, form );
             }
-            
+
             String path = fwd.getPath();
             boolean startsWithSlash = path.length() > 0 && path.charAt( 0 ) == '/';
-            
+
             //
             // If the URI is absolute (e.g., starts with "http:"), do a redirect to it no matter what.
             //
@@ -1652,7 +1652,7 @@
             else if ( fwd.getRedirect() )
             {
                 String redirectURI;
-                
+
                 if ( startsWithSlash && fwd instanceof Forward && ( ( Forward ) fwd ).isExplicitPath() )
                 {
                     redirectURI = path;
@@ -1666,13 +1666,13 @@
                 {
                     redirectURI = request.getContextPath() + RequestUtils.forwardURL( request, fwd );
                 }
-                
+
                 fwdRedirectHandler.redirect( context, addScopeParams( redirectURI, request ) );
             }
             else
             {
                 String fwdURI;
-                
+
                 if ( startsWithSlash && fwd instanceof Forward && ( ( Forward ) fwd ).isExplicitPath() )
                 {
                     fwdURI = path;
@@ -1680,27 +1680,27 @@
                 else
                 {
                     fwdURI = RequestUtils.forwardURL( request, fwd );
-                    
+
                     //
                     // First, see if the current module is a Shared Flow module.  If so, unless this is a forward to
                     // another action in the shared flow, we need to translate the local path so it makes sense (strip
                     // off the shared flow module prefix "/-" and replace it with "/").
                     //
                     ModuleConfig mc = ( ModuleConfig ) request.getAttribute( Globals.MODULE_KEY );
-                    
+
                     if ( InternalUtils.isSharedFlowModule( mc ) && ! fwdURI.endsWith( ACTION_EXTENSION )
                          && fwdURI.startsWith( SHARED_FLOW_MODULE_PREFIX ) )
                     {
                         fwdURI = '/' + fwdURI.substring( SHARED_FLOW_MODULE_PREFIX_LEN );
                     }
                 }
-                
+
                 doForward( fwdURI, request, response );
             }
         }
     }
-    
-    protected boolean changeScheme( String webappRelativeURI, String scheme, int port, 
+
+    protected boolean changeScheme( String webappRelativeURI, String scheme, int port,
                                     FlowControllerHandlerContext context )
         throws URISyntaxException, IOException, ServletException
     {
@@ -1713,7 +1713,7 @@
                 return false;
             }
         }
-        
+
         //
         // First put all request attributes into the session, so they can be added to the
         // redirected request.
@@ -1722,13 +1722,13 @@
         String queryString = null;
         ServletContext servletContext = getServletContext();
         HttpServletRequest request = ( ( RequestContext ) context ).getHttpRequest();
-        
+
         for ( Enumeration e = request.getAttributeNames(); e.hasMoreElements(); )
         {
             String name = ( String ) e.nextElement();
             attrs.put( name, request.getAttribute( name ) );
         }
-        
+
         if ( ! attrs.isEmpty() )
         {
             String hash = Integer.toString( request.hashCode() );
@@ -1738,25 +1738,25 @@
                           + REDIRECT_REQUEST_ATTRS_PARAM + '=' + hash;
         }
 
-        
+
         //
         // Now do the redirect.
         //
         URI redirectURI = new URI( scheme, null, request.getServerName(), port,
                                    request.getContextPath() + webappRelativeURI,
                                    queryString, null );
-        
+
         ForwardRedirectHandler fwdRedirectHandler = _handlers.getForwardRedirectHandler();
         fwdRedirectHandler.redirect( context, redirectURI.toString() );
-        
+
         if ( _log.isDebugEnabled() )
         {
             _log.debug( "Redirected to " + redirectURI );
         }
-        
+
         return true;
     }
-    
+
     /**
      * @deprecated Use {@link LegacySettings#shouldDoSecureForwards} instead.
      */
@@ -1780,14 +1780,14 @@
             doInclude( uri, request, response );
             return;
         }
-        
+
         FlowController fc = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
         FlowControllerHandlerContext context = new FlowControllerHandlerContext( request, response, fc );
 
         if ( _legacySettings.shouldDoSecureForwards() )
         {
             SecurityProtocol sp = PageFlowUtils.getSecurityProtocol( uri, servletContext, request );
-            
+
             if ( ! sp.equals( SecurityProtocol.UNSPECIFIED ) )
             {
                 try
@@ -1815,7 +1815,7 @@
                 }
             }
         }
-        
+
         if ( ! securityRedirected )
         {
             if ( ! processPageForward( uri, request, response ) )
@@ -1825,11 +1825,11 @@
             }
         }
     }
-    
+
     /**
      * An opportunity to process a page forward in a different way than performing a server forward.  The default
      * implementation looks for a file on classpath called
-     * META-INF/pageflow-page-servlets/<i>path-to-page</i>.properties (e.g., 
+     * META-INF/pageflow-page-servlets/<i>path-to-page</i>.properties (e.g.,
      * "/META-INF/pageflow-page-servlets/foo/bar/hello.jsp.properties").  This file contains mappings from
      * <i>platform-name</i> (the value returned by {@link ServletContainerAdapter#getPlatformName}) to the name of a Servlet
      * class that will process the page request.  If the current platform name is not found, the value "default" is
@@ -1844,34 +1844,34 @@
      * @return <code>true</code> if the method handled the request, in which case it should not be forwarded.
      * @throws IOException
      * @throws ServletException
-     */ 
+     */
     private boolean processPageForward( String pagePath, HttpServletRequest request, HttpServletResponse response )
         throws IOException, ServletException
     {
         Class pageServletClass = ( Class ) _pageServletClasses.get( pagePath );
-        
+
         if ( pageServletClass == null )
         {
             pageServletClass = Void.class;
             ClassLoader cl = DiscoveryUtils.getClassLoader();
             String path = "META-INF/pageflow-page-servlets" + pagePath + ".properties";
             InputStream in = cl.getResourceAsStream( path );
-            
+
             if ( in != null )
             {
                 String className = null;
-                
+
                 try
                 {
                     Properties props = new Properties();
                     props.load( in );
                     className = props.getProperty( _servletContainerAdapter.getPlatformName() );
                     if ( className == null ) className = props.getProperty( "default" );
-                    
+
                     if ( className != null )
                     {
                         pageServletClass = cl.loadClass( className );
-                        
+
                         if ( Servlet.class.isAssignableFrom( pageServletClass ) )
                         {
                             if ( _log.isInfoEnabled() )
@@ -1896,15 +1896,15 @@
                     _log.error( "Error while loading page Servlet class " + className, e );
                 }
             }
-            
+
             _pageServletClasses.put( pagePath, pageServletClass );
         }
-        
+
         if ( pageServletClass.equals( Void.class ) )
         {
             return false;
         }
-        
+
         try
         {
             Servlet pageServlet = ( Servlet ) pageServletClass.newInstance();
@@ -1920,41 +1920,41 @@
         {
             _log.error( "Error while instantiating page Servlet of type " + pageServletClass.getName(), e );
         }
-        
+
         return false;
     }
-    
+
     /**
      * Used by {@link PageFlowRequestProcessor#processPageForward} to run a page Servlet.
-     */ 
+     */
     private static class PageServletFilterChain implements FilterChain
     {
         private Servlet _pageServlet;
-        
+
         public PageServletFilterChain( Servlet pageServlet )
         {
             _pageServlet= pageServlet;
         }
-        
+
         public void doFilter( ServletRequest request, ServletResponse response )
                 throws IOException, ServletException
         {
             _pageServlet.service( request, response );
         }
     }
-    
+
     /**
      * Used by {@link PageFlowRequestProcessor#processPageForward} to initialize a page Servlet.
-     */ 
+     */
     private class PageServletConfig implements ServletConfig
     {
         private String _pagePath;
-        
+
         public PageServletConfig( String pagePath )
         {
             _pagePath = pagePath;
         }
-        
+
         public String getServletName()
         {
             return _pagePath;
@@ -1975,7 +1975,7 @@
             return Collections.enumeration( Collections.EMPTY_LIST );
         }
     }
-    
+
     /**
      * Set the no-cache headers.  This overrides the base Struts behavior to prevent caching even for the pages.
      */
@@ -1989,7 +1989,7 @@
         //       production mode.
         //
         boolean noCache = moduleConfig.getControllerConfig().getNocache();
-        
+
         if ( ! noCache )
         {
             PageflowConfig pfConfig = ConfigUtil.getConfig().getPageflowConfig();

Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java?rev=265562&r1=265561&r2=265562&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java Wed Aug 31 12:37:55 2005
@@ -41,7 +41,7 @@
 import org.apache.beehive.netui.util.internal.FileUtils;
 import org.apache.beehive.netui.util.internal.ServletUtils;
 import org.apache.beehive.netui.util.config.ConfigUtil;
-import org.apache.beehive.netui.util.config.bean.UrlConfig;
+import org.apache.beehive.netui.util.config.internal.xmlbean.generated.UrlConfig;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.beehive.netui.script.common.ImplicitObjectUtil;
 import org.apache.struts.action.ActionForm;