svn commit: r1423571 - in /struts/struts2/trunk/plugins/convention/src: main/java/org/apache/struts2/convention/ConventionUnknownHandler.java test/java/org/apache/struts2/convention/ConventionUnknownH

2012-12-18 Thread lukaszlenart
Author: lukaszlenart
Date: Tue Dec 18 18:36:09 2012
New Revision: 1423571

URL: http://svn.apache.org/viewvc?rev=1423571&view=rev
Log:
WW-3925 adds better support for looking index action when user hits default 
namespace

Modified:

struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java

struts/struts2/trunk/plugins/convention/src/test/java/org/apache/struts2/convention/ConventionUnknownHandlerTest.java

Modified: 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java?rev=1423571&r1=1423570&r2=1423571&view=diff
==
--- 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
 (original)
+++ 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
 Tue Dec 18 18:36:09 2012
@@ -66,7 +66,9 @@ import java.util.Map;
  * 
  */
 public class ConventionUnknownHandler implements UnknownHandler {
+
 private static final Logger LOG = 
LoggerFactory.getLogger(ConventionUnknownHandler.class);
+
 protected Configuration configuration;
 protected ObjectFactory objectFactory;
 protected ServletContext servletContext;
@@ -81,24 +83,24 @@ public class ConventionUnknownHandler im
 /**
  * Constructs the unknown handler.
  *
- * @param   configuration The XWork configuration.
- * @param   objectFactory The XWork object factory used to create result 
instances.
- * @param   servletContext The servlet context used to help build the 
action configurations.
- * @param   container The Xwork container
- * @param   defaultParentPackageName The default XWork package that the 
unknown handler will use as
- *  the parent package for new actions and results.
- * @param   redirectToSlash A boolean parameter that controls whether or 
not this will handle
- *  unknown actions in the same manner as Apache, Tomcat and other 
web servers. This
- *  handling will send back a redirect for URLs such as /foo to 
/foo/ if there doesn't
- *  exist an action that responds to /foo.
- * @param   nameSeparator The character used as word separator in the 
action names. "-" by default
+ * @param configurationThe XWork configuration.
+ * @param objectFactoryThe XWork object factory used to create 
result instances.
+ * @param servletContext   The servlet context used to help build 
the action configurations.
+ * @param containerThe Xwork container
+ * @param defaultParentPackageName The default XWork package that the 
unknown handler will use as
+ * the parent package for new actions and 
results.
+ * @param redirectToSlash  A boolean parameter that controls 
whether or not this will handle
+ * unknown actions in the same manner as 
Apache, Tomcat and other web servers. This
+ * handling will send back a redirect for 
URLs such as /foo to /foo/ if there doesn't
+ * exist an action that responds to /foo.
+ * @param nameSeparatorThe character used as word separator in 
the action names. "-" by default
  */
 @Inject
 public ConventionUnknownHandler(Configuration configuration, ObjectFactory 
objectFactory,
-ServletContext servletContext, Container container,
-@Inject("struts.convention.default.parent.package") String 
defaultParentPackageName,
-@Inject("struts.convention.redirect.to.slash") String 
redirectToSlash,
-@Inject("struts.convention.action.name.separator") String 
nameSeparator) {
+ServletContext servletContext, Container 
container,
+
@Inject("struts.convention.default.parent.package") String 
defaultParentPackageName,
+
@Inject("struts.convention.redirect.to.slash") String redirectToSlash,
+
@Inject("struts.convention.action.name.separator") String nameSeparator) {
 this.configuration = configuration;
 this.objectFactory = objectFactory;
 this.servletContext = servletContext;
@@ -116,7 +118,7 @@ public class ConventionUnknownHandler im
 }
 
 public ActionConfig handleUnknownAction(String namespace, String 
actionName)
-throws XWorkException {
+throws XWorkException {
 // Strip the namespace if it is just a slash
 if (namespace == null || "/".equals(namespace)) {
 namespace = 

svn commit: r1423615 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java

2012-12-18 Thread lukaszlenart
Author: lukaszlenart
Date: Tue Dec 18 20:13:50 2012
New Revision: 1423615

URL: http://svn.apache.org/viewvc?rev=1423615&view=rev
Log:
WW-3755 extracts acceptedParamNames to constant

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java?rev=1423615&r1=1423614&r2=1423615&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
 Tue Dec 18 20:13:50 2012
@@ -132,6 +132,8 @@ public class ParametersInterceptor exten
 
 private static final Logger LOG = 
LoggerFactory.getLogger(ParametersInterceptor.class);
 
+public static final String ACCEPTED_PARAM_NAMES = 
"\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['\\w+'\\])|(\\('\\w+'\\)))*";
+
 protected static final int PARAM_NAME_MAX_LENGTH = 100;
 
 private int paramNameMaxLength = PARAM_NAME_MAX_LENGTH;
@@ -143,7 +145,7 @@ public class ParametersInterceptor exten
 private boolean devMode = false;
 
 // Allowed names of parameters
-private String acceptedParamNames = 
"\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['\\w+'\\])|(\\('\\w+'\\)))*";
+private String acceptedParamNames = ACCEPTED_PARAM_NAMES;
 private Pattern acceptedPattern = Pattern.compile(acceptedParamNames);
 
 private ValueStackFactory valueStackFactory;




svn commit: r1423621 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java test/java/org/apache/struts2/dispatcher/HttpHeaderResultTest.java

2012-12-18 Thread lukaszlenart
Author: lukaszlenart
Date: Tue Dec 18 20:27:39 2012
New Revision: 1423621

URL: http://svn.apache.org/viewvc?rev=1423621&view=rev
Log:
WW-3906 adds support to parse all parameters of HttpHeaderResult

Modified:

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

struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/HttpHeaderResultTest.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java?rev=1423621&r1=1423620&r2=1423621&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
 Tue Dec 18 20:27:39 2012
@@ -26,6 +26,8 @@ import com.opensymphony.xwork2.ActionInv
 import com.opensymphony.xwork2.Result;
 import com.opensymphony.xwork2.util.TextParseUtil;
 import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import org.apache.struts2.ServletActionContext;
 
 import javax.servlet.http.HttpServletResponse;
@@ -35,64 +37,60 @@ import java.util.Map;
 
 /**
  * 
- *
+ * 
  * A custom Result type for setting HTTP headers and status by optionally 
evaluating against the ValueStack.
  * This result can also be used to send and error to the client.
- *
+ * 
  * 
  * 
  * This result type takes the following parameters:
- *
+ * 
  * 
- *
+ * 
  * 
- *
+ * 
  * status - the http servlet response status code that should be 
set on a response.
- *
+ * 
  * parse - true by default. If set to false, the headers param will 
not be parsed for Ognl expressions.
- *
+ * 
  * headers - header values.
- * 
+ * 
  * error - the http servlet response error code that should be set 
on a response.
- *
+ * 
  * errorMessage - error message to be set on response if 'error' is 
set.
  * 
- *
+ * 
  * 
- *
+ * 
  * Example:
- *
+ * 
  * 
  * 
  *   204
  *   a custom header value
  *   another custom header value
  * 
- * 
+ * 
  * 
  *   305
  *   this action must be accessed through a 
prozy
  * 
  * 
- *
  */
 public class HttpHeaderResult implements Result {
 
 private static final long serialVersionUID = 195648957144219214L;
-
-/** The default parameter */
-public static final String DEFAULT_PARAM = "status";
-
+private static final Logger LOG = 
LoggerFactory.getLogger(HttpHeaderResult.class);
 
 private boolean parse = true;
-private Map headers;
+private Map headers;
 private int status = -1;
-private int error = -1;
+private String error = null;
 private String errorMessage;
-
+
 public HttpHeaderResult() {
 super();
-headers = new HashMap();
+headers = new HashMap();
 }
 
 public HttpHeaderResult(int status) {
@@ -101,20 +99,19 @@ public class HttpHeaderResult implements
 this.parse = false;
 }
 
-
 /**
- * Sets the http servlet error code that should be set on the reponse
- * 
+ * Sets the http servlet error code that should be set on the response
+ *
  * @param error the Http error code
  * @see javax.servlet.http.HttpServletResponse#sendError(int)
  */
-public void setError(int error) {
+public void setError(String error) {
 this.error = error;
 }
-
+
 /**
  * Sets the error message that should be set on the reponse
- * 
+ *
  * @param errorMessage error message send to the client
  * @see javax.servlet.http.HttpServletResponse#sendError(int, String)
  */
@@ -134,7 +131,7 @@ public class HttpHeaderResult implements
 /**
  * Sets whether or not the HTTP header values should be evaluated against 
the ValueStack (by default they are).
  *
- * @param parse true if HTTP header values should be evaluated 
agains the ValueStack, false
+ * @param parse true if HTTP header values should be evaluated 
against the ValueStack, false
  *  otherwise.
  */
 public void setParse(boolean parse) {
@@ -157,7 +154,8 @@ public class HttpHeaderResult implements
 
 /**
  * Adds an HTTP header to the response
- * @param name header name
+ *
+ * @param name  header name
  * @param value header value
  */
 public void addHeader(String name, String value) {
@@ -174,24 +172,35 @@ public class HttpHeaderResult implements
 public void execute(ActionInvocation 

svn commit: r1423626 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java

2012-12-18 Thread lukaszlenart
Author: lukaszlenart
Date: Tue Dec 18 20:30:41 2012
New Revision: 1423626

URL: http://svn.apache.org/viewvc?rev=1423626&view=rev
Log:
WW-3906 updates docs about parsing parameters

Modified:

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

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java?rev=1423626&r1=1423625&r2=1423626&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
 Tue Dec 18 20:30:41 2012
@@ -39,7 +39,7 @@ import java.util.Map;
  * 
  * 
  * A custom Result type for setting HTTP headers and status by optionally 
evaluating against the ValueStack.
- * This result can also be used to send and error to the client.
+ * This result can also be used to send and error to the client. All the 
parameters can be evaluated against the ValueStack.
  * 
  * 
  * 




svn commit: r1423630 - in /struts/struts2/trunk/archetypes/struts2-archetype-portlet: ./ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/ src/main/resources/archetype-resourc

2012-12-18 Thread lukaszlenart
Author: lukaszlenart
Date: Tue Dec 18 20:37:23 2012
New Revision: 1423630

URL: http://svn.apache.org/viewvc?rev=1423630&view=rev
Log:
WW-3947 improves Portlet Archetype

Removed:

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/test/java/JettyPlutoLauncher.java
Modified:
struts/struts2/trunk/archetypes/struts2-archetype-portlet/README.txt

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/maven/archetype-metadata.xml

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/HelloAction.java

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/java/UpdateNameAction.java

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/resources/struts.xml

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml

struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml

Modified: struts/struts2/trunk/archetypes/struts2-archetype-portlet/README.txt
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-portlet/README.txt?rev=1423630&r1=1423629&r2=1423630&view=diff
==
--- struts/struts2/trunk/archetypes/struts2-archetype-portlet/README.txt 
(original)
+++ struts/struts2/trunk/archetypes/struts2-archetype-portlet/README.txt Tue 
Dec 18 20:37:23 2012
@@ -1,42 +1,38 @@
 INFORMATION
 ===
 - This is Struts 2's "Portlet" Maven Archetype
-- To be used to create a simple portlet that can be deployed as a webapp or 
JSR168 portlet.
+- To be used to create a simple portlet that can be deployed as JSR286 portlet.
+- There is a maven profile in order to test this portlet on Pluto Portal.
  
 
 USAGE
 =
 
-- change directory to where the portlet template is to be created,
-  for example, a 'projects' directory (which you may need to create):
-  
- cd /home/tmjee/projects
-  
-- run the following command to generate the sample portlet template, assuming 
:-
-- root java package -> com.myCompany.myPortlet
-
-- the portlet war name   ->  myWebApp
-
-
-  mvn archetype:create -DgroupId=com.myCompany.myPortlet \
-   -DartifactId=myWebApp \
-   -DarchetypeGroupId=org.apache.struts \
-   -DarchetypeArtifactId=struts2-archetype-portlet \
-   -DarchetypeVersion=2.0.9-SNAPSHOT \
-   
-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
-
-- to compile, execute
-  mvn compile
-
-- to run test cases execute
-  mvn test
+1- Generate your archetype
+- mvn archetype:generate -DartifactId=struts2-portlet-helloworld  
-DgroupId=com.mycompany.struts2.portlet -Dversion=1.0.0-SNAPSHOT 
-DarchetypeGroupId=org.apache.struts 
-DarchetypeArtifactId=struts2-archetype-portlet -DarchetypeVersion=2.3.8
+
+2- Build your portlet project for Pluto Portal
+- cd struts2-portlet-helloworld
+- mvn clean package -Ppluto-embedded
+
+3- Download and install Pluto Portal
+- cd ..
+- curl -v -H "Accept-Encoding: gzip" 
"http://apache.opensourcemirror.com/portals/pluto/pluto-2.0.3-bundle.zip"; > 
pluto-2.0.3.zip
+- unzip pluto-2.0.3.zip -d .
+
+4- Deploy your portlet app
+- cp 
struts2-portlet-helloworld/target/struts2-portlet-helloworld-1.0.0-SNAPSHOT.war 
pluto-2.0.3/webapps
+
+5- Start Pluto Portal and create a page for your portlet
+- ./pluto-2.0.3/bin/startup.sh
+- Go to http://localhost:8080/pluto/portal (login: pluto / pwd: pluto)
+- Click on "Pluto Admin" (http://localhost:8080/pluto/portal/Pluto%20Admin)
+- On "Portal Pages" section : Add page "Struts2"
+- On "Portlet Applications" section : select "/struts2-portlet-helloworld" and 
"HelloPortlet" then click "Add Portlet"
+
+6- Test your portlet app
+- Go to your Struts2 page http://localhost:8080/pluto/portal/Struts2 and play 
with your portlet !!
 
-- to clean execute
-  mvn clean
 
-- to package execute 
-  mvn package
 
-- to start it with jetty execute as a servlet
-  mvn jetty:run
 

Modified: 
struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1423630&r1=1423629&r2=1423630&view=diff
==
--- 
struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/maven/archetype-metadata.xml
 (original)
+++ 
struts/struts2/trunk/arche

[CONF] Confluence Changes in the last 24 hours

2012-12-18 Thread confluence
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-


Apache Cloudstack (https://cwiki.apache.org/confluence/display/CLOUDSTACK)

Pages
-
.NET SDK Design Document created by siwater (05:31 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/.NET+SDK+Design+Document

Dynamic scaling of CPU and RAM created by koushikd (10:42 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+scaling+of+CPU+and+RAM

ASF CS 4.0.1 Test Execution Plan edited by  abhinavr  (06:40 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/ASF+CS+4.0.1+Test+Execution+Plan

CPU and RAM Overcommit created by bharat.kumar (05:17 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CPU+and+RAM+Overcommit

Base Image Updation facility created by harikrishna.patn...@citrix.com (01:00 
AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Base+Image+Updation+facility



Apache CXF Documentation (https://cwiki.apache.org/confluence/display/CXF20DOC)

Pages
-
Simple Frontend Configuration edited by  cohei...@apache.org  (08:17 AM)
https://cwiki.apache.org/confluence/display/CXF20DOC/Simple+Frontend+Configuration



Apache DeltaSpike (https://cwiki.apache.org/confluence/display/DeltaSpike)

Pages
-
Graduation Proposal edited by  struberg  (05:03 AM)
https://cwiki.apache.org/confluence/display/DeltaSpike/Graduation+Proposal



Apache Flex (https://cwiki.apache.org/confluence/display/FLEX)

Pages
-
Compiling Apache Flex for different Locales and different versions of the Flash 
Player edited by  e...@ixsoftware.nl  (09:34 AM)
https://cwiki.apache.org/confluence/display/FLEX/Compiling+Apache+Flex+for+different+Locales+and+different+versions+of+the+Flash+Player


Comments
https://cwiki.apache.org/confluence/display/FLEX/AS+to+JS+translation+table (2)

Apache Flume (https://cwiki.apache.org/confluence/display/FLUME)

Pages
-
Development Environment edited by  bro...@gmail.com  (10:57 AM)
https://cwiki.apache.org/confluence/display/FLUME/Development+Environment



Apache Giraph (Incubating) (https://cwiki.apache.org/confluence/display/GIRAPH)

Pages
-
Committer notes edited by  nitay  (06:44 PM)
https://cwiki.apache.org/confluence/display/GIRAPH/Committer+notes

How to Contribute edited by  nitay  (06:12 PM)
https://cwiki.apache.org/confluence/display/GIRAPH/How+to+Contribute

Install and test Giraph 0.20 on CDH3u1 edited by  nitay  (06:09 PM)
https://cwiki.apache.org/confluence/display/GIRAPH/Install+and+test+Giraph+0.20+on+CDH3u1

Quick Start Guide edited by  nitay  (06:00 PM)
https://cwiki.apache.org/confluence/display/GIRAPH/Quick+Start+Guide



Apache Hive (https://cwiki.apache.org/confluence/display/Hive)

Pages
-
LanguageManual DDL edited by  andrew.chalf...@gmail.com  (11:21 AM)
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL



Apache Kafka (https://cwiki.apache.org/confluence/display/KAFKA)

Comments
https://cwiki.apache.org/confluence/display/KAFKA/Offset+Management (2)

OODT (https://cwiki.apache.org/confluence/display/OODT)

Pages
-
Workflow2 Quick Start Guide created by michael.caya...@jpl.nasa.gov (01:57 PM)
https://cwiki.apache.org/confluence/display/OODT/Workflow2+Quick+Start+Guide

Home edited by  michael.caya...@jpl.nasa.gov  (01:43 PM)
https://cwiki.apache.org/confluence/display/OODT/Home



Apache OpenOffice Community 
(https://cwiki.apache.org/confluence/display/OOOUSERS)

Pages
-
Directory of Volunteers edited by  filhocf  (05:42 PM)
https://cwiki.apache.org/confluence/display/OOOUSERS/Directory+of+Volunteers



Apache Qpid (https://cwiki.apache.org/confluence/display/qpid)

Pages
-
0.20 Release edited by  justi9  (05:24 PM)
https://cwiki.apache.org/confluence/display/qpid/0.20+Release



Apache Struts 2 Wiki (https://cwiki.apache.org/confluence/display/S2WIKI)

Comments
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=25202628 (1)

Apache Sqoop (https://cwiki.apache.org/confluence/display/SQOOP)

Pages
-
How to Release Sqoop2 edited by  jarcec  (10:27 PM)
https://cwiki.apache.org/confluence/display/SQOOP/How+to+Release+Sqoop2




Change your notification pref