Issues Closed: week of 2008-04-25

2008-04-25 Thread dblevins

Struts2 - Friday, April 25, 2008

  38 closed in last 7 days

  [WW-2373] 2.0.11 autocompleter
  http://issues.apache.org/struts/browse/WW-2373

  [WW-2568] Problems activating java 2 security in a struts 2 application 
running on Websphere 6.1.0.15 
  http://issues.apache.org/struts/browse/WW-2568

  [WW-2228] java.lang.NoClassDefFoundError: 
org/apache/velocity/app/VelocityEngine when loading filter 
org.apache.struts2.dispatcher.FilterDispatcher
  http://issues.apache.org/struts/browse/WW-2228

  [WW-2116] tooltip is not displayed
  http://issues.apache.org/struts/browse/WW-2116

  [WW-2613] Type Conversion Guide doesn't describe where to put Class Name 
specific property files
  http://issues.apache.org/struts/browse/WW-2613

  [WW-1473] Freemarker performance / caching issue in UI Tags
  http://issues.apache.org/struts/browse/WW-1473

  [WW-2044] ParametersInterceptor fails to assign value of form checkbox to 
Boolean bean attribute  
  http://issues.apache.org/struts/browse/WW-2044

  [WW-2551] premature close of stream in XLSTResult
  http://issues.apache.org/struts/browse/WW-2551

  [WW-2605] URLs with locations should return 201, not 200
  http://issues.apache.org/struts/browse/WW-2605

  [WW-2574] CLONE -Unable to load bean: type: 
class:com.opensymphony.xwork2.ObjectFactory
  http://issues.apache.org/struts/browse/WW-2574

  [WW-1640] When using JSP templates for tags, missing templates fail without 
error
  http://issues.apache.org/struts/browse/WW-1640

  [WW-2562] Only first action with result type="XSLT" included in JSP by 
 is executed; the rest is ignored
  http://issues.apache.org/struts/browse/WW-2562

  [WW-2483] ServletActionContext not initialised in tiles plugin?
  http://issues.apache.org/struts/browse/WW-2483

  [WW-2529] Wildcard mappings match not as expected
  http://issues.apache.org/struts/browse/WW-2529

  [WW-2489] Interceptor Stack Order
  http://issues.apache.org/struts/browse/WW-2489

  [WW-1496] Sitemesh I18N error when action result not exist
  http://issues.apache.org/struts/browse/WW-1496

  [WW-1927] Value of checkbox and hidden field have problem in s:form
  http://issues.apache.org/struts/browse/WW-1927

  [WW-2571] JSONValidationInterceptor: Set MIME type to 'application/json'
  http://issues.apache.org/struts/browse/WW-2571

  [WW-2581] add generics to RequestAware, SessionAware, and ParameterAware
  http://issues.apache.org/struts/browse/WW-2581

  [WW-2457] Action boolean properties values are not available to XSLTResult.
  http://issues.apache.org/struts/browse/WW-2457

  [WW-2532] I18n using global-messages_xx.properties files in UTF-8 format 
fails to serve them correctly.
  http://issues.apache.org/struts/browse/WW-2532

  [WW-1550] XSLT Result matchingPattern and excludingPattern missing
  http://issues.apache.org/struts/browse/WW-1550

  [WW-2499] CheckboxInterceptor sets disabled checkboxes to false even if 
checked
  http://issues.apache.org/struts/browse/WW-2499

  [WW-2470] Caught OgnlException while setting property 'methodName' on type 
'com.opensymphony.xwork2.validator.validators.RequiredFieldValidator'
  http://issues.apache.org/struts/browse/WW-2470

  [WW-2468] There is no Action mapped for namespace /actionchaining and action 
name actionChain1!input. - [unknown location] 
  http://issues.apache.org/struts/browse/WW-2468

  [WW-2604] Several plugins missing from distribution
  http://issues.apache.org/struts/browse/WW-2604

  [WW-2506] ControllerClasspathPackageProvider causes duplicate package error
  http://issues.apache.org/struts/browse/WW-2506

  [WW-1751] StrutsResultSupport truncates redirect url at &
  http://issues.apache.org/struts/browse/WW-1751

  [WW-2082] Result annotation for StreamResult uses value tag instead of  
inputName parameter for the name of the stream property
  http://issues.apache.org/struts/browse/WW-2082

  [WW-2092] Update UI tags to allow custom html tag attributes
  http://issues.apache.org/struts/browse/WW-2092

  [WW-2577] @Result annotation - use the compiler to enforce stronger 
restrictions
  http://issues.apache.org/struts/browse/WW-2577

  [WW-2469] CLONE -Ajax divs used as targets do not eliminate their previous 
content
  http://issues.apache.org/struts/browse/WW-2469

  [WW-1612] JBoss Seam-style scoped injectors
  http://issues.apache.org/struts/browse/WW-1612

  [WW-2487]  [DispatchAction] Request[/searchByCompanyResults] does not contain 
handler parameter named 'select'.  This may be caused by whitespace in the 
label text.
  http://issues.apache.org/struts/browse/WW-2487

  [WW-2594] XSL errors in action of type="xslt" generate uncatchable exceptions
  http://issues.apache.org/struts/browse/WW-2594

  [WW-2005] struts2-spring-plugin not work with java 1.4 (1.4.2)
  http://issues.apache.org/struts/browse/WW-2005

  [WW-2572] StrutsNavigationHandler act as active navigation handler even for a 
pure jsf requests targetted at myfaces Navigation Handler
  http://issues.apache.org/struts/browse/WW-257

svn commit: r651529 - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/components/ plugins/portlet/src/main/java/org/apache/struts2/components/ plugins/portlet/src/test/java/org/apache/

2008-04-25 Thread nilsga
Author: nilsga
Date: Fri Apr 25 01:16:36 2008
New Revision: 651529

URL: http://svn.apache.org/viewvc?rev=651529&view=rev
Log:
WW-2504 Ignoring the includeParams for portlet urls. Had to extract some more 
code into the "UrlRenderer".

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UrlRenderer.java

struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java

struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java?rev=651529&r1=651528&r2=651529&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
 Fri Apr 25 01:16:36 2008
@@ -22,6 +22,10 @@
 
 import java.io.IOException;
 import java.io.Writer;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -197,4 +201,126 @@
// interceptor does allow validation eg. method is not filtered 
out)
formComponent.evaluateClientSideJsEnablement(actionName, 
namespace, actionMethod);
}
+
+
+   public void beforeRenderUrl(URL urlComponent) {
+   if (urlComponent.value != null) {
+urlComponent.value = urlComponent.findString(urlComponent.value);
+}
+
+// no explicit url set so attach params from current url, do
+// this at start so body params can override any of these they wish.
+try {
+// ww-1266
+String includeParams = (urlComponent.urlIncludeParams != null ? 
urlComponent.urlIncludeParams.toLowerCase() : URL.GET);
+
+if (urlComponent.includeParams != null) {
+includeParams = 
urlComponent.findString(urlComponent.includeParams);
+}
+
+if (URL.NONE.equalsIgnoreCase(includeParams)) {
+mergeRequestParameters(urlComponent.value, 
urlComponent.parameters, Collections.EMPTY_MAP);
+} else if (URL.ALL.equalsIgnoreCase(includeParams)) {
+mergeRequestParameters(urlComponent.value, 
urlComponent.parameters, urlComponent.req.getParameterMap());
+
+// for ALL also include GET parameters
+includeGetParameters(urlComponent);
+includeExtraParameters(urlComponent);
+} else if (URL.GET.equalsIgnoreCase(includeParams) || 
(includeParams == null && urlComponent.value == null && urlComponent.action == 
null)) {
+includeGetParameters(urlComponent);
+includeExtraParameters(urlComponent);
+} else if (includeParams != null) {
+LOG.warn("Unknown value for includeParams parameter to URL 
tag: " + includeParams);
+}
+} catch (Exception e) {
+LOG.warn("Unable to put request parameters (" + 
urlComponent.req.getQueryString() + ") into parameter map.", e);
+}
+
+   
+   }
+   
+private void includeExtraParameters(URL urlComponent) {
+if (urlComponent.extraParameterProvider != null) {
+mergeRequestParameters(urlComponent.value, 
urlComponent.parameters, 
urlComponent.extraParameterProvider.getExtraParameters());
+}
+}
+private void includeGetParameters(URL urlComponent) {
+   String query = extractQueryString(urlComponent);
+   mergeRequestParameters(urlComponent.value, urlComponent.parameters, 
UrlHelper.parseQueryString(query));
+}
+
+private String extractQueryString(URL urlComponent) {
+// Parse the query string to make sure that the parameters come from 
the query, and not some posted data
+String query = urlComponent.req.getQueryString();
+if (query == null) {
+query = (String) 
urlComponent.req.getAttribute("javax.servlet.forward.query_string");
+}
+
+if (query != null) {
+// Remove possible #foobar suffix
+int idx = query.lastIndexOf('#');
+
+if (idx != -1) {
+query = query.substring(0, idx);
+}
+}
+return query;
+}
+
+/**
+ * Merge request parameters into current parameters. If a parameter is
+ * already present, than the request parameter in th

[OSS Bamboo] Struts 2 SVN - Main Build (Java 6) build 457 was SUCCESSFUL (with 787 tests). Change made by Nils-Helge Garli Hegvik

2008-04-25 Thread Atlassian Open Source Bamboo Integration Server
The project Struts 2 SVN - Main Build (Java 6) has the following 1 change by 1 
author:

*Nils-Helge Garli Hegvik* made the following changes at 

Comment:
WW-2504 Ignoring the includeParams for portlet urls. Had to extract some more 
code into the "UrlRenderer".

> /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UrlRenderer.java
>  (651529)
> /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java
>  (651529)
> /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
>  (651529)
> /struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java
>  (651529)
> /struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
>  (651529)



---

All 787 tests passed.

Click http://opensource.bamboo.atlassian.com/browse/STRUTS-MAINJ6-457 to find 
out more.

Thanks,

Bamboo


[OSS Bamboo] Struts 2 SVN - Main Build build 790 was SUCCESSFUL (with 787 tests). Change made by Nils-Helge Garli Hegvik

2008-04-25 Thread Atlassian Open Source Bamboo Integration Server
The project Struts 2 SVN - Main Build has the following 1 change by 1 author:

*Nils-Helge Garli Hegvik* made the following changes at 

Comment:
WW-2504 Ignoring the includeParams for portlet urls. Had to extract some more 
code into the "UrlRenderer".

> /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UrlRenderer.java
>  (651529)
> /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java
>  (651529)
> /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
>  (651529)
> /struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java
>  (651529)
> /struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
>  (651529)



---

All 787 tests passed.

Click http://opensource.bamboo.atlassian.com/browse/STRUTS-MAIN-790 to find out 
more.

Thanks,

Bamboo


svn commit: r651537 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java

2008-04-25 Thread jeromy
Author: jeromy
Date: Fri Apr 25 01:40:10 2008
New Revision: 651537

URL: http://svn.apache.org/viewvc?rev=651537&view=rev
Log:
Added more descriptive LOG.error msg for a missing freemarker template

WW-2615

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java?rev=651537&r1=651536&r2=651537&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
 Fri Apr 25 01:40:10 2008
@@ -127,7 +127,18 @@
 }
 
 if (template == null) {
-LOG.error("Could not load template " + 
templateContext.getTemplate());
+if (LOG.isErrorEnabled()) {
+LOG.error("Could not load the FreeMarker template named '" + 
templateContext.getTemplate().getName() +"':");
+for (Template t : templates) {
+LOG.error("Attempted: " + getFinalTemplateName(t));
+}
+LOG.error("The TemplateLoader provided by the FreeMarker 
Configuration was a: "+config.getTemplateLoader().getClass().getName());
+if (freemarkerCaching) {
+LOG.error("FreeMarker Template caching is enabled 
("+StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE+"=true) and this template 
is now cached as missing (the TemplateLoader won't be asked again)");
+} else {
+LOG.error("FreeMarker Template caching is disabled 
("+StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE+"=false)");
+}
+}
 if (exception != null) {
 throw exception;
 } else {




svn commit: r651562 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java

2008-04-25 Thread jeromy
Author: jeromy
Date: Fri Apr 25 03:15:55 2008
New Revision: 651562

URL: http://svn.apache.org/viewvc?rev=651562&view=rev
Log:
FreemarkerTemplateEngine no longer swallows freemarker.core.ParseException

WW-2615

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java?rev=651562&r1=651561&r2=651562&view=diff
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
 Fri Apr 25 03:15:55 2008
@@ -45,6 +45,7 @@
 
 import freemarker.template.Configuration;
 import freemarker.template.SimpleHash;
+import freemarker.core.ParseException;
 
 /**
  * Freemarker based template engine.
@@ -118,7 +119,12 @@
 // try to load, and if it works, stop at the first one
 template = config.getTemplate(templateName);
 break;
+} catch (ParseException e) {
+// template was found but was invalid - always report this.
+exception = e;
+break;
 } catch (IOException e) {
+// FileNotFoundException is anticipated - report the first 
IOException if no template found
 if (exception == null) {
 exception = e;
 }
@@ -133,11 +139,6 @@
 LOG.error("Attempted: " + getFinalTemplateName(t));
 }
 LOG.error("The TemplateLoader provided by the FreeMarker 
Configuration was a: "+config.getTemplateLoader().getClass().getName());
-if (freemarkerCaching) {
-LOG.error("FreeMarker Template caching is enabled 
("+StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE+"=true) and this template 
is now cached as missing (the TemplateLoader won't be asked again)");
-} else {
-LOG.error("FreeMarker Template caching is disabled 
("+StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE+"=false)");
-}
 }
 if (exception != null) {
 throw exception;




svn commit: r651586 - in /struts/struts2/trunk/plugins/portlet/src: main/java/org/apache/struts2/components/ test/java/org/apache/struts2/components/ test/java/org/apache/struts2/views/jsp/

2008-04-25 Thread nilsga
Author: nilsga
Date: Fri Apr 25 05:12:24 2008
New Revision: 651586

URL: http://svn.apache.org/viewvc?rev=651586&view=rev
Log:
WW-1875 Use the namespace of the current action if namespace is not specified. 
Refactored some tests.

Added:

struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/

struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/PortletUrlRendererTest.java
Modified:

struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java

struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java

Modified: 
struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java?rev=651586&r1=651585&r2=651586&view=diff
==
--- 
struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
 (original)
+++ 
struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
 Fri Apr 25 05:12:24 2008
@@ -25,9 +25,14 @@
 import com.opensymphony.xwork2.util.TextUtils;
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.portlet.util.PortletUrlHelper;
+import org.apache.struts2.views.util.UrlHelper;
 
 import java.io.IOException;
 import java.io.Writer;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 /**
  * Implementation of the [EMAIL PROTECTED] UrlRenderer} interface that renders 
URLs for portlet environments.
@@ -48,6 +53,7 @@
}
 
 String result;
+urlComponent.namespace = 
urlComponent.determineNamespace(urlComponent.namespace, urlComponent.stack, 
urlComponent.req);
 if (onlyActionSpecified(urlComponent)) {
 result = PortletUrlHelper.buildUrl(urlComponent.action, 
urlComponent.namespace, urlComponent.method, urlComponent.parameters, 
urlComponent.portletUrlType, urlComponent.portletMode, 
urlComponent.windowState);
 } else if(onlyValueSpecified(urlComponent)){
@@ -97,6 +103,8 @@
 * [EMAIL PROTECTED]
 */
public void renderFormUrl(Form formComponent) {
+   String namespace = 
formComponent.determineNamespace(formComponent.namespace, 
formComponent.getStack(),
+   formComponent.request);
String action = null;
 if (formComponent.action != null) {
 action = formComponent.findString(formComponent.action);
@@ -105,7 +113,6 @@
ActionInvocation ai = (ActionInvocation) 
formComponent.getStack().getContext().get(ActionContext.ACTION_INVOCATION);
action = ai.getProxy().getActionName();
 }
-
 String type = "action";
 if (TextUtils.stringSet(formComponent.method)) {
 if ("GET".equalsIgnoreCase(formComponent.method.trim())) {
@@ -113,7 +120,7 @@
 }
 }
 if (action != null) {
-String result = PortletUrlHelper.buildUrl(action, 
formComponent.namespace, null,
+String result = PortletUrlHelper.buildUrl(action, namespace, null,
 formComponent.getParameters(), type, 
formComponent.portletMode, formComponent.windowState);
 formComponent.addParameter("action", result);
 

Added: 
struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/PortletUrlRendererTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/PortletUrlRendererTest.java?rev=651586&view=auto
==
--- 
struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/PortletUrlRendererTest.java
 (added)
+++ 
struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/PortletUrlRendererTest.java
 Fri Apr 25 05:12:24 2008
@@ -0,0 +1,144 @@
+/*
+ * $Id: $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
+ * specifi

svn commit: r651587 - in /struts/struts2/trunk/assembly/src/main/assembly: all.xml docs.xml

2008-04-25 Thread hermanns
Author: hermanns
Date: Fri Apr 25 05:15:09 2008
New Revision: 651587

URL: http://svn.apache.org/viewvc?rev=651587&view=rev
Log:
WW-2616 Adding missing plugins to assembly

Modified:
struts/struts2/trunk/assembly/src/main/assembly/all.xml
struts/struts2/trunk/assembly/src/main/assembly/docs.xml

Modified: struts/struts2/trunk/assembly/src/main/assembly/all.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/assembly/src/main/assembly/all.xml?rev=651587&r1=651586&r2=651587&view=diff
==
--- struts/struts2/trunk/assembly/src/main/assembly/all.xml (original)
+++ struts/struts2/trunk/assembly/src/main/assembly/all.xml Fri Apr 25 05:15:09 
2008
@@ -136,6 +136,10 @@
 
docs/struts2-plugins/struts2-dojo-plugin
   
   
+../plugins/dojo/target/site
+
docs/struts2-plugins/struts2-dwr-plugin
+  
+  
 ../plugins/jasperreports/target/site
 
docs/struts2-plugins/struts2-jasperreports-plugin
   
@@ -148,6 +152,10 @@
 
docs/struts2-plugins/struts2-jsf-plugin
   
   
+../plugins/jsf/target/site
+
docs/struts2-plugins/struts2-junit-plugin
+  
+  
 ../plugins/pell-multipart/target/site
 
docs/struts2-plugins/struts2-pell-multipart-plugin
   
@@ -178,6 +186,10 @@
   
 ../plugins/sitemesh/target/site
 
docs/struts2-plugins/struts2-sitemesh-plugin
+  
+  
+../plugins/tiles/target/site
+
docs/struts2-plugins/struts2-testng-plugin
   
   
 ../plugins/tiles/target/site

Modified: struts/struts2/trunk/assembly/src/main/assembly/docs.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/assembly/src/main/assembly/docs.xml?rev=651587&r1=651586&r2=651587&view=diff
==
--- struts/struts2/trunk/assembly/src/main/assembly/docs.xml (original)
+++ struts/struts2/trunk/assembly/src/main/assembly/docs.xml Fri Apr 25 
05:15:09 2008
@@ -68,6 +68,10 @@
 
docs/struts2-plugins/struts2-dojo-plugin
   
   
+../plugins/dojo/target/site
+
docs/struts2-plugins/struts2-dwr-plugin
+  
+  
 ../plugins/jasperreports/target/site
 
docs/struts2-plugins/struts2-jasperreports-plugin
   
@@ -80,6 +84,10 @@
 
docs/struts2-plugins/struts2-jsf-plugin
   
   
+../plugins/jsf/target/site
+
docs/struts2-plugins/struts2-junit-plugin
+  
+  
 ../plugins/pell-multipart/target/site
 
docs/struts2-plugins/struts2-pell-multipart-plugin
   
@@ -110,6 +118,10 @@
   
 ../plugins/sitemesh/target/site
 
docs/struts2-plugins/struts2-sitemesh-plugin
+  
+  
+../plugins/tiles/target/site
+
docs/struts2-plugins/struts2-testng-plugin
   
   
 ../plugins/tiles/target/site




svn commit: r651596 - /struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java

2008-04-25 Thread nilsga
Author: nilsga
Date: Fri Apr 25 05:49:45 2008
New Revision: 651596

URL: http://svn.apache.org/viewvc?rev=651596&view=rev
Log:
Removed some imports

Modified:

struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java

Modified: 
struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java?rev=651596&r1=651595&r2=651596&view=diff
==
--- 
struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
 (original)
+++ 
struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java
 Fri Apr 25 05:49:45 2008
@@ -20,19 +20,15 @@
  */
 package org.apache.struts2.components;
 
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.util.TextUtils;
+import java.io.IOException;
+import java.io.Writer;
+
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.portlet.util.PortletUrlHelper;
-import org.apache.struts2.views.util.UrlHelper;
 
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.util.TextUtils;
 
 /**
  * Implementation of the [EMAIL PROTECTED] UrlRenderer} interface that renders 
URLs for portlet environments.




svn commit: r651634 - /struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java

2008-04-25 Thread davenewton
Author: davenewton
Date: Fri Apr 25 09:04:45 2008
New Revision: 651634

URL: http://svn.apache.org/viewvc?rev=651634&view=rev
Log:
WW-2365 - https://issues.apache.org/struts/browse/WW-2365

- Added support for both report and export parameters.

- Minor refactoring:
  - Moved some init and output code out of execute.
  - Normalized PDF reports to be the same as the rest.
  - Resulted in cleaner code, lower cyclometric comp.

Still no tests for this result type.

Modified:

struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java

Modified: 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java?rev=651634&r1=651633&r2=651634&view=diff
==
--- 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
 (original)
+++ 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
 Fri Apr 25 09:04:45 2008
@@ -44,6 +44,7 @@
 import net.sf.jasperreports.engine.export.JRCsvExporterParameter;
 import net.sf.jasperreports.engine.export.JRHtmlExporter;
 import net.sf.jasperreports.engine.export.JRHtmlExporterParameter;
+import net.sf.jasperreports.engine.export.JRPdfExporter;
 import net.sf.jasperreports.engine.export.JRRtfExporter;
 import net.sf.jasperreports.engine.export.JRXlsExporter;
 import net.sf.jasperreports.engine.export.JRXmlExporter;
@@ -128,21 +129,39 @@
 
 private static final long serialVersionUID = -2523174799621182907L;
 
-
 private final static Logger LOG = 
LoggerFactory.getLogger(JasperReportsResult.class);
 
-
 protected String dataSource;
 protected String format;
 protected String documentName;
 protected String contentDisposition;
 protected String delimiter;
 protected String imageServletUrl = "/images/";
+
+/**
+ * Names a report parameters map stack value, allowing 
+ * additional report parameters from the action. 
+ */
+protected String reportParameters;
+
+/**
+ * Names an exporter parameters map stack value,
+ * allowing the use of custom export parameters.
+ */
+protected String exportParameters;
 
+/**
+ * Default ctor.
+ */
 public JasperReportsResult() {
 super();
 }
 
+/**
+ * Default ctor with location.
+ * 
+ * @param location Result location.
+ */
 public JasperReportsResult(String location) {
 super(location);
 }
@@ -175,161 +194,211 @@
 this.delimiter = delimiter;
 }
 
-protected void doExecute(String finalLocation, ActionInvocation 
invocation) throws Exception {
-if (this.format == null) {
-this.format = FORMAT_PDF;
-}
-
-if (dataSource == null) {
-String message = "No dataSource specified...";
-LOG.error(message);
-throw new RuntimeException(message);
-}
+   public String getReportParameters() {
+   return reportParameters;
+   }
+
+   public void setReportParameters(String reportParameters) {
+   this.reportParameters = reportParameters;
+   }
+   
+   public String getExportParameters() {
+   return exportParameters;
+   }
+
+   public void setExportParameters(String exportParameters) {
+   this.exportParameters = exportParameters;
+   }
+
+   protected void doExecute(String finalLocation, ActionInvocation 
invocation) throws Exception {
+   // Will throw a runtime exception if no "datasource" property. 
TODO Best place for that is...?
+initializeProperties(invocation);
 
 if (LOG.isDebugEnabled()) {
-LOG.debug("Creating JasperReport for dataSource = " + dataSource + 
", format = " + this.format);
+LOG.debug("Creating JasperReport for dataSource = " + dataSource + 
", format = " + format);
 }
 
 HttpServletRequest request = (HttpServletRequest) 
invocation.getInvocationContext().get(ServletActionContext.HTTP_REQUEST);
 HttpServletResponse response = (HttpServletResponse) 
invocation.getInvocationContext().get(ServletActionContext.HTTP_RESPONSE);
 
-//construct the data source for the report
+// Handle IE special case: it sends a "contype" request first.
+// TODO Set content type to config settings?
+if ("contype".equals(request.getHeader("User-Agent"))) {
+   try {
+   response.setContentType("application/pdf");
+   response.setContentLength(0);
+   
+   ServletOutputStrea

svn commit: r651635 - /struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java

2008-04-25 Thread davenewton
Author: davenewton
Date: Fri Apr 25 09:08:56 2008
New Revision: 651635

URL: http://svn.apache.org/viewvc?rev=651635&view=rev
Log:
Removed unused import.

Modified:

struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java

Modified: 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java?rev=651635&r1=651634&r2=651635&view=diff
==
--- 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
 (original)
+++ 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
 Fri Apr 25 09:08:56 2008
@@ -36,7 +36,6 @@
 import net.sf.jasperreports.engine.JRExporter;
 import net.sf.jasperreports.engine.JRExporterParameter;
 import net.sf.jasperreports.engine.JRParameter;
-import net.sf.jasperreports.engine.JasperExportManager;
 import net.sf.jasperreports.engine.JasperFillManager;
 import net.sf.jasperreports.engine.JasperPrint;
 import net.sf.jasperreports.engine.JasperReport;




svn commit: r651638 - /struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java

2008-04-25 Thread davenewton
Author: davenewton
Date: Fri Apr 25 09:18:06 2008
New Revision: 651638

URL: http://svn.apache.org/viewvc?rev=651638&view=rev
Log:
Added reportParameters and exportParameters to the "params" snippet.

Modified:

struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java

Modified: 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java?rev=651638&r1=651637&r2=651638&view=diff
==
--- 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
 (original)
+++ 
struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
 Fri Apr 25 09:18:06 2008
@@ -96,13 +96,27 @@
  *
  * imageServletUrl - name of the url that, when prefixed with the
  * context page, can return report images.
+ * 
+ * 
+ *   reportParameters - (2.1.2+) OGNL expression used to retrieve a map 
of
+ *   report parameters from the value stack. The parameters may be accessed
+ *   in the report via the usual JR mechanism and might include data not
+ *   part of the dataSource, such as the user name of the report creator, etc.
+ * 
+ * 
+ * 
+ *   exportParameters - (2.1.2+) OGNL expression used to retrieve a map 
of
+ *   JR exporter parameters from the value stack. The export parameters are
+ *   used to customize the JR export. For example, a PDF export might enable
+ *   encryption and set the user password to a string known to the report 
creator.
+ *  
  *
  * 
  *
  * 
- * This result follows the same rules from [EMAIL PROTECTED] 
StrutsResultSupport}.
- * Specifically, all parameters will be parsed if the "parse" parameter is not
- * set to false.
+ *   This result follows the same rules from [EMAIL PROTECTED] 
StrutsResultSupport}.
+ *   Specifically, all parameters will be parsed if the "parse" parameter 
+ *   is not set to false.
  * 
  * 
  *




svn commit: r651674 - in /struts/struts2/trunk: core/src/main/resources/template/css_xhtml/ core/src/main/resources/template/xhtml/ core/src/test/resources/ core/src/test/resources/org/apache/struts2/

2008-04-25 Thread apetrelli
Author: apetrelli
Date: Fri Apr 25 11:09:24 2008
New Revision: 651674

URL: http://svn.apache.org/viewvc?rev=651674&view=rev
Log:
WW-2147
Removed license headers in .properties files temporarily to avoid conflicts 
with the Maven License plugin.

Modified:

struts/struts2/trunk/core/src/main/resources/template/css_xhtml/theme.properties
struts/struts2/trunk/core/src/main/resources/template/xhtml/theme.properties
struts/struts2/trunk/core/src/test/resources/log4j.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/TestAction.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/components/template/dummy.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/components/template/theme1/themeThroughClassPath.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/components/template/theme1/themeThroughFileSystem.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/components/tempo.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/interceptor/FileUploadInterceptor.properties

struts/struts2/trunk/core/src/test/resources/org/apache/struts2/othertest.properties
struts/struts2/trunk/core/src/test/resources/struts.properties
struts/struts2/trunk/core/src/test/resources/test.properties
struts/struts2/trunk/core/src/test/resources/testmessages.properties
struts/struts2/trunk/core/src/test/resources/testmessages2.properties

struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/theme.properties
struts/struts2/trunk/plugins/dojo/src/test/resources/struts.properties

Modified: 
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/theme.properties
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/css_xhtml/theme.properties?rev=651674&r1=651673&r2=651674&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/theme.properties
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/theme.properties
 Fri Apr 25 11:09:24 2008
@@ -1,20 +1 @@
-#  $Id$
-# 
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you 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.
-
 parent = xhtml

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/theme.properties
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/theme.properties?rev=651674&r1=651673&r2=651674&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/template/xhtml/theme.properties 
(original)
+++ 
struts/struts2/trunk/core/src/main/resources/template/xhtml/theme.properties 
Fri Apr 25 11:09:24 2008
@@ -1,20 +1 @@
-#  $Id$
-# 
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you 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.
-
 parent = simple

Modified: struts/struts2/trunk/core/src/test/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/log4j.properties?rev=651674&r1=651673&r2=651674&view=diff
==
--- struts/struts2/trunk/core/src/test/resources/log4j.properties (original)
+++ struts/struts2/trunk/core/src/test/resources/log4j.properties Fri Apr 25 
11:09:24 2008
@@ -1,22 +1,3 @@
-#  $Id$
-# 
-#  Licensed to the Apache Softwa

svn commit: r651682 - /struts/struts2/trunk/core/src/main/resources/org/apache/struts2/

2008-04-25 Thread apetrelli
Author: apetrelli
Date: Fri Apr 25 11:51:00 2008
New Revision: 651682

URL: http://svn.apache.org/viewvc?rev=651682&view=rev
Log:
WW-2147
Removed license headers in .properties files temporarily to avoid conflicts 
with the Maven License plugin.

Modified:

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

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

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

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

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

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

Modified: 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties?rev=651682&r1=651681&r2=651682&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties
 Fri Apr 25 11:51:00 2008
@@ -1,22 +1,3 @@
-#  $Id$
-# 
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you 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.
-
 ### START SNIPPET: complete_file
 
 ### Struts default properties

Modified: 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages.properties
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages.properties?rev=651682&r1=651681&r2=651682&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages.properties
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages.properties
 Fri Apr 25 11:51:00 2008
@@ -1,22 +1,3 @@
-#  $Id$
-# 
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you 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.
-
 struts.messages.invalid.token=The form has already been processed or no token 
was supplied, please try again.
 struts.internal.invalid.token=Form token {0} does not match the session token 
{1}.
 

Modified: 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_da.properties
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_da.properties?rev=651682&r1=651681&r2=651682&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_da.properties
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_da.properties
 Fri Apr 25 11:51:00 2008
@@ -1,22 +1,3 @@
-#  $Id$
-# 
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you 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.apac