Fixing restful to use right methods (docs right, code wrong)

WW-1475


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@525431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald J. Brown
2007-04-04 06:18:26 +00:00
parent 74ba44b5b7
commit 81525eef2d
@@ -114,7 +114,7 @@ public class Restful2ActionMapper extends DefaultActionMapper {
mapping.setMethod("index");
// Creating a new entry on POST e.g. foo/
} else if (isPut(request)) {
} else if (isPost(request)) {
mapping.setMethod("create");
}
@@ -130,7 +130,7 @@ public class Restful2ActionMapper extends DefaultActionMapper {
mapping.setMethod("view");
// Updating an item e.g. foo/1
} else if (isPost(request)) {
} else if (isPut(request)) {
mapping.setMethod("update");
// Removing an item e.g. foo/1