This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/master by this push:
     new 749c131  Fixes ActionMapper javadocs and references
749c131 is described below

commit 749c131de917c2ad9833ac521441359919d9385a
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Thu Dec 6 09:04:00 2018 +0100

    Fixes ActionMapper javadocs and references
---
 core/src/main/java/org/apache/struts2/StrutsConstants.java             | 2 +-
 .../org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java  | 2 +-
 core/src/main/resources/org/apache/struts2/default.properties          | 3 ++-
 core/src/main/resources/struts-default.xml                             | 3 +--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java 
b/core/src/main/java/org/apache/struts2/StrutsConstants.java
index f786305..68bf36d 100644
--- a/core/src/main/java/org/apache/struts2/StrutsConstants.java
+++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java
@@ -171,7 +171,7 @@ public final class StrutsConstants {
     /** Location of additional localization properties files to load */
     public static final String STRUTS_CUSTOM_I18N_RESOURCES = 
"struts.custom.i18n.resources";
 
-    /** The org.apache.struts2.dispatcher.mapper.ActionMapper implementation 
class */
+    /** A name of a bean implementing 
org.apache.struts2.dispatcher.mapper.ActionMapper interface */
     public static final String STRUTS_MAPPER_CLASS = "struts.mapper.class";
 
     /**
diff --git 
a/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
 
b/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
index 1702b58..13aade8 100644
--- 
a/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
+++ 
b/core/src/main/java/org/apache/struts2/dispatcher/mapper/PrefixBasedActionMapper.java
@@ -41,7 +41,7 @@ import java.util.Map;
  * </p>
  *
  * <pre>
- * &lt;constant name="struts.mapper.class" 
value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/&gt;
+ * &lt;constant name="struts.mapper.class" value="prefix"/&gt;
  * &lt;constant name="struts.mapper.prefixMapping" 
value="/communities:pseudoRestful,/communityTags:pseudoRestful,/events:pseudoRestful,/mediaList:pseudoRestful,/users:pseudoRestful,/community:struts,/communityTag:struts,/event:struts,/media:struts,/user:struts,:struts"/&gt;
  * </pre>
  *
diff --git a/core/src/main/resources/org/apache/struts2/default.properties 
b/core/src/main/resources/org/apache/struts2/default.properties
index 9cd2c6b..a465567 100644
--- a/core/src/main/resources/org/apache/struts2/default.properties
+++ b/core/src/main/resources/org/apache/struts2/default.properties
@@ -73,7 +73,8 @@ struts.multipart.maxSize=2097152
 # struts.custom.properties=application,org/apache/struts2/extension/custom
 
 ### How request URLs are mapped to and from actions
-#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
+### Vy default 'struts' name is used which maps to DefaultActionMapper
+#struts.mapper.class=restful
 
 ### Used by the DefaultActionMapper
 ### You may provide a comma separated list, e.g. 
struts.action.extension=action,jnlp,do
diff --git a/core/src/main/resources/struts-default.xml 
b/core/src/main/resources/struts-default.xml
index 15cc5f9..8c49fc7 100644
--- a/core/src/main/resources/struts-default.xml
+++ b/core/src/main/resources/struts-default.xml
@@ -89,6 +89,7 @@
 
     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" 
name="struts" class="org.apache.struts2.dispatcher.mapper.DefaultActionMapper" 
/>
     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" 
name="composite" 
class="org.apache.struts2.dispatcher.mapper.CompositeActionMapper" />
+    <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" 
name="prefix" 
class="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper" />
     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" 
name="restful" class="org.apache.struts2.dispatcher.mapper.RestfulActionMapper" 
/>
     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" 
name="restful2" 
class="org.apache.struts2.dispatcher.mapper.Restful2ActionMapper" />
 
@@ -171,8 +172,6 @@
 
     <bean type="org.apache.struts2.dispatcher.DispatcherErrorHandler" 
name="struts" 
class="org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler" />
     
-    <constant name="struts.dispatcher.errorHandler" value="struts" />
-
     <!--  Silly workarounds for OGNL since there is currently no way to flush 
its internal caches -->
     <bean type="ognl.PropertyAccessor" name="java.util.ArrayList" 
class="com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor" />
     <bean type="ognl.PropertyAccessor" name="java.util.HashSet" 
class="com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor" />

Reply via email to