Author: mrdon
Date: Sat Jun 17 12:59:52 2006
New Revision: 415052

URL: http://svn.apache.org/viewvc?rev=415052&view=rev
Log:
Removing XWork IoC references, adding missing jsf showcase index page

WW-1342 WW-1320

Added:
    struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp
Removed:
    struts/action2/trunk/core/src/main/java/org/apache/struts/action2/lifecycle/
Modified:
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java
    struts/action2/trunk/core/src/main/resources/struts-default.xml

Added: struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp?rev=415052&view=auto
==============================================================================
--- struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp (added)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/jsf/index.jsp Sat Jun 17 
12:59:52 2006
@@ -0,0 +1,24 @@
+<[EMAIL PROTECTED] prefix="saf" uri="/struts-action" %>
+
+<html>
+<head>
+<title>Showcase - JSF Integration</title>
+</head>
+<body>
+<h1> JavaServer Faces Integration </h1>
+
+<p>
+The following pages show how Struts Action 2 and JSF components can work 
together,
+each doing what they do best.
+</p>
+       
+<p>
+       <ul>
+               <li><saf:url id="url" namespace="/jsf" 
action="listEmployees"/><saf:a href="%{url}">List available 
Employees</saf:a></li>
+        <li><saf:url id="url" namespace="/jsf" action="editEmployee"/><saf:a 
href="%{url}">Create/Edit Employee</saf:a></li>
+       </ul>
+</p>
+<p>
+
+</body>
+</html>
\ No newline at end of file

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java?rev=415052&r1=415051&r2=415052&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/ActionContextCleanUp.java
 Sat Jun 17 12:59:52 2006
@@ -18,7 +18,6 @@
 package org.apache.struts.action2.dispatcher;
 
 import com.opensymphony.xwork.ActionContext;
-import com.opensymphony.xwork.interceptor.component.ComponentManager;
 
 import javax.servlet.*;
 import javax.servlet.http.HttpServletRequest;
@@ -112,12 +111,6 @@
                  ((Integer)req.getAttribute(COUNTER)).intValue() > 0 ) {
              return;
          }
-
-        // tear down the component manager if it was created
-        ComponentManager componentManager = (ComponentManager) 
req.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY);
-        if (componentManager != null) {
-            componentManager.dispose();
-        }
 
         // always dontClean up the thread request, even if an action hasn't 
been executed
         ActionContext.setContext(null);

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java?rev=415052&r1=415051&r2=415052&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/DispatcherUtils.java
 Sat Jun 17 12:59:52 2006
@@ -31,8 +31,6 @@
 import org.apache.struts.action2.util.ObjectFactoryInitializable;
 import com.opensymphony.xwork.*;
 import com.opensymphony.xwork.config.ConfigurationException;
-import com.opensymphony.xwork.interceptor.component.ComponentInterceptor;
-import com.opensymphony.xwork.interceptor.component.ComponentManager;
 import com.opensymphony.xwork.util.*;
 import com.opensymphony.xwork.util.location.Location;
 import com.opensymphony.xwork.util.location.LocationUtils;
@@ -326,7 +324,6 @@
         extraContext.put(StrutsStatics.HTTP_REQUEST, request);
         extraContext.put(StrutsStatics.HTTP_RESPONSE, response);
         extraContext.put(StrutsStatics.SERVLET_CONTEXT, servletContext);
-        extraContext.put(ComponentInterceptor.COMPONENT_MANAGER, 
request.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY));
 
         // helpers to get access to request/session/application scope
         extraContext.put("request", requestMap);

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java?rev=415052&r1=415051&r2=415052&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/dispatcher/FilterDispatcher.java
 Sat Jun 17 12:59:52 2006
@@ -26,9 +26,6 @@
 import org.apache.struts.action2.dispatcher.mapper.ActionMapperFactory;
 import org.apache.struts.action2.dispatcher.mapper.ActionMapping;
 import com.opensymphony.xwork.ActionContext;
-import com.opensymphony.xwork.interceptor.component.ComponentConfiguration;
-import com.opensymphony.xwork.interceptor.component.ComponentManager;
-import com.opensymphony.xwork.interceptor.component.DefaultComponentManager;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -98,11 +95,7 @@
  * careful</b>, however, to expose any packages that may have sensitive 
information, such as properties file with
  * database access credentials.
  *
- * <p/> <b>Kicking off XWork's IoC for the request lifecycle</b>
- *
- * <p/> This filter also kicks off the XWork IoC request scope, provided that 
you are using XWork's IoC. All you have to
- * do to get started with XWork's IoC is add a components.xml file to 
WEB-INF/classes and properly set up the [EMAIL PROTECTED]
- * org.apache.struts.action2.lifecycle.LifecycleListener} in web.xml. See the 
IoC docs for more information. <p/>
+ * <p/>
  *
  * @see org.apache.struts.action2.lifecycle.LifecycleListener
  * @see ActionMapper
@@ -206,7 +199,6 @@
         Object o = null;
         try {
 
-            setupContainer(request);
             o = beforeActionInvocation(request, servletContext);
             
             du.serviceAction(request, response, servletContext, mapping);
@@ -225,35 +217,6 @@
         return null;
     }
 
-    protected void setupContainer(HttpServletRequest request) {
-        ComponentManager container = null;
-        HttpSession session = request.getSession(false);
-        ComponentManager fallback = null;
-        if (session != null) {
-            fallback = (ComponentManager) 
session.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY);
-        }
-
-        ServletContext servletContext = getServletContext(session);
-        if (fallback == null) {
-            fallback = (ComponentManager) 
servletContext.getAttribute(ComponentManager.COMPONENT_MANAGER_KEY);
-        }
-
-        if (fallback != null) {
-            container = createComponentManager();
-            container.setFallback(fallback);
-        }
-
-        ComponentConfiguration config = (ComponentConfiguration) 
servletContext.getAttribute("ComponentConfiguration");
-        if (config != null) {
-            if (container == null) {
-                container = createComponentManager();
-            }
-
-            config.configure(container, "request");
-            request.setAttribute(ComponentManager.COMPONENT_MANAGER_KEY, 
container);
-        }
-    }
-
     /**
      * Servlet 2.3 specifies that the servlet context can be retrieved from 
the session. Unfortunately, some versions of
      * WebLogic can only retrieve the servlet context from the filter config. 
Hence, this method enables subclasses to
@@ -367,15 +330,5 @@
         }
 
         return true;
-    }
-
-    /**
-     * Returns a new <tt>DefaultComponentManager</tt> instance. This method is 
useful for developers wishing to subclass
-     * this class and provide a different implementation of 
<tt>DefaultComponentManager</tt>.
-     *
-     * @return a new <tt>DefaultComponentManager</tt> instance.
-     */
-    protected DefaultComponentManager createComponentManager() {
-        return new DefaultComponentManager();
     }
 }

Modified: struts/action2/trunk/core/src/main/resources/struts-default.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/resources/struts-default.xml?rev=415052&r1=415051&r2=415052&view=diff
==============================================================================
--- struts/action2/trunk/core/src/main/resources/struts-default.xml (original)
+++ struts/action2/trunk/core/src/main/resources/struts-default.xml Sat Jun 17 
12:59:52 2006
@@ -22,7 +22,6 @@
             <interceptor name="alias" 
class="com.opensymphony.xwork.interceptor.AliasInterceptor"/>
             <interceptor name="autowiring" 
class="com.opensymphony.xwork.spring.interceptor.ActionAutowiringInterceptor"/>
             <interceptor name="chain" 
class="com.opensymphony.xwork.interceptor.ChainingInterceptor"/>
-            <interceptor name="component" 
class="com.opensymphony.xwork.interceptor.component.ComponentInterceptor"/>
             <interceptor name="conversionError" 
class="org.apache.struts.action2.interceptor.StrutsConversionErrorInterceptor"/>
             <interceptor name="createSession" 
class="org.apache.struts.action2.interceptor.CreateSessionInterceptor" />
             <interceptor name="debugging" 
class="org.apache.struts.action2.interceptor.debugging.DebuggingInterceptor" />


Reply via email to