[CONF] Confluence Changes in the last 24 hours

2006-11-05 Thread confluence
-
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-

Apache Geronimo Development (GMOxDEV) 
http://cwiki.apache.org/confluence/display/GMOxDEV
|
|-Pages Added or Edited in This Space
 |-- Building Apache Geronimo with Maven 2 was last edited by jdillon (01:57 
PM).
 |   
http://cwiki.apache.org/confluence/display/GMOxDEV/Building+Apache+Geronimo+with+Maven+2

Apache Directory Server v1.1 Documentation (DIRxSRVx11) 
http://cwiki.apache.org/confluence/display/DIRxSRVx11
|
|-Pages Added or Edited in This Space
 |-- Apache DS initialization was created by elecharny (02:36 PM).
 |   
http://cwiki.apache.org/confluence/display/DIRxSRVx11/Apache+DS+initialization
 |-- JPackage Maven RPM Plugin was last edited by [EMAIL PROTECTED] (05:07 PM).
 |   
http://cwiki.apache.org/confluence/display/DIRxSRVx11/JPackage+Maven+RPM+Plugin
 |-- ApacheDS v1.5 Developer's Guide was last edited by elecharny (01:32 PM).
 |   
http://cwiki.apache.org/confluence/display/DIRxSRVx11/ApacheDS+v1.5+Developer%27s+Guide
 |-- Index was last edited by elecharny (12:38 PM).
 |   http://cwiki.apache.org/confluence/display/DIRxSRVx11/Index

Apache Directory Development (DIRxDEV) 
http://cwiki.apache.org/confluence/display/DIRxDEV
|
|-Pages Added or Edited in This Space
 |-- Coding standards was created by elecharny (12:59 PM).
 |   http://cwiki.apache.org/confluence/display/DIRxDEV/Coding+standards

Apache Directory Server v1.0 Documentation (DIRxSRVx10) 
http://cwiki.apache.org/confluence/display/DIRxSRVx10
|
|-Pages Added or Edited in This Space
 |-- ApacheDS v1.0 Developers's Guide was last edited by elecharny (01:02 PM).
 |   
http://cwiki.apache.org/confluence/display/DIRxSRVx10/ApacheDS+v1.0+Developers%27s+Guide

Apache MINA (MINA) http://cwiki.apache.org/confluence/display/MINA
|
|-Pages Added or Edited in This Space
 |-- Contributors was created by trustin (07:20 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Contributors
 |-- Features was last edited by [EMAIL PROTECTED] (08:47 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Features
 |-- Index was last edited by trustin (08:28 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Index
 |-- FAQ was created by trustin (08:13 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/FAQ
 |-- Mailing Lists was created by trustin (07:43 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Mailing+Lists
 |-- Road Map was last edited by trustin (07:32 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Road+Map
 |-- Reporting a Bug was created by trustin (07:23 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Reporting+a+Bug
 |-- Documentation was created by trustin (06:22 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/Documentation
 |-- SideNav Quick Links was last edited by trustin (06:12 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/SideNav+Quick+Links
 |-- SideNav Community was last edited by trustin (06:07 PM).
 |   http://cwiki.apache.org/confluence/display/MINA/SideNav+Community

Apache Wicket (WICKET) http://cwiki.apache.org/confluence/display/WICKET
|
|-Pages Added or Edited in This Space
 |-- DropDownChoice was last edited by gwynevans (12:15 PM).
 |   http://cwiki.apache.org/confluence/display/WICKET/DropDownChoice
 |-- Component was last edited by gwynevans (12:05 PM).
 |   http://cwiki.apache.org/confluence/display/WICKET/Component
 |-- Reference library was last edited by gwynevans (11:44 AM).
 |   http://cwiki.apache.org/confluence/display/WICKET/Reference+library
 |-- Proposal of URL scheme for Wicket 2 was created by knopp (04:43 AM).
 |   
http://cwiki.apache.org/confluence/display/WICKET/Proposal+of+URL+scheme+for+Wicket+2
 |
 |-New Comments in This Space
 |-- http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27765 (1)


-
CONFLUENCE INFORMATION
This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences
   http://cwiki.apache.org/confluence/users/viewnotifications.action

If you think it was sent incorrectly contact one of the administrators
   http://cwiki.apache.org/confluence/administrators.action

If you want more information on Confluence, or have a bug to report see
   http://www.atlassian.com/software/confluence




svn commit: r471384 - in /struts/struts2/trunk: apps/showcase/src/main/java/org/apache/struts2/showcase/person/ apps/showcase/src/main/resources/ apps/showcase/src/main/resources/org/apache/struts2/sh

2006-11-05 Thread mrdon
Author: mrdon
Date: Sun Nov  5 01:21:42 2006
New Revision: 471384

URL: http://svn.apache.org/viewvc?view=rev&rev=471384
Log:
Adding a classloader scanning configuration provider that uses several
annotations to discover Actions, packages, and namespaces at runtime
WW-1491

Added:

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java
  - copied, changed from r471248, 
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPerson.java

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java
  - copied, changed from r471248, 
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeople.java

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java

struts/struts2/trunk/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/EditPersonAction-conversion.properties
  - copied unchanged from r471248, 
struts/struts2/trunk/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/EditPerson-conversion.properties

struts/struts2/trunk/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/NewPersonAction-validation.xml

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/ClasspathConfigurationProvider.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Namespace.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/NullResult.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/ParentPackage.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Result.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Results.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/ClasspathConfigurationProviderTest.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/CustomNamespaceAction.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/CustomParentPackageAction.java
struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/cltest/

struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/cltest/TwoResultAction.java
Removed:

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/CreatePerson-validation.xml

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/CreatePerson.java

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPerson-conversion.properties

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPerson.java

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeople.java

struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/Person-validation.xml

struts/struts2/trunk/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/CreatePerson-validation.xml

struts/struts2/trunk/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/EditPerson-conversion.properties
Modified:
struts/struts2/trunk/apps/showcase/src/main/resources/struts-person.xml
struts/struts2/trunk/apps/showcase/src/main/resources/struts.properties

struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/person/editPeople.jsp

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java

Copied: 
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java
 (from r471248, 
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPerson.java)
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java?view=diff&rev=471384&p1=struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPerson.java&r1=471248&p2=struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java&r2=471384
==
--- 
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPerson.java
 (original)
+++ 
struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java
 Sun Nov  5 01:21:42 2006
@@ -17,17 +17,26 @@
  */
 package org.apache.struts2.showcase.person;
 
-import com.opensymphony.xwork2.ActionSupport;
-
-import java.util.List;
-import java.util.Iterator;
 import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import

svn commit: r471435 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/ main/java/org/apache/struts2/config/ main/java/org/apache/struts2/dispatcher/mapper/ main/resources/org/apache/st

2006-11-05 Thread tmjee
Author: tmjee
Date: Sun Nov  5 06:22:54 2006
New Revision: 471435

URL: http://svn.apache.org/viewvc?view=rev&rev=471435
Log:
WW-1490
 - Have a composite ActionMapper that decides which ActionMapper it contains 
should be used


Added:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapperTest.java
Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Settings.java

struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java?view=diff&rev=471435&r1=471434&r2=471435
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java 
(original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java 
Sun Nov  5 06:22:54 2006
@@ -17,6 +17,8 @@
  */
 package org.apache.struts2;
 
+import org.apache.struts2.dispatcher.mapper.CompositeActionMapper;
+
 /**
  * This class provides a central location for framework configuration keys
  * used to retrieve and store Struts configuration settings.
@@ -134,4 +136,6 @@
 /** Whether slashes in action names are allowed or not */ 
 public static final String STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES = 
"struts.enable.SlashesInActionNames";
  
+/** Prefix used by [EMAIL PROTECTED] CompositeActionMapper} to identified 
its containing [EMAIL PROTECTED] ActionMapper} class. */
+public static final String STRUTS_MAPPER_COMPOSITE = 
"struts.mapper.composite.";
 }

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Settings.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Settings.java?view=diff&rev=471435&r1=471434&r2=471435
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Settings.java 
(original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/Settings.java 
Sun Nov  5 06:22:54 2006
@@ -135,7 +135,7 @@
 
 return val;
 }
-
+
 /**
  * Returns an Iterator of all properties names.
  *

Added: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java?view=auto&rev=471435
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
 (added)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
 Sun Nov  5 06:22:54 2006
@@ -0,0 +1,254 @@
+/*
+ * $Id: ActionMapper.java 449367 2006-09-24 06:49:04Z mrdon $
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.struts2.dispatcher.mapper;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.config.Settings;
+
+import com.opensymphony.xwork2.ObjectFactory;
+import com.opensymphony.xwork2.config.ConfigurationManager;
+import com.opensymphony.xwork2.util.FileManager;
+
+/**
+ * A composite action mapper that is capable of delegating to a series of 
[EMAIL PROTECTED] ActionMapper} if the former 
+ * failed to obtained a valid [EMAIL PROTECTED] ActionMapping} or uri.
+ * 
+ * It is configured through struts.properties. 
+ * 
+ * For example, with the following entries in struts.properties
+ * 
+ * 
struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
+ * 
struts.mapper.composite.1=org.apache.struts2.dispatcher.mappe

svn commit: r471448 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java

2006-11-05 Thread tmjee
Author: tmjee
Date: Sun Nov  5 07:51:17 2006
New Revision: 471448

URL: http://svn.apache.org/viewvc?view=rev&rev=471448
Log:
WW-1490 (Have a composite ActionMapper that decides which ActionMapper it 
contains should be used)
 - added snippet, so we could use some of the javadoc in confluence
  - 


Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java?view=diff&rev=471448&r1=471447&r2=471448
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
 Sun Nov  5 07:51:17 2006
@@ -35,18 +35,22 @@
 import com.opensymphony.xwork2.util.FileManager;
 
 /**
+ * 
+ * 
  * A composite action mapper that is capable of delegating to a series of 
[EMAIL PROTECTED] ActionMapper} if the former 
  * failed to obtained a valid [EMAIL PROTECTED] ActionMapping} or uri.
  * 
  * It is configured through struts.properties. 
  * 
  * For example, with the following entries in struts.properties
+ * 
  * 
  * 
struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
  * 
struts.mapper.composite.1=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
  * 
struts.mapper.composite.2=org.apache.struts2.dispatcher.mapper.RestfulActionMapper
  * 
struts.mapper.composite.3=org.apache.struts2.dispatcher.mapper.Restful2ActionMapper
  * 
+ * 
  * When [EMAIL PROTECTED] CompositeActionMapper#getMapping(HttpServletRequest, 
ConfigurationManager)} or 
  * [EMAIL PROTECTED] 
CompositeActionMapper#getUriFromActionMapping(ActionMapping)} is invoked, 
  * [EMAIL PROTECTED] CompositeActionMapper} would go through these [EMAIL 
PROTECTED] ActionMapper}s in sequence 
@@ -56,8 +60,21 @@
  * in which case it will just return null for both 
  * [EMAIL PROTECTED] CompositeActionMapper#getMapping(HttpServletRequest, 
ConfigurationManager)} and 
  * [EMAIL PROTECTED] 
CompositeActionMapper#getUriFromActionMapping(ActionMapping)} methods.
+ * 
  * 
+ * For example with the following in struts.properties :-
+ * 
+ * 
struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
+ * 
struts.mapper.composite.1=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
+ * struts.mapper.composite.2=foo.bar.MyActionMapper
+ * struts.mapper.composite.3=foo.bar.MyAnotherActionMapper
+ * 
  * 
+ * CompositeActionMapper will be configured with 3 ActionMapper, 
namely
+ * "DefaultActionMapper", "MyActionMapper" and "MyAnotherActionMapper".  
+ * CompositeActionMapper would consult each of them in order 
described above.
+ * 
+ * 
  * 
  * @see ActionMapper
  * @see ActionMapperFactory




[CONF] Apache Struts 2 Documentation: ActionMapper (page edited)

2006-11-05 Thread confluence










Page Edited :
WW :
ActionMapper



 
ActionMapper
has been edited by tm_jee
(Nov 05, 2006).
 

  Change summary:
  added CompositeActionMapper docs

 
 (View changes)
 

Content:
Content pulled from external source. Click Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click struts.mapper.class.

Possible uses of the ActionMapper include defining your own, cleaner namespaces, such as URLs like /person/1, which would be similar to a request to /getPerson.action?personID=1 using the DefaultActionMapper.

CompositeActionMapper
Content pulled from external source. Click 

For example with the following in struts.properties :-

struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
struts.mapper.composite.1=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
struts.mapper.composite.2=foo.bar.MyActionMapper
struts.mapper.composite.3=foo.bar.MyAnotherActionMapper


CompositeActionMapper will be configured with 3 ActionMapper, namely
"DefaultActionMapper", "MyActionMapper" and "MyAnotherActionMapper".  
CompositeActionMapper would consult each of them in order described above.


Next: Profiling











Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request

Unsubscribe or edit your notifications preferences








svn commit: r471452 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper: Restful2ActionMapper.java RestfulActionMapper.java

2006-11-05 Thread tmjee
Author: tmjee
Date: Sun Nov  5 07:56:29 2006
New Revision: 471452

URL: http://svn.apache.org/viewvc?view=rev&rev=471452
Log:
WW-1483
  - added snippet to RestfulActionMapper and Restful2ActionMapper so that we 
could doc them in confluence


Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java?view=diff&rev=471452&r1=471451&r2=471452
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
 Sun Nov  5 07:56:29 2006
@@ -28,6 +28,8 @@
 import org.apache.commons.logging.LogFactory;
 
 /**
+ *  
+ * 
  * Improved restful action mapper that adds several ReST-style improvements to
  * action mapping, but supports fully-customized URL's via XML.  The two 
primary
  * ReST enhancements are:
@@ -72,6 +74,8 @@
  * 
http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it
  * 
  * 
+ * 
+ * 
  */
 public class Restful2ActionMapper extends DefaultActionMapper {
 

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java?view=diff&rev=471452&r1=471451&r2=471452
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
 Sun Nov  5 07:56:29 2006
@@ -33,6 +33,8 @@
 
 
 /**
+ * 
+ * 
  * A custom action mapper using the following format:
  * 
  * 
@@ -53,6 +55,8 @@
  * 
  * Your action just needs a setArticleId() method, and requests such as 
/article/1, /article/2, etc will all map
  * to that URL pattern.
+ * 
+ * 
  *
  */
 public class RestfulActionMapper implements ActionMapper {




[CONF] Apache Struts 2 Documentation: ActionMapper (page edited)

2006-11-05 Thread confluence










Page Edited :
WW :
ActionMapper



 
ActionMapper
has been edited by tm_jee
(Nov 05, 2006).
 

  Change summary:
  added docs for RestfulActionMapper and Restful2ActionMapper

 
 (View changes)
 

Content:
Content pulled from external source. Click Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click 

Content pulled from external source. Click Content pulled from external source. Click struts.mapper.class.

Possible uses of the ActionMapper include defining your own, cleaner namespaces, such as URLs like /person/1, which would be similar to a request to /getPerson.action?personID=1 using the DefaultActionMapper.

RestfulActionMapper
Content pulled from external source. Click 
http://HOST/ACTION_NAME/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2

This is the same as:

http://HOST/ACTION_NAME/ACTION_NAME + "Id"/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2

Suppose for example we would like to display some articles by id at using the following URL sheme:

http://HOST/article/Id


Your action just needs a setArticleId() method, and requests such as /article/1, /article/2, etc will all map
to that URL pattern.


Restful2ActionMapper
Content pulled from external source. Click 
 If the method is not specified (via '!' or 'method:' prefix), the method is
 "guessed" at using ReST-style conventions that examine the URL and the HTTP
 method.
 Parameters are extracted from the action name, if parameter name/value pairs
 are specified using PARAM_NAME/PARAM_VALUE syntax.


These two improvements allow a GET request for 'category/action/movie/Swingers' to
be mapped to the action name 'movie' with an id of 'Swingers' with an extra parameter
named 'category' with a value of 'action'.  A single action mapping can then handle
all CRUD operations using wildcards, e.g.


  
{0}
...
  


The following URL's will invoke its methods:


 GET:/movie   => method="index"
 GET:/movie/Swingers  => method="view", id="Swingers"
 GET:/movie/Swingers!edit => method="edit", id="Swingers"
 GET:/movie/new   => method="editNew"
 POST:   /movie/Swingers  => method="update"
 PUT:/movie/  => method="create"
 DELETE: /movie/Swingers  => method="remove"


To simulate the HTTP methods PUT and DELETE, since they aren't supported by HTML,
the HTTP parameter "__http_method" will be used.


The syntax and design for this feature was inspired by the ReST support in Ruby on Rails.
See 
http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it




CompositeActionMapper
Content pulled from external source. Click 

For example with the following in struts.properties :-

struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
struts.mapper.composite.1=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
struts.mapper.composite.2=foo.bar.MyActionMapper
struts.mapper.composite.3=foo.bar.MyAnotherActionMapper


CompositeActionMapper will be configured with 3 ActionMapper, namely
"DefaultActionMapper", "MyActionMapper" and "MyAnotherActionMapper".  
CompositeActionMapper would consult each of them in order described above.


Next: Profiling











Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request

Unsubscribe or edit your notifications preferences








[CONF] Apache Struts 2 Documentation: Building with Maven (page edited)

2006-11-05 Thread confluence










Page Edited :
WW :
Building with Maven



 
Building with Maven
has been edited by Rainer Hermanns
(Nov 05, 2006).
 

 
 (View changes)
 

Content:
Maven 2.0.4 or later is required to build Struts 2
First, let's review some Maven basics. Maven uses the notion of a build lifecycleto which plugins can attach. (Plugins are similar to Ant tasks.) When a Maven build is invoked, we specify a point in the lifecycle up to which the build should proceed. The phase compile comes before test, and test comes before package, and package comes before install. Once we have Maven setup, we can invoke the Struts build, and specify which phase the build should use.

Installing

The install phase builds up the project ("package"), and installs any JARs it needs into your local repository (e.g. ~/.m2/repository). Once installed, the JARs can be used by any other Maven project you build.  The install phase is the default phase if none is specified.

To run a basic install, change to the root of the source distribution, and enter
Go!
> mvn

That's it! Maven will download all dependencies the build needs, run all unit tests, package up the JARs, and then install the new JARs locally. For your convenience, copies of the JARs can be found in the target directories of each module. For example, after the build, the main JAR can found at core/target/struts2-core-2.0-SNAPSHOT.jar.
It's suppose to be automatic, but you might still have to press the button
Sometimes, licensing restrictions prevent Maven for downloading all the JARs that a build might need. For example, JavaMail and Activation, can only be downloaded from Sun. When this happens, Maven will display a helpful message that explains how to install these JARs manually. After downloading the required JAR, follow the instructions to install it to the your local repository. Once installed, the JAR is availale to all your Maven builds, not just Struts.
Initial Build Successful
[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Struts 2 .. SUCCESS [0.870s]
[INFO] Struts 2 - Core ... SUCCESS [1:17.272s]
[INFO] Struts 2 API .. SUCCESS [3.252s]
[INFO] 
[INFO] 
[INFO] BUILD SUCCESSFUL
[INFO] 
[INFO] Total time: 1 minute 22 seconds
[INFO] Finished at: Wed Jul 19 10:46:01 PDT 2006
[INFO] Final Memory: 10M/42M
[INFO] 


Other phases

There are other phases that can be useful when working with Maven. The package phase will just JAR (or WAR) the modules. The test phase will run only the unit tests. The compile phase will only build the source code (but not the test sources). And the clean phase will remove all artifacts, typically the entire target directory.

Build profiles

The next step to building the framework with Maven is to understand build profiles. Profiles provide  different configurations for a build. There are several profiles, including default, xwork, and _thirdparty".


 Profile 
 Description 


 default 
 Builds site, api, and core 


 apps 
 Builds the example applications 


 plugins 
 Builds all plugins 


 extras 
 Includes the extras module that cannot be part of the default build due to licensing incompatibilties 


 xwork 
 Includes the xwork build 


Tbe default profile will work for most developers, but some developers will want to use additional profiles as they work on both XWork and other modules, such as the JasperReports integration.

Specify a profile is as simple as:
Profile, please
> mvn -Pprofile ...


Extras Profile

If you want to build all the extras module not included with the default build, use the _extras*_profile.
Extras Module
> mvn -Pextras

Build with Third Party Modules
[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Struts 2 .. SUCCESS [1.047s]
[INFO] Struts 2 - Core ... SUCCESS [33.615s]
[INFO] Struts 2 API .. SUCCESS [0.520s]
[INFO] Struts Extras . SUCCESS [20.944s]
[INFO] 
[INFO] 
[INFO] BUILD SUCCESSFUL
[INFO] -