Author: rich
Date: Wed Mar  2 00:21:06 2005
New Revision: 155898

URL: http://svn.apache.org/viewcvs?view=rev&rev=155898
Log:
Fixes for:
    - http://issues.apache.org/jira/browse/BEEHIVE-384 : Cannot do a Servlet 
include of a page flow URI
    - http://issues.apache.org/jira/browse/BEEHIVE-389 : NPE when compiling a 
page flow with @Jpf.MessageBundle that lacks 'bundlePath' attribute
    - http://issues.apache.org/jira/browse/BEEHIVE-390 : Struts-merge wipes out 
the <controller> tag

DRT/BVT: netui (WinXP)
BB: self (linux)


Added:
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/IncludeJPFServlet.java
   (with props)
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/invalidateSession.jsp   
(with props)
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/Controller.jpf
   (with props)
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/index.jsp
   (with props)
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/noflow/
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/noflow/history.jsp
      - copied unchanged from r155336, 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/history.jsp
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ServletInclude.xml
   (with props)
Removed:
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/history.jsp
Modified:
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/MergedControllerAnnotation.java
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageBundleGrammar.java
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SharedFlowRefGrammar.java
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
    
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
    
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
    
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/web.xml
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nested1/nested2/nested3/page1.jsp
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/page1.jsp
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/MergedControllerAnnotation.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/MergedControllerAnnotation.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/MergedControllerAnnotation.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/MergedControllerAnnotation.java
 Wed Mar  2 00:21:06 2005
@@ -116,9 +116,7 @@
             for ( AnnotationMirror ann : annotations )
             {
                 Object key = CompilerUtils.getAnnotationValue( ann, keyAttr, 
true );
-                assert key != null : "missing value for " + keyAttr + " on " 
-                                     + 
ann.getAnnotationType().getDeclaration().getQualifiedName();
-                keyedList.put( key.toString(), ann );
+                if ( key != null ) keyedList.put( key.toString(), ann );
             }
         }
     }

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
 Wed Mar  2 00:21:06 2005
@@ -32,11 +32,18 @@
 public class ActionOutputGrammar
         extends AnnotationGrammar
 {
+    private static final String[][] REQUIRED_ATTRS = { { NAME_ATTR }, { 
TYPE_ATTR } };
+    
     public ActionOutputGrammar( AnnotationProcessorEnvironment env, 
Diagnostics diags, RuntimeVersionChecker rvc )
     {
         super( env, diags, null, rvc );
         
         addMemberType( NAME_ATTR, new UniqueValueType( ACTION_OUTPUTS_ATTR, 
false, false, null, this ) );
         addMemberType( TYPE_ATTR, new TypeNameType( null, true, null, this ) );
+    }
+
+    public String[][] getRequiredAttrs()
+    {
+        return REQUIRED_ATTRS;
     }
 }

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageBundleGrammar.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageBundleGrammar.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageBundleGrammar.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageBundleGrammar.java
 Wed Mar  2 00:21:06 2005
@@ -36,6 +36,9 @@
 public class MessageBundleGrammar
         extends BaseFlowControllerGrammar
 {
+    private static final String[][] REQUIRED_ATTRS = { { BUNDLE_PATH_ATTR } };
+    
+    
     public MessageBundleGrammar( AnnotationProcessorEnvironment env, 
Diagnostics diags,
                                     String requiredRuntimeVersion, 
RuntimeVersionChecker runtimeVersionChecker,
                                     FlowControllerInfo fcInfo )
@@ -45,6 +48,11 @@
         addMemberType( BUNDLE_PATH_ATTR,
                        new UniqueValueType( MESSAGE_BUNDLES_ATTR, false, 
false, null, this ) );
         addMemberType( BUNDLE_NAME_ATTR, new UniqueValueType( 
MESSAGE_BUNDLES_ATTR, true, true, null, this ) );
+    }
+
+    public String[][] getRequiredAttrs()
+    {
+        return REQUIRED_ATTRS;
     }
 
     protected Object onEndCheck( AnnotationMirror annotation, 
AnnotationMirror[] parentAnnotations,

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
 Wed Mar  2 00:21:06 2005
@@ -37,6 +37,8 @@
 public class RaiseActionGrammar
         extends BaseFlowControllerGrammar
 {
+    private static final String[][] REQUIRED_ATTRS = { { ACTION_ATTR } };
+    
     public RaiseActionGrammar( AnnotationProcessorEnvironment env, Diagnostics 
diags, String requiredRuntimeVersion,
                                RuntimeVersionChecker runtimeVersionChecker, 
ClassDeclaration jpfClass,
                                FlowControllerInfo fcInfo )
@@ -73,5 +75,10 @@
             
             return null;
         }
+    }
+    
+    public String[][] getRequiredAttrs()
+    {
+        return REQUIRED_ATTRS;
     }
 }

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SharedFlowRefGrammar.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SharedFlowRefGrammar.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SharedFlowRefGrammar.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SharedFlowRefGrammar.java
 Wed Mar  2 00:21:06 2005
@@ -21,20 +21,18 @@
 import org.apache.beehive.controls.runtime.generator.apt.Diagnostics;
 import org.apache.beehive.netui.compiler.RuntimeVersionChecker;
 import org.apache.beehive.netui.compiler.CompilerUtils;
-import org.apache.beehive.netui.compiler.JpfLanguageConstants;
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
 import com.sun.mirror.declaration.AnnotationMirror;
 import com.sun.mirror.declaration.MemberDeclaration;
 import com.sun.mirror.declaration.TypeDeclaration;
 
-import static org.apache.beehive.netui.compiler.JpfLanguageConstants.TYPE_ATTR;
-import static 
org.apache.beehive.netui.compiler.JpfLanguageConstants.SHARED_FLOW_BASE_CLASS;
-import static 
org.apache.beehive.netui.compiler.JpfLanguageConstants.JPF_BASE_CLASS;
-import static 
org.apache.beehive.netui.compiler.JpfLanguageConstants.SHARED_FLOW_REF_TAG_NAME;
+import static org.apache.beehive.netui.compiler.JpfLanguageConstants.*;
 
 public class SharedFlowRefGrammar
         extends AnnotationGrammar
 {
+    private static final String[][] REQUIRED_ATTRS = { { NAME_ATTR }, { 
TYPE_ATTR } };
+    
     public SharedFlowRefGrammar( AnnotationProcessorEnvironment env, 
Diagnostics diags, RuntimeVersionChecker rvc )
     {
         super( env, diags, null, rvc );
@@ -55,5 +53,10 @@
         }
         
         return super.onBeginCheck( annotation, parentAnnotations, classMember 
);
+    }
+    
+    public String[][] getRequiredAttrs()
+    {
+        return REQUIRED_ATTRS;
     }
 }

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
 Wed Mar  2 00:21:06 2005
@@ -22,19 +22,24 @@
 import org.apache.beehive.controls.runtime.generator.apt.Diagnostics;
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
 
-import static 
org.apache.beehive.netui.compiler.JpfLanguageConstants.VERSION_9_0_STRING;
-import static 
org.apache.beehive.netui.compiler.JpfLanguageConstants.VALIDATABLE_PROPERTIES_ATTR;
-
+import static org.apache.beehive.netui.compiler.JpfLanguageConstants.*;
 
 public class ValidatableBeanGrammar
         extends AnnotationGrammar
 {
+    private static final String[][] REQUIRED_ATTRS = { { 
VALIDATABLE_PROPERTIES_ATTR }, { TYPE_ATTR } };
+    
     public ValidatableBeanGrammar( AnnotationProcessorEnvironment env, 
Diagnostics diags, RuntimeVersionChecker rvc )
     {
         super( env, diags, VERSION_9_0_STRING, rvc );
         
         addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new 
ValidatablePropertyGrammar( env, diags, rvc ) );
         // TYPE_ATTR does not need a custom type
+    }
+    
+    public String[][] getRequiredAttrs()
+    {
+        return REQUIRED_ATTRS;
     }
 }
 

Modified: 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
 Wed Mar  2 00:21:06 2005
@@ -705,54 +705,60 @@
     
     protected void writeControllerElement( StrutsConfigDocument.StrutsConfig 
scElement )
     {
-        if ( scElement.getController() == null )
+        ControllerDocument.Controller controller = scElement.getController();
+        if ( controller == null ) controller = scElement.addNewController();
+        
+        if ( controller.getProcessorClass() == null )
         {
-            ControllerDocument.Controller controller = 
scElement.addNewController();
             controller.setProcessorClass( PAGEFLOW_REQUESTPROCESSOR_CLASSNAME 
);
+        }
+        
+        if ( controller.getInputForward() == null )
+        {
             controller.setInputForward( 
ControllerDocument.Controller.InputForward.TRUE );
+        }
+        
+        if ( _multipartHandlerClassName != null && 
controller.getMultipartClass() == null )
+        {
+            controller.setMultipartClass( _multipartHandlerClassName );
+        }
+        
+        if ( _isNestedPageFlow ) addSetProperty( controller, 
"isNestedPageFlow", "true" );
+        if ( _isLongLivedPageFlow ) addSetProperty( controller, 
"isLongLivedPageFlow", "true" );
+        if ( _isSharedFlow ) addSetProperty( controller, "isSharedFlow", 
"true" );
+        if ( isReturnToPageDisabled() ) addSetProperty( controller, 
"isReturnToPageDisabled", "true" );
+        if ( isReturnToActionDisabled() ) addSetProperty( controller, 
"isReturnToActionDisabled", "true" );
+        
+        if ( _sharedFlows != null )
+        {
+            StringBuilder str = new StringBuilder();
+            boolean first = true;
             
-            if ( _multipartHandlerClassName != null )
-            {
-                controller.setMultipartClass( _multipartHandlerClassName );
-            }
-            
-            if ( _isNestedPageFlow ) addSetProperty( controller, 
"isNestedPageFlow", "true" );
-            if ( _isLongLivedPageFlow ) addSetProperty( controller, 
"isLongLivedPageFlow", "true" );
-            if ( _isSharedFlow ) addSetProperty( controller, "isSharedFlow", 
"true" );
-            if ( isReturnToPageDisabled() ) addSetProperty( controller, 
"isReturnToPageDisabled", "true" );
-            if ( isReturnToActionDisabled() ) addSetProperty( controller, 
"isReturnToActionDisabled", "true" );
-            
-            if ( _sharedFlows != null )
+            for ( Map.Entry< String, String > entry : _sharedFlows.entrySet() )
             {
-                StringBuilder str = new StringBuilder();
-                boolean first = true;
-                
-                for ( Map.Entry< String, String > entry : 
_sharedFlows.entrySet() )
-                {
-                    if ( ! first ) str.append( ',' );
-                    first = false;
-                    String name = entry.getKey();
-                    String type = entry.getValue();
-                    str.append( name ).append( '=' ).append( type );
-                }
-                
-               addSetProperty( controller, "sharedFlows", str.toString() );
+                if ( ! first ) str.append( ',' );
+                first = false;
+                String name = entry.getKey();
+                String type = entry.getValue();
+                str.append( name ).append( '=' ).append( type );
             }
             
-            addSetProperty( controller, "controllerClass", 
_controllerClassName );
-            
-            //
-            // If there is not a default MessageResources element in the 
generated XML, add a special set-property
-            // to communicate this to the runtime.
-            //
-            MessageResourcesDocument.MessageResources[] mrArray = 
scElement.getMessageResourcesArray();
-            for ( int i = 0; i < mrArray.length; i++ )
-            {
-                MessageResourcesDocument.MessageResources messageResources = 
mrArray[i];
-                if ( messageResources.getKey() == null ) return;
-            }
-            addSetProperty( controller, "isMissingDefaultMessages", "true" );
-        } 
+           addSetProperty( controller, "sharedFlows", str.toString() );
+        }
+        
+        addSetProperty( controller, "controllerClass", _controllerClassName );
+        
+        //
+        // If there is not a default MessageResources element in the generated 
XML, add a special set-property
+        // to communicate this to the runtime.
+        //
+        MessageResourcesDocument.MessageResources[] mrArray = 
scElement.getMessageResourcesArray();
+        for ( int i = 0; i < mrArray.length; i++ )
+        {
+            MessageResourcesDocument.MessageResources messageResources = 
mrArray[i];
+            if ( messageResources.getKey() == null ) return;
+        }
+        addSetProperty( controller, "isMissingDefaultMessages", "true" );
     }
     
     protected static void addSetProperty( ControllerDocument.Controller 
controller, String propName, String propValue )

Modified: 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
 Wed Mar  2 00:21:06 2005
@@ -70,6 +70,7 @@
     private static final String AVOID_DIRECT_RESPONSE_OUTPUT_ATTR = 
ATTR_PREFIX + "_avoidDirectResponseOutput";
     private static final String FORWARDED_FORMBEAN_ATTR = ATTR_PREFIX + 
"forwardedForm";
     private static final String FORWARDING_MODULE_ATTR = ATTR_PREFIX + 
"forwardingModule";
+    private static final String IGNORE_INCLUDE_SERVLET_PATH_ATTR = ATTR_PREFIX 
+ "ignoreIncludeServletPath";
     
     
     /**
@@ -287,12 +288,15 @@
     
     public static String getDecodedURI( HttpServletRequest request )
     {
-        return request.getContextPath() + request.getServletPath();
+        return request.getContextPath() + getDecodedServletPath( request );
     }
     
     public static String getDecodedServletPath( HttpServletRequest request )
     {
-        return request.getServletPath();
+        if ( ignoreIncludeServletPath( request ) ) return 
request.getServletPath();
+        
+        String servletIncludePath = ( String ) request.getAttribute( 
RequestProcessor.INCLUDE_SERVLET_PATH );
+        return servletIncludePath != null ? servletIncludePath : 
request.getServletPath();
     }
         
     public static void addActionOutputs( Map toAdd, ServletRequest request, 
boolean overwrite )
@@ -1031,5 +1035,43 @@
         if ( formBeanType == null ) formBeanType = formBeanConfig.getType();
         
         return formBeanType;
+    }
+    
+    /**
+     * Tell [EMAIL PROTECTED] #getDecodedServletPath} (and all that call it) 
to ignore the attribute that specifies the Servlet
+     * Include path, which is set when a Servlet include is done through 
RequestDispatcher.  Normally,
+     * getDecodedServletPath tries the Servlet Include path before falling 
back to getServletPath() on the request.
+     * Note that this is basically a stack of instructions to ignore the 
include path, and this method expects each
+     * call with <code>ignore</code>==<code>true</code> to be balanced by a 
call with
+     * <code>ignore</code>==<code>false</code>.
+     */
+    public static void setIgnoreIncludeServletPath( ServletRequest request, 
boolean ignore )
+    {
+        Integer depth = ( Integer ) request.getAttribute( 
IGNORE_INCLUDE_SERVLET_PATH_ATTR );
+        
+        if ( ignore )
+        {
+            if ( depth == null ) depth = 0;
+            request.setAttribute( IGNORE_INCLUDE_SERVLET_PATH_ATTR, depth + 1 
);
+        }
+        else
+        {
+            assert depth != null : "call to setIgnoreIncludeServletPath() was 
imbalanced";
+            depth -= 1;
+            
+            if ( depth == 0 )
+            {
+                request.removeAttribute( IGNORE_INCLUDE_SERVLET_PATH_ATTR );
+            }
+            else
+            {
+                request.setAttribute( IGNORE_INCLUDE_SERVLET_PATH_ATTR, depth 
);
+            }
+        }
+    }
+    
+    public static boolean ignoreIncludeServletPath( ServletRequest request )
+    {
+        return request.getAttribute( IGNORE_INCLUDE_SERVLET_PATH_ATTR ) != 
null;
     }
 }

Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
 Wed Mar  2 00:21:06 2005
@@ -24,6 +24,7 @@
 import org.apache.beehive.netui.tags.rendering.TagRenderingBase;
 import org.apache.beehive.netui.util.Bundle;
 import org.apache.beehive.netui.util.logging.Logger;
+import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletException;
@@ -272,7 +273,16 @@
             // dispatch to the template itself...
             JspWriter out = pageContext.getOut();
             out.flush();
-            rd.include(req,resp);
+            // We have to make sure that the Page Flow framework doesn't use 
the Servlet Include path as the request
+            // URI while we're rendering a template page.  This is so that 
rendered URLs are relative to the current
+            // page, not the included template page.
+            InternalUtils.setIgnoreIncludeServletPath( req, true );
+            try {
+                rd.include(req,resp);
+            }
+            finally {
+                InternalUtils.setIgnoreIncludeServletPath( req, false );
+            }
         }
         catch (IOException e) {
             String s = Bundle.getString("TempExcp_ExceptIncludeTemplate",

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/IncludeJPFServlet.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/IncludeJPFServlet.java?view=auto&rev=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/IncludeJPFServlet.java
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/IncludeJPFServlet.java
 Wed Mar  2 00:21:06 2005
@@ -0,0 +1,15 @@
+package miniTests.servletInclude;
+
+import javax.servlet.http.*;
+import javax.servlet.*;
+import java.io.IOException;
+
+public class IncludeJPFServlet
+    extends HttpServlet
+{
+    public void doGet( HttpServletRequest request, HttpServletResponse 
response ) throws IOException, ServletException
+    {
+        request.getRequestDispatcher( 
"/miniTests/servletInclude/Controller.jpf" ).include( request, response );
+    }
+}
+

Propchange: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/servletInclude/IncludeJPFServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/web.xml?view=diff&r1=155897&r2=155898
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/web.xml 
(original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/web.xml Wed 
Mar  2 00:21:06 2005
@@ -169,6 +169,16 @@
     
<servlet-class>org.apache.beehive.netui.pageflow.xmlhttprequest.XmlHttpRequestServlet</servlet-class>
   </servlet>
 
+  <!-- The following servlet and servlet-mapping are for the ServletInclude 
test. -->
+  <servlet>
+    <servlet-name>IncludeJPF</servlet-name>
+    <servlet-class>miniTests.servletInclude.IncludeJPFServlet</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>IncludeJPF</servlet-name>
+    <url-pattern>/includejpf/*</url-pattern>
+  </servlet-mapping>
+
   <!-- Struts Action Servlet Mapping -->
 
   <!-- Note that because Struts takes the *last* mapping here as the extension 
to add to

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/invalidateSession.jsp
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/invalidateSession.jsp?view=auto&rev=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/invalidateSession.jsp 
(added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/invalidateSession.jsp 
Wed Mar  2 00:21:06 2005
@@ -0,0 +1,13 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ page import="javax.servlet.http.HttpSession"%>
+
+<%
+    HttpSession sess = request.getSession( false );
+    if ( sess != null ) sess.invalidate();
+%>
+
+<html>
+    <body>
+        OK - invalidated session.
+    </body>
+</html>

Propchange: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/invalidateSession.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/Controller.jpf
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/Controller.jpf?view=auto&rev=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/Controller.jpf
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/Controller.jpf
 Wed Mar  2 00:21:06 2005
@@ -0,0 +1,37 @@
+package miniTests.servletInclude;
+
+import org.apache.beehive.netui.pageflow.*;
+import org.apache.beehive.netui.pageflow.annotations.*;
+
[EMAIL PROTECTED](
+    simpleActions={
+        @Jpf.SimpleAction(name="begin", path="index.jsp")
+    }
+)
+public class Controller extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(name="index", path="index.jsp")
+        }
+    )
+    public Forward submit( MyForm form )
+    {
+        return new Forward( "index" );
+    }
+
+    public static class MyForm implements java.io.Serializable
+    {
+        private String _foo;
+
+        public String getFoo()
+        {
+            return _foo;
+        }
+
+        public void setFoo( String foo )
+        {
+            _foo = foo;
+        }
+    }
+}

Propchange: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/Controller.jpf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/index.jsp
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/index.jsp?view=auto&rev=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/index.jsp
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/index.jsp
 Wed Mar  2 00:21:06 2005
@@ -0,0 +1,25 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" 
uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" 
uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+    <head>
+        <netui:base/>
+    </head>
+    <netui:body>
+        <h3>${pageFlow.URI}</h3>
+
+        <netui:anchor action="begin">begin</netui:anchor>
+
+        <netui:form action="submit">
+            foo: <netui:textBox dataSource="actionForm.foo"/><netui:error 
key="foo"/>
+            <br/>
+            <netui:button value="submit"/>
+        </netui:form>
+    </netui:body>
+</netui:html>
+
+  
+

Propchange: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/servletInclude/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nested1/nested2/nested3/page1.jsp
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nested1/nested2/nested3/page1.jsp?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nested1/nested2/nested3/page1.jsp
 (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nested1/nested2/nested3/page1.jsp
 Wed Mar  2 00:21:06 2005
@@ -14,6 +14,6 @@
 <br>
 <netui:anchor action="escapeNesting">escapeNesting</netui:anchor>
 
-<jsp:include page="../../../history.jsp"/>
+<jsp:include page="../../../noflow/history.jsp"/>
 </body>
 </html>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/page1.jsp
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/page1.jsp?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/page1.jsp
 (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/page1.jsp
 Wed Mar  2 00:21:06 2005
@@ -18,7 +18,7 @@
 <br>
 <netui:anchor action="clear">clear the history</netui:anchor>
 
-<jsp:include page="history.jsp"/>
+<jsp:include page="noflow/history.jsp"/>
 
 </body>
 </html>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml?view=diff&r1=155897&r2=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
 (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
 Wed Mar  2 00:21:06 2005
@@ -6175,11 +6175,6 @@
          </features>
       </test>
       <test>
-         <name>ScopedJpfTest1</name>
-         <description>ScopedJpfTest1</description>
-         <webapp>coreWeb</webapp>
-      </test>
-      <test>
          <name>SameBeanDifferentScope</name>
          <description>Test of two actions on the same page, both of which take 
the same type of form bean, but only one of which is "flow-scoped" (uses the 
'useFormBean' attribute on @Jpf.Action).</description>
          <webapp>coreWeb</webapp>
@@ -6195,6 +6190,11 @@
          </features>
       </test>
       <test>
+         <name>ScopedJpfTest1</name>
+         <description>ScopedJpfTest1</description>
+         <webapp>coreWeb</webapp>
+      </test>
+      <test>
          <name>Select</name>
          <description>Test directly binding select boxes to page 
flows.</description>
          <webapp>coreWeb</webapp>
@@ -6234,6 +6234,19 @@
          </categories>
          <features>
             <feature>XMLBeans</feature>
+         </features>
+      </test>
+      <test>
+         <name>ServletInclude</name>
+         <description>Sanity check of doing a Servlet include (through 
RequestDispatcher) of a .jpf URI.</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>bvt.struts11</category>
+            <category>corePageFlow</category>
+         </categories>
+         <features>
+            <feature>Include</feature>
          </features>
       </test>
       <test>

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ServletInclude.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ServletInclude.xml?view=auto&rev=155898
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ServletInclude.xml
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ServletInclude.xml
 Wed Mar  2 00:21:06 2005
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession 
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session";>
+   <ses:sessionName>ServletInclude</ses:sessionName>
+   <ses:tester>rich</ses:tester>
+   <ses:startDate>02 Mar 2005, 12:08:22.992 AM MST</ses:startDate>
+   <ses:description>Sanity check of doing a Servlet include (through 
RequestDispatcher) of a .jpf URI.</ses:description>
+   <ses:tests>
+      <ses:test>
+         <ses:testNumber>1</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/includejpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>AAF54419C1437566485D7E59824A02B7</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  
<ses:value>JSESSIONID=AAF54419C1437566485D7E59824A02B7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 
4.01 Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+<html lang="en">
+
+    <head>
+        <base 
href="http://localhost:8080/coreWeb/miniTests/servletInclude/index.jsp";>
+    </head>
+    <body>
+        <h3>/miniTests/servletInclude/Controller.jpf</h3>
+
+        <a href="/coreWeb/miniTests/servletInclude/begin.do">begin</a>
+
+        <form action="/coreWeb/miniTests/servletInclude/submit.do" 
method="post">
+            foo: <input type="text" name="{actionForm.foo}">
+            <br/>
+            <input type="submit" value="submit">
+        </form>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>02 Mar 2005, 12:08:49.149 AM MST</ses:endDate>
+   <ses:testCount>1</ses:testCount>
+</ses:recorderSession>

Propchange: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ServletInclude.xml
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to