You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mr...@apache.org on 2006/07/10 07:16:27 UTC

svn commit: r420427 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/ main/java/org/apache/struts2/config/ main/java/org/apache/struts2/dispatcher/ main/java/org/apache/struts2/dispatcher/mapper/ main/java/org/apache/struts2...

Author: mrdon
Date: Sun Jul  9 22:16:25 2006
New Revision: 420427

URL: http://svn.apache.org/viewvc?rev=420427&view=rev
Log:
Fixed a few more instances of xwork.xml to struts.xml and found a couple of 
class name changes
WW-1367

Added:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
      - copied, changed from r420385, struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/XWorkConfigRetriever.java
    struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/struts.xml
      - copied, changed from r420385, struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/xwork.xml
Removed:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/XWorkConfigRetriever.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/collectors/ArbitraryXMLConfigurationProvider.java
    struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/xwork.xml
Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RichTextEditor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/PortletActionContext.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRichtexteditorResult.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java Sun Jul  9 22:16:25 2006
@@ -41,7 +41,7 @@
  * <!-- START SNIPPET: javadoc -->
  * <p>This tag enables developers to call actions directly from a JSP page by specifying the action name and an optional
  * namespace.  The body content of the tag is used to render the results from the Action.  Any result processor defined
- * for this action in xwork.xml will be ignored, <i>unless</i> the executeResult parameter is specified.</p>
+ * for this action in struts.xml will be ignored, <i>unless</i> the executeResult parameter is specified.</p>
  * <!-- END SNIPPET: javadoc -->
  *
  * <!-- START SNIPPET: params -->

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java Sun Jul  9 22:16:25 2006
@@ -60,10 +60,10 @@
  * </li>
  * <li>
  * If the action is given, Struts will try to obtain an ActionConfig. This will be
- * successfull if the action attribute is a valid action alias defined xwork.xml.
+ * successfull if the action attribute is a valid action alias defined struts.xml.
  * </li>
  * <li>
- * If the action is given and is not an action alias defined in xwork.xml, Struts
+ * If the action is given and is not an action alias defined in struts.xml, Struts
  * will used the action attribute as if it is the posting url, separting the namespace
  * from it and using UrlHelper to generate the final url.
  * </li>

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RichTextEditor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RichTextEditor.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RichTextEditor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/RichTextEditor.java Sun Jul  9 22:16:25 2006
@@ -53,7 +53,7 @@
  * 
  * It is possible to have a rich text editor do server side browsing  
  * when for example the image button is clicked. To integrate this functionality with 
- * Struts, one need to defined the following action definition typically in xwork.xml
+ * Struts, one need to defined the following action definition typically in struts.xml
  * 
  * <pre>
  *   &lt;package name="richtexteditor-browse" extends="struts-default" 
@@ -95,7 +95,7 @@
  * 
  * <p/>
  * 
- * By default the action method that needs to be defined in xwork.xml needs to be 'browse'. If this needs
+ * By default the action method that needs to be defined in struts.xml needs to be 'browse'. If this needs
  * to be something else say, myBrowse, the following could be used
  * 
  * <pre>
@@ -114,7 +114,7 @@
  * It is possible for the richtexteditor to do server side uploading as well. For example when clicking
  * on the 'Image' button and then the 'Upload' tab and then selecting a file from client local
  * machine and the clicking 'Send it to the server'. To integrate this functionality with 
- * Struts, one need to defined the following action definition typically in xwork.xml
+ * Struts, one need to defined the following action definition typically in struts.xml
  * 
  * <pre>
  *   &lt;package name="richtexteditor-upload" extends="struts-default" 
@@ -146,7 +146,7 @@
  * In this case the action will need to have a namespace of '/struts/static/richtexteditor/editor/filemanager/upload'
  * and action name of 'aDifferentUploader'
  * 
- * By default the action method that needs to be defined in xwork.xml needs to be 'upload'. If this needs
+ * By default the action method that needs to be defined in struts.xml needs to be 'upload'. If this needs
  * to be something else say, myUpload, the following could be used
  * 
  * <pre>

Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java?rev=420427&view=auto
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java (added)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java Sun Jul  9 22:16:25 2006
@@ -0,0 +1,82 @@
+/*
+ * Created on Aug 12, 2004 by mgreer
+ */
+package org.apache.struts2.config;
+
+import com.opensymphony.util.FileManager;
+import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Override Xwork class so we cn use an arbitrary config file
+ */
+public class StrutsXMLConfigurationProvider extends XmlConfigurationProvider {
+
+    private static final Log LOG = LogFactory.getLog(StrutsXMLConfigurationProvider.class);
+    private File baseDir = null;
+
+    public StrutsXMLConfigurationProvider(boolean errorIfMissing) {
+        this("struts.xml", errorIfMissing);
+    }
+    
+    public StrutsXMLConfigurationProvider(String filename, boolean errorIfMissing) {
+        super(filename, errorIfMissing);
+        
+        Map<String,String> dtdMappings = new HashMap<String,String>(getDtdMappings());
+        dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.0//EN", "struts-2.0.dtd");
+        setDtdMappings(dtdMappings);
+        File file = new File(filename);
+        if (file.getParent() != null) {
+            this.baseDir = file.getParentFile();
+        }
+    }
+
+    /**
+     * Override Xwork method so we cn use an arbitrary config file
+     *
+     * @see com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#getInputStream(java.lang.String)
+     */
+    protected InputStream getInputStream(String fileName) {
+        InputStream is = null;
+        if (baseDir != null) {
+            is = findInFileSystem(fileName);
+            if (is == null) {
+                is = super.getInputStream(fileName);
+            }
+        } else {
+            is = super.getInputStream(fileName);
+        }
+        return is;
+    }
+    
+    protected InputStream findInFileSystem(String fileName) {
+        InputStream is = null;
+        File file = new File(fileName);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Trying to load file " + file);
+        }
+        
+        // Trying relative path to original file
+        if (!file.exists()) {
+            file = new File(baseDir, fileName);
+        }
+        if (file.exists()) {
+            try {
+                is = new FileInputStream(file);
+            } catch (FileNotFoundException ex) {
+                throw new RuntimeException("File not found: "+file, ex);
+            }
+        } else {
+            
+        }
+        return is;
+    }
+}

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DispatcherUtils.java Sun Jul  9 22:16:25 2006
@@ -23,6 +23,7 @@
 import org.apache.struts2.StrutsStatics;
 import org.apache.struts2.StrutsConstants;
 import org.apache.struts2.config.Configuration;
+import org.apache.struts2.config.StrutsXMLConfigurationProvider;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
@@ -32,6 +33,7 @@
 import com.opensymphony.xwork2.*;
 import com.opensymphony.xwork2.config.ConfigurationException;
 import com.opensymphony.xwork2.config.ConfigurationManager;
+import com.opensymphony.xwork2.config.ConfigurationProvider;
 import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
 import com.opensymphony.xwork2.util.*;
 import com.opensymphony.xwork2.util.location.Location;
@@ -217,11 +219,7 @@
         configurationManager.addConfigurationProvider(new XmlConfigurationProvider("xwork.xml", false));
         
         // Load Struts config files
-        Map<String,String> dtdMappings = new HashMap<String,String>();
-        dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.0//EN", "struts-2.0.dtd");
-        XmlConfigurationProvider prov = new XmlConfigurationProvider("struts.xml", false);
-        prov.setDtdMappings(dtdMappings);
-        configurationManager.addConfigurationProvider(prov);
+        configurationManager.addConfigurationProvider(new StrutsXMLConfigurationProvider(false));
         
         synchronized(DispatcherUtils.class) {
             if (dispatcherListeners.size() > 0) {

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java Sun Jul  9 22:16:25 2006
@@ -31,7 +31,7 @@
  *
  * This result uses the {@link ActionMapper} provided by the {@link ActionMapperFactory} to redirect the browser to a
  * URL that invokes the specified action and (optional) namespace. This is better than the {@link ServletRedirectResult}
- * because it does not require you to encode the URL patterns processed by the {@link ActionMapper} in to your xwork.xml
+ * because it does not require you to encode the URL patterns processed by the {@link ActionMapper} in to your struts.xml
  * configuration files. This means you can change your URL patterns at any point and your application will still work.
  * It is strongly recommended that if you are redirecting to another action, you use this result rather than the
  * standard redirect result.

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java Sun Jul  9 22:16:25 2006
@@ -54,7 +54,7 @@
  * <!-- START SNIPPET: example -->
  * 
  * <p/>
- * In the xwork.xml configuration file, these would be included as:
+ * In the struts.xml configuration file, these would be included as:
  * <p/>
  * <pre>
  *  &lt;result name="success" type="redirect"&gt;
@@ -82,7 +82,7 @@
  * to your Result. If you do subclass this class you will need to
  * override {@link #doExecute(String, ActionInvocation)}.<p>
  * <p/>
- * Any custom result can be defined in xwork.xml as:
+ * Any custom result can be defined in struts.xml as:
  * <p/>
  * <pre>
  *  &lt;result-types&gt;

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java Sun Jul  9 22:16:25 2006
@@ -61,7 +61,7 @@
  *
  * <!-- START SNIPPET: method -->
  *
- * With method-prefix, instead of calling baz action's execute() method (by default if it isn't overriden in xwork.xml
+ * With method-prefix, instead of calling baz action's execute() method (by default if it isn't overriden in struts.xml
  * to be something else), the baz action's anotherMethod() will be called. A very elegant way determine which button is
  * clicked. Alternatively, one would have submit button set a particular value on the action when clicked, and the
  * execute() method decides on what to do with the setted value depending on which button is clicked.
@@ -82,9 +82,9 @@
  *
  * <!-- START SNIPPET: action -->
  *
- * With action-prefix, instead of executing baz action's execute() method (by default if it isn't overriden in xwork.xml
+ * With action-prefix, instead of executing baz action's execute() method (by default if it isn't overriden in struts.xml
  * to be something else), the anotherAction action's execute() method (assuming again if it isn't overriden with
- * something else in xwork.xml) will be executed.
+ * something else in struts.xml) will be executed.
  *
  * <!-- END SNIPPET: action -->
  *
@@ -102,7 +102,7 @@
  *
  * <!-- START SNIPPET: redirect -->
  *
- * With redirect-prefix, instead of executing baz action's execute() method (by default it isn't overriden in xwork.xml
+ * With redirect-prefix, instead of executing baz action's execute() method (by default it isn't overriden in struts.xml
  * to be something else), it will get redirected to, in this case to www.google.com. Internally it uses
  * ServletRedirectResult to do the task.
  *
@@ -123,7 +123,7 @@
  * <!-- START SNIPPET: redirect-action -->
  *
  * With redirect-action-prefix, instead of executing baz action's execute() method (by default it isn't overriden in
- * xwork.xml to be something else), it will get redirected to, in this case 'dashboard.action'. Internally it uses
+ * struts.xml to be something else), it will get redirected to, in this case 'dashboard.action'. Internally it uses
  * ServletRedirectResult to do the task and read off the extension from the struts.properties.
  *
  * <!-- END SNIPPET: redirect-action -->

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/PortletActionContext.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/PortletActionContext.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/PortletActionContext.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/PortletActionContext.java Sun Jul  9 22:16:25 2006
@@ -107,7 +107,7 @@
      * Get the action namespace of the portlet. Used to organize actions for multiple portlets in
      * the same portlet application.
      *
-     * @return The portlet namespace as defined in <code>portlet.xml</code> and <code>xwork.xml</code>
+     * @return The portlet namespace as defined in <code>portlet.xml</code> and <code>struts.xml</code>
      */
     public static String getPortletNamespace() {
         return (String)getContext().get(PORTLET_NAMESPACE);

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java Sun Jul  9 22:16:25 2006
@@ -96,7 +96,7 @@
             }
         }
 
-        XWorkConfigRetriever.setConfiguration(configDir, views.split("[, ]+"));
+        StrutsConfigRetriever.setConfiguration(configDir, views.split("[, ]+"));
         DOTRenderer renderer = new DOTRenderer(writer);
         renderer.render(namespace);
     }

Copied: struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java (from r420385, struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/XWorkConfigRetriever.java)
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java?p2=struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java&p1=struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/XWorkConfigRetriever.java&r1=420385&r2=420427&rev=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/XWorkConfigRetriever.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java Sun Jul  9 22:16:25 2006
@@ -3,13 +3,14 @@
  */
 package org.apache.struts2.sitegraph;
 
+import com.opensymphony.xwork2.config.ConfigurationManager;
 import com.opensymphony.xwork2.config.ConfigurationProvider;
 import com.opensymphony.xwork2.config.entities.ActionConfig;
 import com.opensymphony.xwork2.config.entities.ResultConfig;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.config.StrutsXMLConfigurationProvider;
 import org.apache.struts2.dispatcher.DispatcherUtils;
-import org.apache.struts2.sitegraph.collectors.ArbitraryXMLConfigurationProvider;
 import org.apache.struts2.sitegraph.entities.FreeMarkerView;
 import org.apache.struts2.sitegraph.entities.JspView;
 import org.apache.struts2.sitegraph.entities.VelocityView;
@@ -25,13 +26,14 @@
 /**
  * Initializes and retrieves XWork config elements
  */
-public class XWorkConfigRetriever {
+public class StrutsConfigRetriever {
 
-    private static final Log LOG = LogFactory.getLog(XWorkConfigRetriever.class);
+    private static final Log LOG = LogFactory.getLog(StrutsConfigRetriever.class);
     private static String configDir;
     private static String[] views;
     private static boolean isXWorkStarted = false;
     private static Map viewCache = new LinkedHashMap();
+    private static ConfigurationManager cm;
 
     /**
      * Returns a Map of all action names/configs
@@ -41,15 +43,16 @@
     public static Map getActionConfigs() {
         if (!isXWorkStarted)
             initXWork();
-        return DispatcherUtils.getInstance().getConfigurationManager().getConfiguration().getRuntimeConfiguration().getActionConfigs();
+        return cm.getConfiguration().getRuntimeConfiguration().getActionConfigs();
     }
 
     private static void initXWork() {
-        String configFilePath = configDir + "/xwork.xml";
+        String configFilePath = configDir + "/struts.xml";
         File configFile = new File(configFilePath);
         try {
-            ConfigurationProvider configProvider = new ArbitraryXMLConfigurationProvider(configFile.getCanonicalPath());
-            DispatcherUtils.getInstance().getConfigurationManager().addConfigurationProvider(configProvider);
+            ConfigurationProvider configProvider = new StrutsXMLConfigurationProvider(configFile.getCanonicalPath(), true);
+            cm = new ConfigurationManager();
+            cm.addConfigurationProvider(configProvider);
             isXWorkStarted = true;
         } catch (IOException e) {
             LOG.error("IOException", e);
@@ -145,7 +148,7 @@
         String viewId = namespace + "/" + actionName + "/" + resultName;
         View view = (View) viewCache.get(viewId);
         if (view == null) {
-            File viewFile = XWorkConfigRetriever.getViewFile(namespace, actionName, resultName);
+            File viewFile = StrutsConfigRetriever.getViewFile(namespace, actionName, resultName);
             if (viewFile != null) {
                 switch (type) {
                     case View.TYPE_JSP:
@@ -168,8 +171,8 @@
     }
 
     public static void setConfiguration(String configDir, String[] views) {
-        XWorkConfigRetriever.configDir = configDir;
-        XWorkConfigRetriever.views = views;
+        StrutsConfigRetriever.configDir = configDir;
+        StrutsConfigRetriever.views = views;
         isXWorkStarted = false;
         viewCache = new LinkedHashMap();
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java Sun Jul  9 22:16:25 2006
@@ -18,7 +18,7 @@
 package org.apache.struts2.sitegraph.renderers;
 
 import org.apache.struts2.config.Configuration;
-import org.apache.struts2.sitegraph.XWorkConfigRetriever;
+import org.apache.struts2.sitegraph.StrutsConfigRetriever;
 import org.apache.struts2.sitegraph.entities.Target;
 import org.apache.struts2.sitegraph.entities.View;
 import org.apache.struts2.sitegraph.model.*;
@@ -55,7 +55,7 @@
             }
         });
 
-        Set namespaces = XWorkConfigRetriever.getNamespaces();
+        Set namespaces = StrutsConfigRetriever.getNamespaces();
         for (Iterator iter = namespaces.iterator(); iter.hasNext();) {
             String namespace = (String) iter.next();
 
@@ -65,10 +65,10 @@
 
             SubGraph subGraph = graph.create(namespace);
 
-            Set actionNames = XWorkConfigRetriever.getActionNames(namespace);
+            Set actionNames = StrutsConfigRetriever.getActionNames(namespace);
             for (Iterator iterator = actionNames.iterator(); iterator.hasNext();) {
                 String actionName = (String) iterator.next();
-                ActionConfig actionConfig = XWorkConfigRetriever.getActionConfig(namespace,
+                ActionConfig actionConfig = StrutsConfigRetriever.getActionConfig(namespace,
                         actionName);
 
                 ActionNode action = new ActionNode(actionName);
@@ -184,7 +184,7 @@
         } else if (location.endsWith(".vm")) {
             type = View.TYPE_VM;
         }
-        return XWorkConfigRetriever.getView(namespace, actionName, resultName, type);
+        return StrutsConfigRetriever.getView(namespace, actionName, resultName, type);
     }
 
     private String getViewLocation(String location, String namespace) {

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRichtexteditorResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRichtexteditorResult.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRichtexteditorResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractRichtexteditorResult.java Sun Jul  9 22:16:25 2006
@@ -46,7 +46,7 @@
  * Abstract result for all Rich Text Editor results. It contains common methods
  * that might come in handy to its subclass. 
  * 
- * Configuration of result necessary in xwork.xml (is already there by default) are
+ * Configuration of result necessary in struts.xml (is already there by default) are
  * as follows:
  * 
  * <pre>

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/tiles/TilesResult.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/tiles/TilesResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/tiles/TilesResult.java Sun Jul  9 22:16:25 2006
@@ -51,7 +51,7 @@
  * <!-- END SNIPPET: webxml -->
  *
  * <!-- START SNIPPET: xworkxml -->
- * In xwork.xml, use type="tiles" on your <result>.
+ * In struts.xml, use type="tiles" on your <result>.
  *
  * <action name="editUser" class="userAction" method="edit">
  *      <result name="success" type="tiles">userForm</result>

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java?rev=420427&r1=420426&r2=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java Sun Jul  9 22:16:25 2006
@@ -18,7 +18,10 @@
 package org.apache.struts2.sitegraph;
 
 import com.opensymphony.util.ClassLoaderUtil;
+import com.opensymphony.xwork2.config.ConfigurationManager;
+
 import org.apache.struts2.StrutsTestCase;
+import org.apache.struts2.dispatcher.DispatcherUtils;
 
 import java.io.File;
 import java.io.InputStream;
@@ -29,10 +32,11 @@
  */
 public class SiteGraphTest extends StrutsTestCase {
     public void testWebFlow() throws Exception {
+        DispatcherUtils.getInstance().getConfigurationManager().clearConfigurationProviders();
         // use the classloader rather than relying on the
         // working directory being an assumed value when
         // running the test:  so let's get this class's parent dir 
-        URL url = ClassLoaderUtil.getResource("org/apache/struts2/sitegraph/xwork.xml", SiteGraphTest.class);
+        URL url = ClassLoaderUtil.getResource("org/apache/struts2/sitegraph/struts.xml", SiteGraphTest.class);
         File file = new File(url.toString().substring(5));
         String dir = file.getParent();
 

Copied: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/struts.xml (from r420385, struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/xwork.xml)
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/struts.xml?p2=struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/struts.xml&p1=struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/xwork.xml&r1=420385&r2=420427&rev=420427&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/xwork.xml (original)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/struts.xml Sun Jul  9 22:16:25 2006
@@ -1,6 +1,8 @@
-<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">
-
-<xwork>
+<!DOCTYPE struts PUBLIC
+          "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+          "http://struts.apache.org/dtds/struts-2.0.dtd">
+          
+<struts>
     <include file="struts-default.xml"/>
 
     <package name="default" extends="struts-default">
@@ -33,4 +35,4 @@
             <result name="error">guess-error.ftl</result>
         </action>
     </package>
-</xwork>
+</struts>