[struts] 02/02: Solve some dependency convergence issues reported by maven enforce plugin
This is an automated email from the ASF dual-hosted git repository. jogep pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 75d252554b7fd08e14bb7d4416dc403df8b7de1e Author: Johannes Geppert AuthorDate: Sat Feb 9 15:04:22 2019 +0100 Solve some dependency convergence issues reported by maven enforce plugin https://issues.apache.org/jira/browse/WW-5018 --- apps/rest-showcase/pom.xml| 16 +++- apps/showcase/pom.xml | 9 + plugins/jasperreports/pom.xml | 12 plugins/osgi/pom.xml | 17 + 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index 810cd31..2bf65a1 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -73,26 +73,32 @@ net.sourceforge.jwebunit jwebunit-core -1.4.1 +3.3 test + -commons-httpclient -commons-httpclient -3.1 +net.sourceforge.htmlunit +htmlunit +2.27 test net.sourceforge.jwebunit jwebunit-htmlunit-plugin -1.4.1 +3.3 test xom xom + + +net.sourceforge.htmlunit +htmlunit + diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 9e9cce2..a3c8341 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -141,13 +141,6 @@ commons-fileupload - -commons-httpclient -commons-httpclient -3.1 -test - - junit junit @@ -157,7 +150,7 @@ net.sourceforge.htmlunit htmlunit -2.24 +2.27 test diff --git a/plugins/jasperreports/pom.xml b/plugins/jasperreports/pom.xml index 72804ed..8a9762d 100644 --- a/plugins/jasperreports/pom.xml +++ b/plugins/jasperreports/pom.xml @@ -39,13 +39,17 @@ net.sf.jasperreports jasperreports -6.0.3 +6.7.0 provided - + -org.olap4j -olap4j +com.fasterxml.jackson.core +jackson-databind + + +com.fasterxml.jackson.core +jackson-annotation diff --git a/plugins/osgi/pom.xml b/plugins/osgi/pom.xml index cbe48f0..9162538 100644 --- a/plugins/osgi/pom.xml +++ b/plugins/osgi/pom.xml @@ -33,16 +33,33 @@ +org.osgi +org.osgi.core +4.3.1 + + org.apache.felix org.apache.felix.main org.apache.felix org.apache.felix.shell + + +org.osgi +org.osgi.core + + org.apache.felix org.apache.felix.shell.tui + + +org.osgi +org.osgi.core + +
[struts] 01/02: Add maven enforce plugin with rule to avoid dependency convergence issues
This is an automated email from the ASF dual-hosted git repository. jogep pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 67d40ce12adc334b070f086be970f3c176fdfb32 Author: Johannes Geppert AuthorDate: Sat Feb 9 15:03:46 2019 +0100 Add maven enforce plugin with rule to avoid dependency convergence issues https://issues.apache.org/jira/browse/WW-5018 --- pom.xml | 18 ++ 1 file changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index 28f2ce6..b010cc8 100644 --- a/pom.xml +++ b/pom.xml @@ -389,6 +389,24 @@ true + +org.apache.maven.plugins +maven-enforcer-plugin +3.0.0-M2 + + +enforce + + + + + + +enforce + + + +
[struts] branch master updated (c58e492 -> 75d2525)
This is an automated email from the ASF dual-hosted git repository. jogep pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from c58e492 Merge pull request #330 from aleksandr-m/feature/java8_date new 67d40ce Add maven enforce plugin with rule to avoid dependency convergence issues new 75d2525 Solve some dependency convergence issues reported by maven enforce plugin The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: apps/rest-showcase/pom.xml| 16 +++- apps/showcase/pom.xml | 9 + plugins/jasperreports/pom.xml | 12 plugins/osgi/pom.xml | 17 + pom.xml | 18 ++ 5 files changed, 55 insertions(+), 17 deletions(-)
[struts] branch master updated: Use latest available hibernate-validator version for bean validation test scope
This is an automated email from the ASF dual-hosted git repository. jogep pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 95866c3 Use latest available hibernate-validator version for bean validation test scope 95866c3 is described below commit 95866c347e2b746350d7d28f2391790f8e0d8fda Author: Johannes Geppert AuthorDate: Sat Feb 9 15:08:06 2019 +0100 Use latest available hibernate-validator version for bean validation test scope --- plugins/bean-validation/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bean-validation/pom.xml b/plugins/bean-validation/pom.xml index f304f79..04595cc 100644 --- a/plugins/bean-validation/pom.xml +++ b/plugins/bean-validation/pom.xml @@ -52,7 +52,7 @@ org.hibernate hibernate-validator -5.1.3.Final +5.4.1.Final test
[struts] branch master updated: Fix compile issue of post order test example with latest http client version
This is an automated email from the ASF dual-hosted git repository. jogep pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new bbe46e9 Fix compile issue of post order test example with latest http client version bbe46e9 is described below commit bbe46e92f09686bd541384facbcee422bc77c656 Author: Johannes Geppert AuthorDate: Sat Feb 9 15:32:02 2019 +0100 Fix compile issue of post order test example with latest http client version --- .../apache/struts2/rest/example/PostOrderTest.java | 101 + 1 file changed, 42 insertions(+), 59 deletions(-) diff --git a/apps/rest-showcase/src/test/java/it/org/apache/struts2/rest/example/PostOrderTest.java b/apps/rest-showcase/src/test/java/it/org/apache/struts2/rest/example/PostOrderTest.java index 80f48ae..333aa28 100644 --- a/apps/rest-showcase/src/test/java/it/org/apache/struts2/rest/example/PostOrderTest.java +++ b/apps/rest-showcase/src/test/java/it/org/apache/struts2/rest/example/PostOrderTest.java @@ -18,15 +18,16 @@ */ package it.org.apache.struts2.rest.example; +import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import net.sourceforge.jwebunit.junit.WebTestCase; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.methods.PostMethod; -import org.apache.commons.httpclient.methods.StringRequestEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; import java.io.IOException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; - public class PostOrderTest extends WebTestCase { public void setUp() throws Exception { @@ -72,68 +73,50 @@ public class PostOrderTest extends WebTestCase { } public void testPostOrderInXml() throws IOException { -HttpClient client = new HttpClient(); -PostMethod method = null; -try { -method = new PostMethod(ParameterUtils.getBaseUrl()+"/orders.xml"); -method.setRequestEntity(new StringRequestEntity("\n" + -"Test3\n" + -"3342\n" + -"")); -client.executeMethod(method); -assertEquals(201, method.getStatusCode()); - assertTrue(method.getResponseHeader("Location").getValue().startsWith(ParameterUtils.getBaseUrl()+"/orders/")); -} finally { -method.releaseConnection(); -} +CloseableHttpClient client = HttpClients.createDefault(); +HttpPost httpPost = new HttpPost(ParameterUtils.getBaseUrl() + "/orders.xml"); +httpPost.setEntity(new StringEntity("\n" + +"Test3\n" + +"3342\n" + +"")); +CloseableHttpResponse response = client.execute(httpPost); +assertEquals(201, response.getStatusLine().getStatusCode()); + assertTrue(response.getHeaders("Location")[0].getValue().startsWith(ParameterUtils.getBaseUrl() + "/orders/")); +client.close(); } public void testPostOrderInXmlWithBadData() throws IOException { -HttpClient client = new HttpClient(); -PostMethod method = null; -try { -method = new PostMethod(ParameterUtils.getBaseUrl()+"/orders.xml"); -method.setRequestEntity(new StringRequestEntity("\n" + -"3342\n" + -"")); -client.executeMethod(method); -assertEquals(400, method.getStatusCode()); -String response = method.getResponseBodyAsString(); -assertTrue(response.contains("The client name is empty")); -assertNull(method.getResponseHeader("Location")); -} finally { -method.releaseConnection(); -} +CloseableHttpClient client = HttpClients.createDefault(); +HttpPost httpPost = new HttpPost(ParameterUtils.getBaseUrl() + "/orders.xml"); +httpPost.setEntity(new StringEntity("\n" + +"3342\n" + +"")); +CloseableHttpResponse response = client.execute(httpPost); +assertEquals(400, response.getStatusLine().getStatusCode()); +assertTrue(response.toString().contains("The client name is empty")); +assertNull(response.getHeaders("Location")); +client.close(); } public void testPostOrderInJson() throws IOException { -HttpClient client = new HttpClient(); -PostM
[struts] branch master updated: Fix compile issue of jasper plugin with latest jasper version
This is an automated email from the ASF dual-hosted git repository. jogep pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 9088405 Fix compile issue of jasper plugin with latest jasper version 9088405 is described below commit 9088405b0f001ed788a781d55bbb9f11ec832352 Author: Johannes Geppert AuthorDate: Sat Feb 9 15:35:12 2019 +0100 Fix compile issue of jasper plugin with latest jasper version --- .../org/apache/struts2/views/jasperreports/JasperReportsResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java index c79e1b6..4eeb52d 100644 --- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java +++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java @@ -352,7 +352,7 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe Map imagesMap = new HashMap(); request.getSession(true).setAttribute("IMAGES_MAP", imagesMap); -exporter = new JRHtmlExporter(); +exporter = new HtmlExporter(); exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath() + imageServletUrl);
[struts] branch master updated: Minor code optimization in jasper reports result
This is an automated email from the ASF dual-hosted git repository. jogep pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/master by this push: new 2908d74 Minor code optimization in jasper reports result 2908d74 is described below commit 2908d746ce2ac2a6a5298ef0ecef7bff359fabb2 Author: Johannes Geppert AuthorDate: Sun Feb 10 16:15:38 2019 +0100 Minor code optimization in jasper reports result --- .../views/jasperreports/JasperReportsResult.java | 129 - .../views/jasperreports/ValueStackShadowMap.java | 23 ++-- 2 files changed, 81 insertions(+), 71 deletions(-) diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java index 4eeb52d..3fbdf98 100644 --- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java +++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java @@ -20,11 +20,22 @@ package org.apache.struts2.views.jasperreports; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.util.ValueStack; - -import net.sf.jasperreports.engine.*; -import net.sf.jasperreports.engine.export.*; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRExporter; +import net.sf.jasperreports.engine.JRExporterParameter; +import net.sf.jasperreports.engine.JRParameter; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.export.HtmlExporter; +import net.sf.jasperreports.engine.export.JRCsvExporter; +import net.sf.jasperreports.engine.export.JRCsvExporterParameter; +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; import net.sf.jasperreports.engine.util.JRLoader; - import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -35,7 +46,6 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; @@ -112,7 +122,7 @@ import java.util.TimeZone; * </result> * * - * + * * or for pdf * * @@ -128,7 +138,7 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe private static final long serialVersionUID = -2523174799621182907L; -private final static Logger LOG = LogManager.getLogger(JasperReportsResult.class); +private static final Logger LOG = LogManager.getLogger(JasperReportsResult.class); protected String dataSource; protected String format; @@ -202,9 +212,7 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe } /** - * set time zone id - * - * @param timeZone + * @param timeZone set time zone id */ public void setTimeZone(final String timeZone) { this.timeZone = timeZone; @@ -244,8 +252,10 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe LOG.debug("Creating JasperReport for dataSource = {}, format = {}", dataSource, format); -HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(ServletActionContext.HTTP_REQUEST); -HttpServletResponse response = (HttpServletResponse) invocation.getInvocationContext().get(ServletActionContext.HTTP_RESPONSE); +HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext() +.get(ServletActionContext.HTTP_REQUEST); +HttpServletResponse response = (HttpServletResponse) invocation.getInvocationContext() +.get(ServletActionContext.HTTP_RESPONSE); // Handle IE special case: it sends a "contype" request first. // TODO Set content type to config settings? @@ -265,8 +275,9 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe ValueStackDataSource stackDataSource = null; Connection conn = (Connection) stack.findValue(connection); -if (conn == null) +if (conn == null) { stackDataSource = new ValueStackDataSource(stack, dataSource, wrapField); +} if ("https".equalsIgnoreCase(request.getScheme())) { // set the t
svn commit: r1076120 - /struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
Author: jogep Date: Wed Mar 2 06:49:31 2011 New Revision: 1076120 URL: http://svn.apache.org/viewvc?rev=1076120&view=rev Log: Solves WW-3577 - uses field initialization to improve performance Modified: struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java Modified: struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java?rev=1076120&r1=1076119&r2=1076120&view=diff == --- struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java (original) +++ struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java Wed Mar 2 06:49:31 2011 @@ -95,6 +95,8 @@ public class PortletVelocityResult exten private String defaultEncoding; private VelocityManager velocityManager; +private JspFactory jspFactory = JspFactory.getDefaultFactory(); + public PortletVelocityResult() { super(); } @@ -159,7 +161,6 @@ public class PortletVelocityResult exten HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); -JspFactory jspFactory = null; ServletContext servletContext = ServletActionContext .getServletContext(); Servlet servlet = JspSupportServlet.jspSupportServlet; @@ -171,7 +172,6 @@ public class PortletVelocityResult exten ServletActionContext.PAGE_CONTEXT); if (pageContext == null && servlet != null) { -jspFactory = JspFactory.getDefaultFactory(); pageContext = jspFactory.getPageContext(servlet, request, response, null, true, 8192, true); ActionContext.getContext().put(ServletActionContext.PAGE_CONTEXT,
svn commit: r1078966 - /struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js
Author: jogep Date: Mon Mar 7 21:44:34 2011 New Revision: 1078966 URL: http://svn.apache.org/viewvc?rev=1078966&view=rev Log: WW-3395: Client Validation don't display Global Messages Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js?rev=1078966&r1=1078965&r2=1078966&view=diff == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js (original) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js Mon Mar 7 21:44:34 2011 @@ -32,24 +32,50 @@ StrutsUtils.getValidationErrors = functi }; StrutsUtils.clearValidationErrors = function(form) { - var firstNode = StrutsUtils.firstElement(form); - var xhtml = firstNode.tagName.toLowerCase() == "table"; - - if(xhtml) { -clearErrorMessagesXHTML(form); -clearErrorLabelsXHTML(form); - } else { -clearErrorMessagesCSS(form); -clearErrorLabelsCSS(form); - } -}; +var firstNode = StrutsUtils.firstElement(form); +var xhtml = firstNode.tagName.toLowerCase() == "table"; + +if(xhtml) { +clearErrorMessagesXHTML(form); +clearErrorLabelsXHTML(form); +} else { +clearErrorMessagesCSS(form); +clearErrorLabelsCSS(form); +} + +//clear previous global error messages + if(StrutsUtils.errorLists[form] && StrutsUtils.errorLists[form] !== null) { + form.parentNode.removeChild(StrutsUtils.errorLists[form]); + StrutsUtils.errorLists[form] = null; + } + +}; + +StrutsUtils.errorLists = []; // shows validation errors using functions from xhtml/validation.js // or css_xhtml/validation.js StrutsUtils.showValidationErrors = function(form, errors) { - StrutsUtils.clearValidationErrors(form, errors); +StrutsUtils.clearValidationErrors(form, errors); + + if (errors.errors) { + var errorList = document.createElement("ul"); + errorList.setAttribute("class", "errorMessage"); + errorList.setAttribute("className", "errorMessage"); // ie hack cause ie does not support setAttribute + + for ( var l = 0; l < errors.errors.length; l++) { + var item = document.createElement("li"); + var itemText = document.createTextNode(errors.errors[l]); + item.appendChild(itemText); + + errorList.appendChild(item); + } + + form.parentNode.insertBefore(errorList, form); + StrutsUtils.errorLists[form] = errorList; + } - var firstNode = StrutsUtils.firstElement(form); + var firstNode = StrutsUtils.firstElement(form); var xhtml = firstNode.tagName.toLowerCase() == "table"; if(errors.fieldErrors) { for(var fieldName in errors.fieldErrors) {
svn commit: r1079950 - in /struts/struts2/trunk/core/src/main/resources: org/apache/struts2/static/utils.js template/css_xhtml/validation.js template/xhtml/validation.js
Author: jogep Date: Wed Mar 9 19:19:33 2011 New Revision: 1079950 URL: http://svn.apache.org/viewvc?rev=1079950&view=rev Log: WW-3437: JavaScript should following the JSLint recommendations Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js struts/struts2/trunk/core/src/main/resources/template/css_xhtml/validation.js struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js?rev=1079950&r1=1079949&r2=1079950&view=diff == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js (original) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js Wed Mar 9 19:19:33 2011 @@ -24,7 +24,7 @@ var StrutsUtils = {}; // gets an object with validation errors from string returned by // the ajaxValidation interceptor StrutsUtils.getValidationErrors = function(data) { - if(data.indexOf("/* {") == 0) { + if(data.indexOf("/* {") === 0) { return eval("( " + data.substring(2, data.length - 2) + " )"); } else { return null; @@ -33,7 +33,7 @@ StrutsUtils.getValidationErrors = functi StrutsUtils.clearValidationErrors = function(form) { var firstNode = StrutsUtils.firstElement(form); -var xhtml = firstNode.tagName.toLowerCase() == "table"; +var xhtml = firstNode.tagName.toLowerCase() === "table"; if(xhtml) { clearErrorMessagesXHTML(form); @@ -59,11 +59,12 @@ StrutsUtils.showValidationErrors = funct StrutsUtils.clearValidationErrors(form, errors); if (errors.errors) { - var errorList = document.createElement("ul"); + var l, errorList = document.createElement("ul"); + errorList.setAttribute("class", "errorMessage"); errorList.setAttribute("className", "errorMessage"); // ie hack cause ie does not support setAttribute - for ( var l = 0; l < errors.errors.length; l++) { + for ( l = 0; l < errors.errors.length; l++) { var item = document.createElement("li"); var itemText = document.createTextNode(errors.errors[l]); item.appendChild(itemText); @@ -75,16 +76,18 @@ StrutsUtils.showValidationErrors = funct StrutsUtils.errorLists[form] = errorList; } - var firstNode = StrutsUtils.firstElement(form); - var xhtml = firstNode.tagName.toLowerCase() == "table"; + var i, fieldName, firstNode = StrutsUtils.firstElement(form); + var xhtml = firstNode.tagName.toLowerCase() === "table"; if(errors.fieldErrors) { -for(var fieldName in errors.fieldErrors) { - for(var i = 0; i < errors.fieldErrors[fieldName].length; i++) { -if(xhtml) { - addErrorXHTML(form.elements[fieldName], errors.fieldErrors[fieldName][i]); -} else { - addErrorCSS(form.elements[fieldName], errors.fieldErrors[fieldName][i]); -} +for(fieldName in errors.fieldErrors) { + if(errors.fieldErrors.hasOwnProperty(fieldName)) { +for(i = 0; i < errors.fieldErrors[fieldName].length; i++) { + if(xhtml) { +addErrorXHTML(form.elements[fieldName], errors.fieldErrors[fieldName][i]); + } else { +addErrorCSS(form.elements[fieldName], errors.fieldErrors[fieldName][i]); + } +} } } } @@ -92,10 +95,10 @@ StrutsUtils.showValidationErrors = funct StrutsUtils.firstElement = function(parentNode, tagName) { var node = parentNode.firstChild; - while(node && node.nodeType != 1){ + while(node && node.nodeType !== 1){ node = node.nextSibling; } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { + if(tagName && node && node.tagName && node.tagName.toLowerCase() !== tagName.toLowerCase()) { node = StrutsUtils.nextElement(node, tagName); } return node; @@ -105,9 +108,9 @@ StrutsUtils.nextElement = function(node, if(!node) { return null; } do { node = node.nextSibling; - } while(node && node.nodeType != 1); + } while(node && node.nodeType !== 1); - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { + if(node && tagName && tagName.toLowerCase() !== node.tagName.toLowerCase()) { return StrutsUtils.nextElement(node, tagName); } return node; @@ -118,9 +121,9 @@ StrutsUtils.previous
svn commit: r1086567 - in /struts/sandbox/trunk/struts2-portlet2-plugin: ./ src/main/java/org/apache/struts2/components/ src/main/java/org/apache/struts2/portlet/dispatcher/ src/main/java/org/apache/s
Author: jogep Date: Tue Mar 29 12:36:34 2011 New Revision: 1086567 URL: http://svn.apache.org/viewvc?rev=1086567&view=rev Log: Make Portlet2 Plugin compatible to current Struts2 trunk Modified: struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/components/PortletUrlRenderer.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/dispatcher/DispatcherServlet.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/result/PortletResult.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/resources/struts-plugin.xml Modified: struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml?rev=1086567&r1=1086566&r2=1086567&view=diff == --- struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml (original) +++ struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml Tue Mar 29 12:36:34 2011 @@ -1,181 +1,195 @@ - + http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> -4.0.0 - -org.apache.struts -struts2-plugins -2.2.0-SNAPSHOT - -org.apache.struts -struts2-portlet2-plugin -jar -Struts 2 Portlet 2.0 Plugin - - - scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-portlet2-plugin/ - scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-portlet2-plugin/ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> + 4.0.0 + + org.apache.struts + struts2-plugins + 2.3-SNAPSHOT + + org.apache.struts + struts2-portlet2-plugin + jar + Struts 2 Portlet 2.0 Plugin + + + scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-portlet2-plugin/ + scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-portlet2-plugin/ - http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-portlet2-plugin/ - + http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-portlet2-plugin/ + - - -junit -junit -test -3.8.1 - - - -javax.servlet -jsp-api -2.0 -provided - - - - -org.apache.velocity -velocity -1.5 -true - - - -org.apache.velocity -velocity-tools -1.3 -true - - - - -javax.portlet -portlet-api -2.0 -true - - - -mockobjects -mockobjects-jdk1.3-j2ee1.3 -0.09 -test - - - -org.easymock -easymock -2.0 -test - - -jmock -jmock -1.0.1 -test - - - -jmock -jmock-cglib -1.0.1 -test - - - -mockobjects -mockobjects-core -0.09 -test - - - -log4j -log4j -1.2.9 -test - - - - -org.springframework -spring-mock -2.0.7 -test - - -org.springframework -spring-portlet -2.0.7 -test - - -org.springframework -spring-core -2.0.7 -test - - -commons-fileupload -commons-fileupload -1.1.1 -test - - -${pom.groupId} -struts2-junit-plugin -${pom.version} -test - - - - - -apache.snapshots -Apache Maven Repository (Snapshots and Test Builds) -http://people.apache.org/repo/m2-snapshot-repository - -
svn commit: r1089792 - /struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java
Author: jogep Date: Thu Apr 7 09:44:15 2011 New Revision: 1089792 URL: http://svn.apache.org/viewvc?rev=1089792&view=rev Log: Add missing else statement. Otherwise the IllegalStateException is also thrown when PortletResponse is instanceof ResourceRespons. Modified: struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java Modified: struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java?rev=1089792&r1=1089791&r2=1089792&view=diff == --- struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java (original) +++ struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/portlet/servlet/PortletServletResponseJSR286.java Thu Apr 7 09:44:15 2011 @@ -1,12 +1,16 @@ package org.apache.struts2.portlet.servlet; -import javax.servlet.ServletOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.Locale; -import javax.portlet.ResourceResponse; + import javax.portlet.MimeResponse; import javax.portlet.PortletResponse; +import javax.portlet.ResourceResponse; +import javax.servlet.ServletOutputStream; + +import com.opensymphony.xwork2.util.logging.Logger; +import com.opensymphony.xwork2.util.logging.LoggerFactory; /** * PortletServletResponseJSR286. @@ -15,6 +19,8 @@ import javax.portlet.PortletResponse; */ public class PortletServletResponseJSR286 extends PortletServletResponse { + private static final Logger LOG = LoggerFactory.getLogger(PortletServletResponseJSR286.class); + public PortletServletResponseJSR286( PortletResponse portletResponse ) { super(portletResponse); } @@ -123,14 +129,18 @@ public class PortletServletResponseJSR28 if(portletResponse instanceof ResourceResponse) { ((ResourceResponse)portletResponse).setCharacterEncoding(charset); } -throw new IllegalStateException("Only allowed in resource phase"); +else { + throw new IllegalStateException("Only allowed in resource phase"); +} } public void setContentLength(int len) { if(portletResponse instanceof ResourceResponse) { ((ResourceResponse)portletResponse).setContentLength(len); } -throw new IllegalStateException("Only allowed in resource phase"); +else { + throw new IllegalStateException("Only allowed in resource phase"); +} } public void setContentType(String type) { @@ -146,7 +156,9 @@ public class PortletServletResponseJSR28 if(portletResponse instanceof ResourceResponse) { ((ResourceResponse)portletResponse).setLocale(loc); } -throw new IllegalStateException("Only allowed in resource phase"); +else { + throw new IllegalStateException("Only allowed in resource phase"); +} } }
svn commit: r1096834 - /struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
Author: jogep Date: Tue Apr 26 18:18:08 2011 New Revision: 1096834 URL: http://svn.apache.org/viewvc?rev=1096834&view=rev Log: WW-3349: Extension .jspf not recognized as JSP result-type Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java?rev=1096834&r1=1096833&r2=1096834&view=diff == --- struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java (original) +++ struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java Tue Apr 26 18:18:08 2011 @@ -110,6 +110,7 @@ public class ConventionsServiceImpl impl Map resultsByExtension = new HashMap(); resultsByExtension.put("jsp", results.get("dispatcher")); +resultsByExtension.put("jspf", results.get("dispatcher")); resultsByExtension.put("jspx", results.get("dispatcher")); resultsByExtension.put("vm", results.get("velocity")); resultsByExtension.put("ftl", results.get("freemarker")); @@ -117,4 +118,4 @@ public class ConventionsServiceImpl impl resultsByExtension.put("htm", results.get("dispatcher")); return resultsByExtension; } -} \ No newline at end of file +}
svn commit: r1096838 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher: ServletActionRedirectResult.java ServletRedirectResult.java
Author: jogep Date: Tue Apr 26 18:28:38 2011 New Revision: 1096838 URL: http://svn.apache.org/viewvc?rev=1096838&view=rev Log: WW-3450: supressEmptyParameters option is misspelled Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java?rev=1096838&r1=1096837&r2=1096838&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java Tue Apr 26 18:28:38 2011 @@ -21,51 +21,60 @@ package org.apache.struts2.dispatcher; +import java.util.Arrays; +import java.util.List; + +import org.apache.struts2.dispatcher.mapper.ActionMapper; +import org.apache.struts2.dispatcher.mapper.ActionMapping; + import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.util.logging.Logger; import com.opensymphony.xwork2.util.logging.LoggerFactory; import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler; -import org.apache.struts2.dispatcher.mapper.ActionMapper; -import org.apache.struts2.dispatcher.mapper.ActionMapping; - -import java.util.Arrays; -import java.util.List; /** * - * - * This result uses the {@link ActionMapper} provided by the {@link ActionMapperFactory} to redirect the browser to a - * URL that invokes the specified action and (optional) namespace. This is better than the {@link ServletRedirectResult} - * because it does not require you to encode the URL patterns processed by the {@link ActionMapper} in to your struts.xml - * configuration files. This means you can change your URL patterns at any point and your application will still work. - * It is strongly recommended that if you are redirecting to another action, you use this result rather than the + * + * This result uses the {@link ActionMapper} provided by the + * {@link ActionMapperFactory} to redirect the browser to a URL that invokes the + * specified action and (optional) namespace. This is better than the + * {@link ServletRedirectResult} because it does not require you to encode the + * URL patterns processed by the {@link ActionMapper} in to your struts.xml + * configuration files. This means you can change your URL patterns at any point + * and your application will still work. It is strongly recommended that if you + * are redirecting to another action, you use this result rather than the * standard redirect result. - * - * See examples below for an example of how request parameters could be passed in. - * + * + * See examples below for an example of how request parameters could be passed + * in. + * * - * + * * This result type takes the following parameters: - * + * * - * + * * - * - * actionName (default) - the name of the action that will be redirect to - * - * namespace - used to determine which namespace the action is in that we're redirecting to . If namespace is - * null, this defaults to the current namespace - * - * supressEmptyParameters - optional boolean (defaults to false) that can prevent parameters with no values - * from being included in the redirect URL. - * + * + * actionName (default) - the name of the action that will be + * redirect to + * + * namespace - used to determine which namespace the action is in + * that we're redirecting to . If namespace is null, this defaults to the + * current namespace + * + * suppressEmptyParameters - optional boolean (defaults to false) that + * can prevent parameters with no values from being included in the redirect + * URL. + * * - * + * * - * + * * Example: - * - * + * + * + * * <package name="public" extends="struts-default"> * <action name="login" class="..."> * <!-- Redirect to another namespace --> @@ -75,19 +84,19 @@ import java.util.List; * </result> * </action> * </package> - * + * * <package name="secure" extends="struts-default" namespace="/secure"> * <-- Redirect to an action in the same namespace --> * <action name="dashboard" class="..."> * <result>dashboard.jsp</result> * <result name="error" type="redirectAction">error</result> * </action> - * + * * <action name="error" class="...">
svn commit: r1096885 - in /struts/struts2/trunk/apps/showcase: ./ src/main/java/org/apache/struts2/showcase/person/ src/main/resources/ src/main/webapp/WEB-INF/ src/main/webapp/person/
Author: jogep Date: Tue Apr 26 20:18:52 2011 New Revision: 1096885 URL: http://svn.apache.org/viewvc?rev=1096885&view=rev Log: WW-3241: ShowCase demo application still uses the CodeBehind plugin. Added: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/package-info.java struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp (contents, props changed) - copied, changed from r1096838, struts/struts2/trunk/apps/showcase/src/main/webapp/person/editPerson.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl (contents, props changed) - copied, changed from r1096838, struts/struts2/trunk/apps/showcase/src/main/webapp/person/listPeople.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl (contents, props changed) - copied, changed from r1096838, struts/struts2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl Removed: struts/struts2/trunk/apps/showcase/src/main/webapp/person/editPerson.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/listPeople.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl Modified: struts/struts2/trunk/apps/showcase/pom.xml struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/NewPersonAction.java struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml struts/struts2/trunk/apps/showcase/src/main/webapp/WEB-INF/web.xml struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp Modified: struts/struts2/trunk/apps/showcase/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/pom.xml?rev=1096885&r1=1096884&r2=1096885&view=diff == --- struts/struts2/trunk/apps/showcase/pom.xml (original) +++ struts/struts2/trunk/apps/showcase/pom.xml Tue Apr 26 20:18:52 2011 @@ -103,7 +103,7 @@ org.apache.struts -struts2-codebehind-plugin +struts2-convention-plugin ${project.version} Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java?rev=1096885&r1=1096884&r2=1096885&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/EditPersonAction.java Tue Apr 26 20:18:52 2011 @@ -24,17 +24,20 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.apache.struts2.config.Result; -import org.apache.struts2.config.Results; -import org.apache.struts2.dispatcher.ServletRedirectResult; +import org.apache.struts2.convention.annotation.ParentPackage; +import org.apache.struts2.convention.annotation.Result; import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.convention.annotation.Results; /** * EditPerson * */ -@Result(name="list", value="listPeople.action", type=ServletRedirectResult.class) +@Results({ +@Result(name="list", location="list-people.action", type="redirect"), +@Result(name="input", location="new-person.ftl", type="freemarker") +}) public class EditPersonAction extends ActionSupport { private static final long serialVersionUID = 7699491775215130850L; Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java?rev=1096885&r1=1096884&r2=1096885&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/person/ListPeopleAction.java Tue Apr 26 20:18:52 2011 @@ -23,11 +23,11 @@ package org.apache.struts2.showcase.pers import java.util.ArrayList; import java.util.List; -import org.apache.struts2.config.Result; -import org.apache.struts2.views.freemarker.FreemarkerResult; - import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.convention.annotation.ParentP
svn commit: r1097172 - in /struts/struts2/trunk/plugins/rest/src: main/java/org/apache/struts2/rest/handler/JsonLibHandler.java test/java/org/apache/struts2/rest/handler/JsonLibHandlerTest.java
Author: jogep Date: Wed Apr 27 16:36:54 2011 New Revision: 1097172 URL: http://svn.apache.org/viewvc?rev=1097172&view=rev Log: WW-3614: Incorrect Content-Type in REST Plugin JSON Content Handler WW-3536: Specify UTF-8 content type in JsonLibHandler Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/handler/JsonLibHandlerTest.java Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java?rev=1097172&r1=1097171&r2=1097172&view=diff == --- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java (original) +++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java Wed Apr 27 16:36:54 2011 @@ -21,20 +21,27 @@ package org.apache.struts2.rest.handler; -import net.sf.json.JSONArray; -import net.sf.json.JSONObject; -import net.sf.json.JsonConfig; - import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.Collection; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; +import net.sf.json.JsonConfig; + +import org.apache.struts2.StrutsConstants; + +import com.opensymphony.xwork2.inject.Inject; + /** * Handles JSON content using json-lib */ public class JsonLibHandler implements ContentTypeHandler { +private static final String DEFAULT_CONTENT_TYPE = "application/json"; +private String defaultEncoding = "ISO-8859-1"; + public void toObject(Reader in, Object target) throws IOException { StringBuilder sb = new StringBuilder(); char[] buffer = new char[1024]; @@ -76,10 +83,15 @@ public class JsonLibHandler implements C } public String getContentType() { -return "text/javascript"; +return DEFAULT_CONTENT_TYPE+";charset=" + this.defaultEncoding; } public String getExtension() { return "json"; } + +@Inject(StrutsConstants.STRUTS_I18N_ENCODING) +public void setDefaultEncoding(String val) { +this.defaultEncoding = val; +} } Modified: struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/handler/JsonLibHandlerTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/handler/JsonLibHandlerTest.java?rev=1097172&r1=1097171&r2=1097172&view=diff == --- struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/handler/JsonLibHandlerTest.java (original) +++ struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/handler/JsonLibHandlerTest.java Wed Apr 27 16:36:54 2011 @@ -21,13 +21,13 @@ package org.apache.struts2.rest.handler; -import junit.framework.TestCase; - -import java.io.StringWriter; import java.io.IOException; import java.io.StringReader; +import java.io.StringWriter; import java.util.Arrays; +import junit.framework.TestCase; + public class JsonLibHandlerTest extends TestCase { public void testFromObject() throws IOException { @@ -67,4 +67,15 @@ public class JsonLibHandlerTest extends assertEquals(contact, target); } + +public void testContentType() throws IOException { +JsonLibHandler handler = new JsonLibHandler(); +assertEquals(handler.getContentType(), "application/json;charset=ISO-8859-1"); +} + +public void testDefaultEncoding() throws IOException { +JsonLibHandler handler = new JsonLibHandler(); +handler.setDefaultEncoding("UTF-8"); +assertEquals(handler.getContentType(), "application/json;charset=UTF-8"); +} }
svn commit: r1097569 - /struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
Author: jogep Date: Thu Apr 28 18:28:25 2011 New Revision: 1097569 URL: http://svn.apache.org/viewvc?rev=1097569&view=rev Log: WW-3469: convention plugin does not apply interceptors unless there is an Action Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.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=1097569&r1=1097568&r2=1097569&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 Thu Apr 28 18:28:25 2011 @@ -21,12 +21,12 @@ package org.apache.struts2.convention; import java.net.MalformedURLException; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; +import java.util.*; import javax.servlet.ServletContext; +import com.opensymphony.xwork2.config.entities.*; +import com.opensymphony.xwork2.config.providers.InterceptorBuilder; import org.apache.struts2.util.ClassLoaderUtils; import com.opensymphony.xwork2.Action; @@ -38,10 +38,6 @@ import com.opensymphony.xwork2.UnknownHa import com.opensymphony.xwork2.XWorkException; import com.opensymphony.xwork2.config.Configuration; import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; import com.opensymphony.xwork2.inject.Inject; import com.opensymphony.xwork2.inject.Container; import com.opensymphony.xwork2.util.logging.Logger; @@ -219,16 +215,14 @@ public class ConventionUnknownHandler im } params.put(resultTypeConfig.getDefaultResultParam(), path); -//PackageConfig pkg = configuration.getPackageConfig(defaultParentPackageName); -//List interceptors = InterceptorBuilder.constructInterceptorReference(pkg, -//pkg.getFullDefaultInterceptorRef(), Collections.EMPTY_MAP, null, objectFactory); +PackageConfig pkg = configuration.getPackageConfig(defaultParentPackageName); +List interceptors = InterceptorBuilder.constructInterceptorReference(pkg, pkg.getFullDefaultInterceptorRef(), Collections.EMPTY_MAP, null, objectFactory); ResultConfig config = new ResultConfig.Builder(Action.SUCCESS, resultTypeConfig.getClassName()). addParams(params).build(); results.put(Action.SUCCESS, config); -//addInterceptors(interceptors). return new ActionConfig.Builder(defaultParentPackageName, "execute", ActionSupport.class.getName()). -addResultConfigs(results).build(); +addInterceptors(interceptors).addResultConfigs(results).build(); } private Result scanResultsByExtension(String ns, String actionName, String pathPrefix,
svn commit: r1097933 - /struts/site/src/site/site.xml
Author: jogep Date: Fri Apr 29 20:06:20 2011 New Revision: 1097933 URL: http://svn.apache.org/viewvc?rev=1097933&view=rev Log: WW-3618: Stripes Link on Struts Homepage is dead Modified: struts/site/src/site/site.xml Modified: struts/site/src/site/site.xml URL: http://svn.apache.org/viewvc/struts/site/src/site/site.xml?rev=1097933&r1=1097932&r2=1097933&view=diff == --- struts/site/src/site/site.xml (original) +++ struts/site/src/site/site.xml Fri Apr 29 20:06:20 2011 @@ -170,10 +170,6 @@ href="http://cocoon.apache.org/"; /> http://shale.apache.org/"; -/> -http://tapestry.apache.org/"; /> @@ -187,7 +183,7 @@ /> http://stripes.mc4j.org/confluence/display/stripes/Home"; +href="http://www.stripesframework.org/"; />
svn commit: r1098398 - /struts/sandbox/trunk/struts2-cdi-example/pom.xml
Author: jogep Date: Sun May 1 19:55:39 2011 New Revision: 1098398 URL: http://svn.apache.org/viewvc?rev=1098398&view=rev Log: Upgrades parent to latest version Modified: struts/sandbox/trunk/struts2-cdi-example/pom.xml Modified: struts/sandbox/trunk/struts2-cdi-example/pom.xml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-cdi-example/pom.xml?rev=1098398&r1=1098397&r2=1098398&view=diff == --- struts/sandbox/trunk/struts2-cdi-example/pom.xml (original) +++ struts/sandbox/trunk/struts2-cdi-example/pom.xml Sun May 1 19:55:39 2011 @@ -5,7 +5,7 @@ org.apache.struts struts2-apps -2.2.0-SNAPSHOT +2.3-SNAPSHOT org.apache.struts struts2-cdi-example @@ -36,44 +36,41 @@ org.apache.struts struts2-core -${pom.version} +${project.version} org.apache.struts struts2-junit-plugin -${pom.version} +${project.version} org.apache.struts struts2-cdi-plugin -2.2.0-SNAPSHOT +${project.version} commons-logging commons-logging -1.1.1 log4j log4j -1.2.14 javax.enterprise cdi-api -1.0 +1.0-SP1 provided junit junit -4.5 test
svn commit: r1099157 [2/2] - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/components/ core/src/main/java/org/apache/struts2/components/template/ core/src/main/java/org/apache/struts
Modified: struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff == --- struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java (original) +++ struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java Tue May 3 17:53:55 2011 @@ -55,8 +55,9 @@ public class DefaultOValValidationManage configurers.add(annotationsConfigurer); if (validateJPAAnnotations) { -if (LOG.isDebugEnabled()) +if (LOG.isDebugEnabled()) { LOG.debug("Adding support for JPA annotations validations in OVal"); +} configurers.add(new JPAAnnotationsConfigurer()); } } @@ -139,8 +140,9 @@ public class DefaultOValValidationManage is = FileManager.loadFile(fileName, clazz); if (is != null) { -if (LOG.isDebugEnabled()) +if (LOG.isDebugEnabled()) { LOG.debug("Loading validation xml file [#0]", fileName); +} XMLConfigurer configurer = new XMLConfigurer(); configurer.fromXML(is); validatorFileCache.put(fileName, configurer); @@ -161,4 +163,4 @@ public class DefaultOValValidationManage return null; } -} \ No newline at end of file +} Modified: struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff == --- struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java (original) +++ struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java Tue May 3 17:53:55 2011 @@ -128,7 +128,9 @@ public class OValValidationInterceptor e } catch (Exception e) { // If any exception occurred while doing reflection, we want // validate() to be executed -LOG.warn("An exception occured while executing the prefix method", e); +if (LOG.isWarnEnabled()) { +LOG.warn("An exception occured while executing the prefix method", e); +} exception = e; } @@ -157,8 +159,9 @@ public class OValValidationInterceptor e String[] profileNames = profiles.value(); if (profileNames != null && profileNames.length > 0) { validator.disableAllProfiles(); -if (LOG.isDebugEnabled()) +if (LOG.isDebugEnabled()) { LOG.debug("Enabling profiles [#0]", StringUtils.join(profileNames, ",")); +} for (String profileName : profileNames) validator.enableProfile(profileName); } @@ -187,7 +190,9 @@ public class OValValidationInterceptor e } if (isActionError(violation)) { +if (LOG.isDebugEnabled()) { LOG.debug("Adding action error '#0'", message); +} validatorContext.addActionError(message); } else { ValidationError validationError = buildValidationError(violation, message); @@ -198,7 +203,9 @@ public class OValValidationInterceptor e fieldName = parentFieldname + "." + fieldName; } -LOG.debug("Adding field error [#0] with message '#1'", fieldName, validationError.getMessage()); +if (LOG.isDebugEnabled()) { + LOG.debug("Adding field error [#0] with message '#1'", fieldName, validationError.getMessage()); +} validatorContext.addFieldError(fieldName, validationError.getMessage()); // don't add "model." prefix to fields of model in model driven action Modified: struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java?rev=1099157&r
svn commit: r1099705 - /struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
Author: jogep Date: Thu May 5 07:17:33 2011 New Revision: 1099705 URL: http://svn.apache.org/viewvc?rev=1099705&view=rev Log: WW-3564: Unable to find a result type for extension Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java Modified: struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java?rev=1099705&r1=1099704&r2=1099705&view=diff == --- struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java (original) +++ struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java Thu May 5 07:17:33 2011 @@ -20,6 +20,21 @@ */ package org.apache.struts2.convention; +import java.io.IOException; +import java.net.URL; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import javax.servlet.ServletContext; + +import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.struts2.convention.annotation.Result; +import org.apache.struts2.convention.annotation.Results; + import com.opensymphony.xwork2.Action; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.config.ConfigurationException; @@ -34,19 +49,6 @@ import com.opensymphony.xwork2.util.find import com.opensymphony.xwork2.util.finder.Test; import com.opensymphony.xwork2.util.logging.Logger; import com.opensymphony.xwork2.util.logging.LoggerFactory; -import org.apache.commons.lang.ObjectUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.struts2.convention.annotation.Result; -import org.apache.struts2.convention.annotation.Results; - -import javax.servlet.ServletContext; -import java.io.IOException; -import java.net.URL; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; /** * @@ -262,6 +264,15 @@ public class DefaultResultMapBuilder imp LOG.trace("Ignoring file without name [#0]", path); continue; } +else if(fileName.lastIndexOf(".") > 0){ +String suffix = fileName.substring(fileName.lastIndexOf(".")+1); + + if(conventionsService.getResultTypesByExtension(packageConfig).get(suffix) == null) { +if (LOG.isDebugEnabled()) +LOG.debug("No result type defined for file suffix : [#0]. Ignoring file #1", suffix, fileName); + continue; +} +} makeResults(actionClass, path, resultPrefix, results, packageConfig, resultsByExtension); }
svn commit: r1103822 - in /struts/sandbox/trunk/struts2-portlet2-plugin: pom.xml src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java src/main/resources/NOTICE.txt
Author: jogep Date: Mon May 16 18:29:42 2011 New Revision: 1103822 URL: http://svn.apache.org/viewvc?rev=1103822&view=rev Log: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk sync changes from trunk plugin Modified: struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java struts/sandbox/trunk/struts2-portlet2-plugin/src/main/resources/NOTICE.txt Modified: struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml?rev=1103822&r1=1103821&r2=1103822&view=diff == --- struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml (original) +++ struts/sandbox/trunk/struts2-portlet2-plugin/pom.xml Mon May 16 18:29:42 2011 @@ -62,20 +62,35 @@ provided - - - org.apache.velocity - velocity - 1.5 - true - - - - org.apache.velocity - velocity-tools - 1.3 - true - + +commons-lang +commons-lang + + + + +org.apache.velocity +velocity +1.6.3 +true + + + +org.apache.velocity +velocity-tools +1.3 +true + + +velocity +velocity + + +struts +struts + + + Modified: struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java?rev=1103822&r1=1103821&r2=1103822&view=diff == --- struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java (original) +++ struts/sandbox/trunk/struts2-portlet2-plugin/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java Mon May 16 18:29:42 2011 @@ -50,7 +50,7 @@ import freemarker.template.TemplateModel /** */ -public class PortletFreemarkerResult extends StrutsResultSupport { +public class PortletFreemarkerResult extends StrutsResultSupport implements PortletActionConstants { private static final long serialVersionUID = -5570612389289887543L; @@ -119,6 +119,7 @@ public class PortletFreemarkerResult ext ActionInvocation invocation) { ActionResponse res = PortletActionContext.getActionResponse(); // View is rendered outside an action...uh oh... + invocation.getInvocationContext().getSession().put(RENDER_DIRECT_LOCATION, location); res.setRenderParameter(PortletActionConstants.ACTION_PARAM, "freemarkerDirect"); res.setRenderParameter("location", location); res.setRenderParameter(PortletActionConstants.MODE_PARAM, PortletActionContext Modified: struts/sandbox/trunk/struts2-portlet2-plugin/src/main/resources/NOTICE.txt URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-portlet2-plugin/src/main/resources/NOTICE.txt?rev=1103822&r1=1103821&r2=1103822&view=diff == --- struts/sandbox/trunk/struts2-portlet2-plugin/src/main/resources/NOTICE.txt (original) +++ struts/sandbox/trunk/struts2-portlet2-plugin/src/main/resources/NOTICE.txt Mon May 16 18:29:42 2011 @@ -1,5 +1,5 @@ Apache Struts -Copyright 2000-2007 The Apache Software Foundation +Copyright 2000-2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file
svn propchange: r1103822 - svn:log
Author: jogep Revision: 1103822 Modified property: svn:log Modified: svn:log at Wed May 18 17:26:39 2011 -- --- svn:log (original) +++ svn:log Wed May 18 17:26:39 2011 @@ -1,3 +1 @@ -Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk - -sync changes from trunk plugin +WW-3620 Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk
svn commit: r1126101 - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/components/ xwork-core/src/main/java/com/opensymphony/xwork2/ xwork-core/src/main/java/com/opensymphony/xwork2/mo
Author: jogep Date: Sun May 22 17:15:55 2011 New Revision: 1126101 URL: http://svn.apache.org/viewvc?rev=1126101&view=rev Log: WW-3628 : Regression in s:url tag action's method is no longer being included in the resultant url Patch by Jason Pyeron Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionProxy.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/mock/MockActionProxy.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=1126101&r1=1126100&r2=1126101&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 Sun May 22 17:15:55 2011 @@ -77,7 +77,8 @@ public class ServletUrlRenderer implemen final String action = ai.getProxy().getActionName(); final String namespace = ai.getProxy().getNamespace(); - result = urlComponent.determineActionURL(action, namespace, urlComponent.getMethod(),urlComponent.getHttpServletRequest(), urlComponent.getHttpServletResponse(), urlComponent.getParameters(), scheme, urlComponent.isIncludeContext(), urlComponent.isEncode(), urlComponent.isForceAddSchemeHostAndPort(), urlComponent.isEscapeAmp()); + final String method = urlComponent.getMethod() != null || !ai.getProxy().isMethodSpecified() ? urlComponent.getMethod() : ai.getProxy().getMethod(); + result = urlComponent.determineActionURL(action, namespace, method, urlComponent.getHttpServletRequest(), urlComponent.getHttpServletResponse(), urlComponent.getParameters(), scheme, urlComponent.isIncludeContext(), urlComponent.isEncode(), urlComponent.isForceAddSchemeHostAndPort(), urlComponent.isEscapeAmp()); } else { String _value = urlComponent.getValue(); Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionProxy.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionProxy.java?rev=1126101&r1=1126100&r2=1126101&view=diff == --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionProxy.java (original) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionProxy.java Sun May 22 17:15:55 2011 @@ -92,5 +92,12 @@ public interface ActionProxy { * @return the method to execute */ String getMethod(); + +/** + * Gets status of the method value's initialization. + * + * @return true if the method returned by getMethod() is not a default initializer value. + */ +boolean isMethodSpecified(); } Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java?rev=1126101&r1=1126100&r2=1126101&view=diff == --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java (original) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionProxy.java Sun May 22 17:15:55 2011 @@ -60,6 +60,8 @@ public class DefaultActionProxy implemen protected ActionEventListener actionEventListener; +private boolean methodSpecified=true; + /** * This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy. * @@ -162,6 +164,7 @@ public class DefaultActionProxy implemen if (StringUtils.isEmpty(this.method)) { this.method = "execute"; } +methodSpecified=false; } } @@ -201,4 +204,10 @@ public class DefaultActionProxy implemen UtilTimerStack.pop(profileKey); } } + +@Override +public boolean isMethodSpecified() +{ +return methodSpecified; +} } Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/mock/MockActionProxy.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/mock/Mock
svn commit: r1134395 - in /struts/struts2/trunk: core/pom.xml plugins/portlet/pom.xml plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingBeanFactory.java pom.xml
Author: jogep Date: Fri Jun 10 17:47:55 2011 New Revision: 1134395 URL: http://svn.apache.org/viewvc?rev=1134395&view=rev Log: WW-3646: Upgrade Spring Dependencies to 3.0.x Modified: struts/struts2/trunk/core/pom.xml struts/struts2/trunk/plugins/portlet/pom.xml struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingBeanFactory.java struts/struts2/trunk/pom.xml Modified: struts/struts2/trunk/core/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/pom.xml?rev=1134395&r1=1134394&r2=1134395&view=diff == --- struts/struts2/trunk/core/pom.xml (original) +++ struts/struts2/trunk/core/pom.xml Fri Jun 10 17:47:55 2011 @@ -315,7 +315,7 @@ org.springframework -spring +spring-core compile true Modified: struts/struts2/trunk/plugins/portlet/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/pom.xml?rev=1134395&r1=1134394&r2=1134395&view=diff == --- struts/struts2/trunk/plugins/portlet/pom.xml (original) +++ struts/struts2/trunk/plugins/portlet/pom.xml Fri Jun 10 17:47:55 2011 @@ -122,16 +122,19 @@ org.springframework spring-test +2.5.6 test org.springframework spring-webmvc-portlet +2.5.6 test org.springframework spring-core +2.5.6 test Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingBeanFactory.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingBeanFactory.java?rev=1134395&r1=1134394&r2=1134395&view=diff == --- struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingBeanFactory.java (original) +++ struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingBeanFactory.java Fri Jun 10 17:47:55 2011 @@ -37,7 +37,7 @@ import java.lang.reflect.Constructor; public class ClassReloadingBeanFactory extends DefaultListableBeanFactory { @Override protected BeanWrapper createBeanInstance(String beanName, RootBeanDefinition mbd, Object[] args) { -Class beanClass = resolveBeanClass(mbd, beanName); +Class beanClass = resolveBeanClass(mbd, beanName, null); if (mbd.getFactoryMethodName() != null) { return instantiateUsingFactoryMethod(beanName, mbd, args); Modified: struts/struts2/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/pom.xml?rev=1134395&r1=1134394&r2=1134395&view=diff == --- struts/struts2/trunk/pom.xml (original) +++ struts/struts2/trunk/pom.xml Fri Jun 10 17:47:55 2011 @@ -85,7 +85,7 @@ ${project.version} -2.5.6 + 3.0.5.RELEASE 3.0.1 3.1 2.0.6 @@ -178,7 +178,7 @@ org.apache.maven.plugins maven-surefire-plugin -2.3 +2.3.1 **/*Test.java @@ -547,7 +547,7 @@ org.springframework -spring +spring-core ${struts2.springPlatformVersion}
svn commit: r1139060 - /struts/archive/plugins/
Author: jogep Date: Thu Jun 23 20:16:08 2011 New Revision: 1139060 URL: http://svn.apache.org/viewvc?rev=1139060&view=rev Log: create folder for replaced or removed plugins Added: struts/archive/plugins/
svn commit: r1139061 [5/5] - in /struts/archive/plugins: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/struts2/ src/main/java/org/apache/struts
Added: struts/archive/plugins/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java URL: http://svn.apache.org/viewvc/struts/archive/plugins/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java?rev=1139061&view=auto == --- struts/archive/plugins/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java (added) +++ struts/archive/plugins/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java Thu Jun 23 20:18:43 2011 @@ -0,0 +1,160 @@ +/* + * $Id: PortletUrlHelperTest.java 651946 2008-04-27 13:41:38Z apetrelli $ + * + * 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. + */ + +package org.apache.struts2.portlet.util; + +import java.util.HashMap; +import java.util.Map; + +import javax.portlet.PortletMode; +import javax.portlet.PortletURL; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.WindowState; + +import junit.framework.TestCase; + +import org.apache.struts2.portlet.context.PortletActionContext; +import org.easymock.MockControl; + +import com.opensymphony.xwork2.ActionContext; + +/** + */ +public class PortletUrlHelperTest extends TestCase { + +RenderResponse renderResponse; + +RenderRequest renderRequest; + +PortletURL url; + +MockControl renderResponseControl; + +MockControl renderRequestControl; + +MockControl portletUrlControl; + +public void setUp() throws Exception { +super.setUp(); + +renderRequestControl = MockControl.createControl(RenderRequest.class); +renderResponseControl = MockControl.createControl(RenderResponse.class); +portletUrlControl = MockControl.createControl(PortletURL.class); + +renderRequest = (RenderRequest) renderRequestControl.getMock(); +renderResponse = (RenderResponse) renderResponseControl.getMock(); +url = (PortletURL) portletUrlControl.getMock(); + +renderRequestControl.expectAndDefaultReturn(renderRequest +.getPortletMode(), PortletMode.VIEW); +renderRequestControl.expectAndDefaultReturn(renderRequest +.getWindowState(), WindowState.NORMAL); + +Map modeNamespaceMap = new HashMap(); +modeNamespaceMap.put("view", "/view"); +modeNamespaceMap.put("edit", "/edit"); +modeNamespaceMap.put("help", "/help"); + +Map context = new HashMap(); +context.put(PortletActionContext.REQUEST, renderRequest); +context.put(PortletActionContext.RESPONSE, renderResponse); +context.put(PortletActionContext.PHASE, +PortletActionContext.RENDER_PHASE); +context.put(PortletActionContext.MODE_NAMESPACE_MAP, modeNamespaceMap); + +ActionContext.setContext(new ActionContext(context)); + +} + +public void testCreateRenderUrlWithNoModeOrState() throws Exception { +renderResponseControl.expectAndReturn(renderResponse.createRenderURL(), +url); + +url.setPortletMode(PortletMode.VIEW); +url.setWindowState(WindowState.NORMAL); +url.setParameters(null); +portletUrlControl.setMatcher(MockControl.ALWAYS_MATCHER); +renderRequestControl.replay(); +renderResponseControl.replay(); +portletUrlControl.replay(); +PortletUrlHelper.buildUrl("testAction", null, null, +new HashMap(), null, null, null); +portletUrlControl.verify(); +renderRequestControl.verify(); +renderResponseControl.verify(); +} + +public void testCreateRenderUrlWithDifferentPortletMode() throws Exception { +renderResponseControl.expectAndReturn(renderResponse.createRenderURL(), +url); + +url.setPortletMode(PortletMode.EDIT); +url.setWindowState(WindowState.NORMAL); +url.setParameters(null); +portletUrlControl.setMatcher(MockControl.ALWAYS_MATCHER); +renderRequestControl.replay(); +renderResponseControl.replay(); +portletUrlControl.replay(); +PortletUrlHelper.buildUrl("testAction", null, null, +new HashMap(), null, "edit", null); +portle
svn commit: r1139062 - in /struts/archive: plugins/ struts2-portlet1-plugin/
Author: jogep Date: Thu Jun 23 20:20:45 2011 New Revision: 1139062 URL: http://svn.apache.org/viewvc?rev=1139062&view=rev Log: Move Portlet1 Plugin to archive Added: struts/archive/struts2-portlet1-plugin/ - copied from r1139061, struts/archive/plugins/ Removed: struts/archive/plugins/
svn commit: r1139064 - in /struts/archive: plugins/struts2-portlet1-plugin/ struts2-portlet1-plugin/
Author: jogep Date: Thu Jun 23 20:22:02 2011 New Revision: 1139064 URL: http://svn.apache.org/viewvc?rev=1139064&view=rev Log: create folder for replaced or removed plugins Added: struts/archive/plugins/struts2-portlet1-plugin/ - copied from r1139063, struts/archive/struts2-portlet1-plugin/ Removed: struts/archive/struts2-portlet1-plugin/
svn commit: r1139070 - in /struts/struts2/trunk/archetypes: struts2-archetype-dbportlet/src/main/resources/archetype-resources/ struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/m
Author: jogep Date: Thu Jun 23 20:59:11 2011 New Revision: 1139070 URL: http://svn.apache.org/viewvc?rev=1139070&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Adopt Portlet Plugin Changes to the Archetypes Modified: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.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/webapp/WEB-INF/portlet.xml Modified: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml?rev=1139070&r1=1139069&r2=1139070&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml Thu Jun 23 20:59:11 2011 @@ -59,7 +59,7 @@ org.springframework spring-jdbc -2.5.6 +3.0.5.RELEASE @@ -85,9 +85,9 @@ -portlet-api +javax.portlet portlet-api -1.0 +2.0 provided @@ -117,9 +117,9 @@ -portlet-api +javax.portlet portlet-api -1.0 +2.0 Modified: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml?rev=1139070&r1=1139069&r2=1139070&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml Thu Jun 23 20:59:11 2011 @@ -6,7 +6,7 @@ xsi:schemaLocation="http://java.sun.com/ StrutsDBPortlet Struts Database Portlet - org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher + org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher actionPackages Modified: struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml?rev=1139070&r1=1139069&r2=1139070&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml Thu Jun 23 20:59:11 2011 @@ -37,7 +37,7 @@ javax.portlet portlet-api -1.0 +2.0 provided Modified: struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml?rev=1139070&r1=1139069&r2=1139070&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml Thu Jun 23 20:59:11 2011 @@ -12,7 +12,7 @@ HelloPortlet ${artifactId} - org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher + org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher
svn commit: r1139078 - in /struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2: components/ portlet/servlet/ views/freemarker/
Author: jogep Date: Thu Jun 23 21:19:00 2011 New Revision: 1139078 URL: http://svn.apache.org/viewvc?rev=1139078&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Remove unnecessary Tests Removed: struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/components/ struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/servlet/ struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/freemarker/
svn commit: r1139182 - /struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java
Author: jogep Date: Fri Jun 24 07:32:13 2011 New Revision: 1139182 URL: http://svn.apache.org/viewvc?rev=1139182&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Modified: struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java Modified: struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java?rev=1139182&r1=1139181&r2=1139182&view=diff == --- struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java (original) +++ struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java Fri Jun 24 07:32:13 2011 @@ -83,26 +83,27 @@ public class PortletRequestMapTest exten PortletRequestMap map = new PortletRequestMap(request); Set entries = map.entrySet(); -//TODO Why is Entry Size 3? -//assertEquals(2, entries.size()); -//Iterator it = entries.iterator(); -//Map.Entry entry = (Map.Entry)it.next(); -//checkEntry(entry); -//entry = (Map.Entry)it.next(); -//checkEntry(entry); - +assertEquals(3, entries.size()); +Iterator it = entries.iterator(); +for (Iterator iterator = entries.iterator(); iterator.hasNext();) { +Map.Entry entry = (Map.Entry) iterator.next(); +checkEntry(entry); + } } - private void checkEntry(Map.Entry entry) { - if(entry.getKey().equals("testAttribute1")) { +private void checkEntry(Map.Entry entry) { + if(entry.getKey().equals("testAttribute1")) { assertEquals("testValue1", entry.getValue()); } else if(entry.getKey().equals("testAttribute2")) { assertEquals("testValue2", entry.getValue()); } +else if(entry.getKey().equals("javax.portlet.lifecycle_phase")) { + assertNull(entry.getValue()); +} else { fail("Unexpected entry in entry set: " + entry); } - } +} }
svn commit: r1139729 [3/3] - in /struts/struts2/trunk: ./ apps/portlet/ apps/portlet/src/main/webapp/WEB-INF/ archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/ archetypes/
Modified: struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java?rev=1139729&r1=1139728&r2=1139729&view=diff == --- struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java (original) +++ struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/util/PortletUrlHelperTest.java Sun Jun 26 08:30:00 2011 @@ -18,27 +18,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.struts2.portlet.util; -import static org.apache.struts2.portlet.PortletConstants.*; +package org.apache.struts2.portlet.util; -import java.io.IOException; -import java.io.Writer; import java.util.HashMap; import java.util.Map; import javax.portlet.PortletMode; -import javax.portlet.PortletModeException; -import javax.portlet.PortletSecurityException; import javax.portlet.PortletURL; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import javax.portlet.WindowState; -import javax.portlet.WindowStateException; import junit.framework.TestCase; -import org.easymock.EasyMock; +import org.apache.struts2.portlet.context.PortletActionContext; +import org.easymock.MockControl; import com.opensymphony.xwork2.ActionContext; @@ -50,154 +45,116 @@ public class PortletUrlHelperTest extend RenderRequest renderRequest; -MockUrl url; +PortletURL url; + +MockControl renderResponseControl; + +MockControl renderRequestControl; + +MockControl portletUrlControl; public void setUp() throws Exception { super.setUp(); -renderResponse = EasyMock.createMock(RenderResponse.class); -renderRequest = EasyMock.createMock(RenderRequest.class); -url = new MockUrl(); - - EasyMock.expect(renderRequest.getPortletMode()).andReturn(PortletMode.VIEW).anyTimes(); - EasyMock.expect(renderRequest.getWindowState()).andReturn(WindowState.NORMAL).anyTimes(); +renderRequestControl = MockControl.createControl(RenderRequest.class); +renderResponseControl = MockControl.createControl(RenderResponse.class); +portletUrlControl = MockControl.createControl(PortletURL.class); + +renderRequest = (RenderRequest) renderRequestControl.getMock(); +renderResponse = (RenderResponse) renderResponseControl.getMock(); +url = (PortletURL) portletUrlControl.getMock(); + +renderRequestControl.expectAndDefaultReturn(renderRequest +.getPortletMode(), PortletMode.VIEW); +renderRequestControl.expectAndDefaultReturn(renderRequest +.getWindowState(), WindowState.NORMAL); -Map modeNamespaceMap = new HashMap(); +Map modeNamespaceMap = new HashMap(); modeNamespaceMap.put("view", "/view"); modeNamespaceMap.put("edit", "/edit"); modeNamespaceMap.put("help", "/help"); -Map context = new HashMap(); -context.put(REQUEST, renderRequest); -context.put(RESPONSE, renderResponse); -context.put(PHASE, RENDER_PHASE); -context.put(MODE_NAMESPACE_MAP, modeNamespaceMap); +Map context = new HashMap(); +context.put(PortletActionContext.REQUEST, renderRequest); +context.put(PortletActionContext.RESPONSE, renderResponse); +context.put(PortletActionContext.PHASE, +PortletActionContext.RENDER_PHASE); +context.put(PortletActionContext.MODE_NAMESPACE_MAP, modeNamespaceMap); ActionContext.setContext(new ActionContext(context)); } public void testCreateRenderUrlWithNoModeOrState() throws Exception { - EasyMock.expect(renderResponse.createRenderURL()).andReturn(url); - -EasyMock.replay(renderRequest); -EasyMock.replay(renderResponse); +renderResponseControl.expectAndReturn(renderResponse.createRenderURL(), +url); -(new PortletUrlHelper()).buildUrl("testAction", null, null, +url.setPortletMode(PortletMode.VIEW); +url.setWindowState(WindowState.NORMAL); +url.setParameters(null); +portletUrlControl.setMatcher(MockControl.ALWAYS_MATCHER); +renderRequestControl.replay(); +renderResponseControl.replay(); +portletUrlControl.replay(); +PortletUrlHelper.buildUrl("testAction", null, null, new HashMap(), null, null, null); -assertEquals(PortletMode.VIEW, url.getPortletMode()); -assertEquals(WindowState.NORMAL, url.getWindowState()); -assertEquals("testAction", url.getParameterMap().get(ACTION_PARAM)[0]); -assertEquals("view", url.getParameterMap().get(MODE_PARAM)[0]); +portletUrlCo
svn commit: r1139734 - in /struts: archive/plugins/struts2-portlet-plugin/ struts2/trunk/plugins/portlet/
Author: jogep Date: Sun Jun 26 08:36:56 2011 New Revision: 1139734 URL: http://svn.apache.org/viewvc?rev=1139734&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Added: struts/archive/plugins/struts2-portlet-plugin/ (props changed) - copied from r1139733, struts/struts2/trunk/plugins/portlet/ Removed: struts/struts2/trunk/plugins/portlet/ Propchange: struts/archive/plugins/struts2-portlet-plugin/ -- --- svn:ignore (added) +++ svn:ignore Sun Jun 26 08:36:56 2011 @@ -0,0 +1,7 @@ +.classpath +.project +.settings +*.ipr +*.iml +*.iws +target Propchange: struts/archive/plugins/struts2-portlet-plugin/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Sun Jun 26 08:36:56 2011 @@ -0,0 +1,2 @@ +/struts/struts2/branches/STRUTS_2_2_1_1/plugins/portlet:1037870-1053416 +/struts/struts2/tags/STRUTS_2_2_1/plugins/portlet:965062-1037869
svn commit: r1139736 - in /struts: sandbox/trunk/struts2-portlet2-plugin/ struts2/trunk/plugins/struts2-portlet-plugin/
Author: jogep Date: Sun Jun 26 08:38:59 2011 New Revision: 1139736 URL: http://svn.apache.org/viewvc?rev=1139736&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Added: struts/struts2/trunk/plugins/struts2-portlet-plugin/ - copied from r1139735, struts/sandbox/trunk/struts2-portlet2-plugin/ Removed: struts/sandbox/trunk/struts2-portlet2-plugin/
svn commit: r1139740 - in /struts/struts2/trunk/plugins: portlet/ struts2-portlet-plugin/
Author: jogep Date: Sun Jun 26 08:45:11 2011 New Revision: 1139740 URL: http://svn.apache.org/viewvc?rev=1139740&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Added: struts/struts2/trunk/plugins/portlet/ (props changed) - copied from r1139739, struts/struts2/trunk/plugins/struts2-portlet-plugin/ Removed: struts/struts2/trunk/plugins/struts2-portlet-plugin/ Propchange: struts/struts2/trunk/plugins/portlet/ -- --- svn:ignore (added) +++ svn:ignore Sun Jun 26 08:45:11 2011 @@ -0,0 +1,4 @@ +target +.classpath +.project +.settings Propchange: struts/struts2/trunk/plugins/portlet/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Sun Jun 26 08:45:11 2011 @@ -0,0 +1,2 @@ +/struts/struts2/branches/STRUTS_2_2_1_1/plugins/struts2-portlet-plugin:1037870-1053416 +/struts/struts2/tags/STRUTS_2_2_1/plugins/struts2-portlet-plugin:965062-1037869
svn commit: r1139753 - in /struts/struts2/trunk: ./ apps/portlet/ apps/portlet/src/main/webapp/WEB-INF/ archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/ archetypes/struts
Author: jogep Date: Sun Jun 26 09:53:13 2011 New Revision: 1139753 URL: http://svn.apache.org/viewvc?rev=1139753&view=rev Log: WW-3620: Bring Portlet 2.0 (JSR286) plugin from sandbox to trunk Modified: struts/struts2/trunk/apps/portlet/pom.xml struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/portlet.xml struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.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/webapp/WEB-INF/portlet.xml struts/struts2/trunk/plugins/portlet/pom.xml struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/PortletRequestMapTest.java struts/struts2/trunk/pom.xml Modified: struts/struts2/trunk/apps/portlet/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/pom.xml?rev=1139753&r1=1139752&r2=1139753&view=diff == --- struts/struts2/trunk/apps/portlet/pom.xml (original) +++ struts/struts2/trunk/apps/portlet/pom.xml Sun Jun 26 09:53:13 2011 @@ -93,8 +93,8 @@ -portlet-api -portlet-api +javax.portlet + portlet-api provided Modified: struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/portlet.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/portlet.xml?rev=1139753&r1=1139752&r2=1139753&view=diff == --- struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/portlet.xml (original) +++ struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/portlet.xml Sun Jun 26 09:53:13 2011 @@ -73,7 +73,7 @@ StrutsPortlet2 Struts Test Portlet2 - org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher + org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher Modified: struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml?rev=1139753&r1=1139752&r2=1139753&view=diff == --- struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml (original) +++ struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml Sun Jun 26 09:53:13 2011 @@ -8,11 +8,8 @@ /WEB-INF/applicationContext*.xml + + org.springframework.web.context.ContextLoaderListener + - - - Modified: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml?rev=1139753&r1=1139752&r2=1139753&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml Sun Jun 26 09:53:13 2011 @@ -59,7 +59,7 @@ org.springframework spring-jdbc -2.5.6 +3.0.5.RELEASE @@ -85,9 +85,9 @@ -portlet-api +javax.portlet portlet-api -1.0 +2.0 provided @@ -117,9 +117,9 @@ -portlet-api +javax.portlet portlet-api -1.0 +2.0 Modified: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/portlet.xml?rev=1139753&r1=1139752&r2=1139753&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/port
svn commit: r1140218 - in /struts/struts2/trunk/apps/showcase/src/main/webapp/person: edit-person.jsp index.jsp list-people.ftl new-person.ftl
Author: jogep Date: Mon Jun 27 15:59:19 2011 New Revision: 1140218 URL: http://svn.apache.org/viewvc?rev=1140218&view=rev Log: WW-3632: /struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp should use struts tag instead of Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp?rev=1140218&r1=1140217&r2=1140218&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp (original) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/person/edit-person.jsp Mon Jun 27 15:59:19 2011 @@ -33,8 +33,10 @@ -Create a new person -List all people + +Create a new person + +List all people Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp?rev=1140218&r1=1140217&r2=1140218&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp (original) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/person/index.jsp Mon Jun 27 15:59:19 2011 @@ -1,3 +1,5 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> + Acme Corp @@ -5,8 +7,10 @@ -Create a new person -List all people + +Create a new person + +List all people Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl?rev=1140218&r1=1140217&r2=1140218&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl (original) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/person/list-people.ftl Mon Jun 27 15:59:19 2011 @@ -21,8 +21,10 @@ There are ${peopleCount} people... -Edit people -Create a new person +<@s.url id="editpersonurl" action="edit-person" /> +<@s.a href="%{editpersonurl}">Edit people +<@s.url id="newpersonurl" action="new-person" method="input" /> +<@s.a href="%{newpersonurl}">Create a new person Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl?rev=1140218&r1=1140217&r2=1140218&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl (original) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/person/new-person.ftl Mon Jun 27 15:59:19 2011 @@ -11,8 +11,10 @@ -Edit people -List all people +<@s.url id="editpersonurl" action="edit-person" /> +<@s.a href="%{editpersonurl}">Edit people +<@s.url id="listpeopleurl" action="list-people" /> +<@s.a href="%{listpeopleurl}">List all people
svn commit: r1142800 - /struts/site/src/site/site.xml
Author: jogep Date: Mon Jul 4 20:40:24 2011 New Revision: 1142800 URL: http://svn.apache.org/viewvc?rev=1142800&view=rev Log: WW-3436: Link to JIRA on Homepage is broken Modified: struts/site/src/site/site.xml Modified: struts/site/src/site/site.xml URL: http://svn.apache.org/viewvc/struts/site/src/site/site.xml?rev=1142800&r1=1142799&r2=1142800&view=diff == --- struts/site/src/site/site.xml (original) +++ struts/site/src/site/site.xml Mon Jul 4 20:40:24 2011 @@ -84,7 +84,7 @@ /> http://issues.apache.org/jira/"; +href="https://issues.apache.org/jira/browse/WW"; />
svn commit: r1148449 - /struts/struts2/trunk/plugins/dojo/pom.xml
Author: jogep Date: Tue Jul 19 17:10:11 2011 New Revision: 1148449 URL: http://svn.apache.org/viewvc?rev=1148449&view=rev Log: WW-3661: node 'tlib-version' syntax error in struts-dojo-tags.tld Modified: struts/struts2/trunk/plugins/dojo/pom.xml Modified: struts/struts2/trunk/plugins/dojo/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/pom.xml?rev=1148449&r1=1148448&r2=1148449&view=diff == --- struts/struts2/trunk/plugins/dojo/pom.xml (original) +++ struts/struts2/trunk/plugins/dojo/pom.xml Tue Jul 19 17:10:11 2011 @@ -37,6 +37,11 @@ scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/plugins/dojo/ http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/plugins/dojo/ + + +2.2 + + release @@ -91,7 +96,7 @@ 1.0.15 - uri=/struts-dojo-tags,tlibVersion=2.2.3,jspVersion=2.0,shortName=sx,displayName="Struts + uri=/struts-dojo-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=sx,displayName="Struts Dojo Tags", outFile=${basedir}/target/classes/META-INF/struts-dojo-tags.tld, description="Struts AJAX tags based on Dojo.",
svn commit: r1161628 - /struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
Author: jogep Date: Thu Aug 25 16:23:45 2011 New Revision: 1161628 URL: http://svn.apache.org/viewvc?rev=1161628&view=rev Log: WW-3672: Wrong mime-type for csv media 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=1161628&r1=1161627&r2=1161628&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 Thu Aug 25 16:23:45 2011 @@ -352,7 +352,7 @@ public class JasperReportsResult extends response.setContentType("application/pdf"); exporter = new JRPdfExporter(); } else if (format.equals(FORMAT_CSV)) { -response.setContentType("text/plain"); +response.setContentType("text/csv"); exporter = new JRCsvExporter(); } else if (format.equals(FORMAT_HTML)) { response.setContentType("text/html");
svn commit: r1161630 - /struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
Author: jogep Date: Thu Aug 25 16:30:49 2011 New Revision: 1161630 URL: http://svn.apache.org/viewvc?rev=1161630&view=rev Log: WW-3670: JSONWriter cannot load CGLIB classes if its JAR is in SharedLib Patch provided by Bruno Borges Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java?rev=1161630&r1=1161629&r2=1161630&view=diff == --- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java (original) +++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java Thu Aug 25 16:30:49 2011 @@ -255,7 +255,7 @@ class JSONWriter { Method baseAccessor = null; if (clazz.getName().indexOf("$$EnhancerByCGLIB$$") > -1) { try { -baseAccessor = Class.forName( +baseAccessor = Thread.currentThread().getContextClassLoader().loadClass( clazz.getName().substring(0, clazz.getName().indexOf("$$"))).getMethod( accessor.getName(), accessor.getParameterTypes()); } catch (Exception ex) {
svn commit: r1185808 - in /struts: maven/trunk/pom/pom.xml site/src/site/xdoc/dev/volunteers.xml
Author: jogep Date: Tue Oct 18 19:18:35 2011 New Revision: 1185808 URL: http://svn.apache.org/viewvc?rev=1185808&view=rev Log: add my self to the volunteers Modified: struts/maven/trunk/pom/pom.xml struts/site/src/site/xdoc/dev/volunteers.xml Modified: struts/maven/trunk/pom/pom.xml URL: http://svn.apache.org/viewvc/struts/maven/trunk/pom/pom.xml?rev=1185808&r1=1185807&r2=1185808&view=diff == --- struts/maven/trunk/pom/pom.xml (original) +++ struts/maven/trunk/pom/pom.xml Tue Oct 18 19:18:35 2011 @@ -269,6 +269,14 @@ PMC Member + + Johannes Geppert + jogep + jogep at apache.org + +Committer + + Modified: struts/site/src/site/xdoc/dev/volunteers.xml URL: http://svn.apache.org/viewvc/struts/site/src/site/xdoc/dev/volunteers.xml?rev=1185808&r1=1185807&r2=1185808&view=diff == --- struts/site/src/site/xdoc/dev/volunteers.xml (original) +++ struts/site/src/site/xdoc/dev/volunteers.xml Tue Oct 18 19:18:35 2011 @@ -187,6 +187,10 @@ limitations under the License. John Lindal (jafl at apache.org) + +Johannes Geppert + (jogep at apache.org) +
svn commit: r1201876 - in /struts/struts2/trunk/apps/portlet/src/main: java/org/apache/struts2/portlet/example/eventing/ resources/ webapp/WEB-INF/ webapp/WEB-INF/eventing/
Author: jogep Date: Mon Nov 14 20:24:57 2011 New Revision: 1201876 URL: http://svn.apache.org/viewvc?rev=1201876&view=rev Log: WW-3707: Extend the Portlet Showcase with an Portlet Event Example Added: struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/ struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/ProcessAction.java struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/PublishAction.java struts/struts2/trunk/apps/portlet/src/main/resources/struts-eventing.xml struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/eventing/ struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/eventing/index.jsp struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/eventing/process.jsp Modified: struts/struts2/trunk/apps/portlet/src/main/resources/struts.xml struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/portlet.xml Added: struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/ProcessAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/ProcessAction.java?rev=1201876&view=auto == --- struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/ProcessAction.java (added) +++ struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/ProcessAction.java Mon Nov 14 20:24:57 2011 @@ -0,0 +1,61 @@ +/* + * 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. + */ +package org.apache.struts2.portlet.example.eventing; + +import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.portlet.interceptor.PortletRequestAware; +import org.apache.struts2.portlet.interceptor.PortletResponseAware; + +import javax.portlet.EventRequest; +import javax.portlet.EventResponse; +import javax.portlet.PortletRequest; +import javax.portlet.PortletResponse; + +public class ProcessAction extends ActionSupport implements PortletRequestAware, PortletResponseAware { + +private PortletRequest request; +private PortletResponse response; +private String name; + +public String execute() throws Exception { + +if (request instanceof EventRequest) { +EventRequest req = (EventRequest) request; +EventResponse res = (EventResponse) response; +res.setRenderParameter("eventName", (String) req.getEvent().getValue()); +return "forward"; +} else { +name = request.getParameter("eventName"); +} + +return SUCCESS; +} + +public void setPortletRequest(PortletRequest request) { +this.request = request; +} + +public void setPortletResponse(PortletResponse response) { +this.response = response; +} + +public String getName() { +return this.name; +} +} Added: struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/PublishAction.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/PublishAction.java?rev=1201876&view=auto == --- struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/PublishAction.java (added) +++ struts/struts2/trunk/apps/portlet/src/main/java/org/apache/struts2/portlet/example/eventing/PublishAction.java Mon Nov 14 20:24:57 2011 @@ -0,0 +1,52 @@ +/* + * 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/
svn commit: r1202798 - /struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
Author: jogep Date: Wed Nov 16 17:29:03 2011 New Revision: 1202798 URL: http://svn.apache.org/viewvc?rev=1202798&view=rev Log: WW-3708: UI tag ignores CSS related parameters Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl?rev=1202798&r1=1202797&r2=1202798&view=diff == --- struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl (original) +++ struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl Wed Nov 16 17:29:03 2011 @@ -22,39 +22,42 @@ --> <#assign itemCount = 0/> <#if parameters.list??> -<@s.iterator value="parameters.list"> -<#assign itemCount = itemCount + 1/> -<#if parameters.listKey??> -<#assign itemKey = stack.findValue(parameters.listKey)/> +<@s.iterator value="parameters.list"> +<#assign itemCount = itemCount + 1/> +<#if parameters.listKey??> +<#assign itemKey = stack.findValue(parameters.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> - -<#if parameters.listValue??> -<#assign itemValue = stack.findString(parameters.listValue)?default("")/> + +<#if parameters.listValue??> +<#assign itemValue = stack.findString(parameters.listValue)?default("")/> <#else> <#assign itemValue = stack.findString('top')/> - -<#assign itemKeyStr=itemKey.toString() /> - -<#if tag.contains(parameters.nameValue, itemKey)> - checked="checked"<#rt/> - -<#if parameters.disabled?default(false)> - disabled="disabled"<#rt/> - -<#if parameters.title??> - title="${parameters.title?html}"<#rt/> - -<#include "/${parameters.templateDir}/simple/scripting-events.ftl" /> -<#include "/${parameters.templateDir}/simple/common-attributes.ftl" /> -/> + +<#assign itemKeyStr=itemKey.toString() /> + +<#if tag.contains(parameters.nameValue, itemKey)> + checked="checked"<#rt/> + +<#if parameters.disabled?default(false)> + disabled="disabled"<#rt/> + +<#if parameters.title??> + title="${parameters.title?html}"<#rt/> + +<#include "/${parameters.templateDir}/simple/css.ftl" /> +<#include "/${parameters.templateDir}/simple/scripting-events.ftl" /> +<#include "/${parameters.templateDir}/simple/common-attributes.ftl" /> +/> ${itemValue?html} - -<#else> - + +<#else> + - + <#if parameters.disabled?default(false)> - disabled="disabled"<#rt/> + disabled="disabled"<#rt/> - /> \ No newline at end of file +/> \ No newline at end of file
svn commit: r1203772 - in /struts/struts2/trunk/plugins/rest: pom.xml src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java src/test/java/org/apache/struts2/rest/handler/JacksonLibHandl
Author: jogep Date: Fri Nov 18 18:02:03 2011 New Revision: 1203772 URL: http://svn.apache.org/viewvc?rev=1203772&view=rev Log: WW-3629: Provide a JSON Content Handler based on Jackson Lib Added: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/handler/JacksonLibHandlerTest.java Modified: struts/struts2/trunk/plugins/rest/pom.xml Modified: struts/struts2/trunk/plugins/rest/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/pom.xml?rev=1203772&r1=1203771&r2=1203772&view=diff == --- struts/struts2/trunk/plugins/rest/pom.xml (original) +++ struts/struts2/trunk/plugins/rest/pom.xml Fri Nov 18 18:02:03 2011 @@ -21,17 +21,22 @@ * under the License. */ --> -http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> 4.0.0 - + org.apache.struts struts2-plugins 2.3.1-SNAPSHOT - org.apache.struts - struts2-rest-plugin - 2.3.1-SNAPSHOT - Struts 2 REST Plugin +org.apache.struts +struts2-rest-plugin +2.3.1-SNAPSHOT +Struts 2 REST Plugin + + +1.9.2 + @@ -44,6 +49,16 @@ jdk15 +org.codehaus.jackson +jackson-core-asl +${jackson.version} + + +org.codehaus.jackson +jackson-mapper-asl +${jackson.version} + + javax.servlet servlet-api provided @@ -66,7 +81,7 @@ true - + org.springframework spring-core true Added: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java?rev=1203772&view=auto == --- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java (added) +++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java Fri Nov 18 18:02:03 2011 @@ -0,0 +1,68 @@ +/* + * $Id: JsonLibHandler.java 1097172 2011-04-27 16:36:54Z jogep $ + * + * 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. + */ + +package org.apache.struts2.rest.handler; + +import com.opensymphony.xwork2.inject.Inject; +import org.apache.struts2.StrutsConstants; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.ObjectReader; +import org.codehaus.jackson.map.SerializationConfig.Feature; + +import java.io.IOException; +import java.io.Reader; +import java.io.Writer; + +/** + * Handles JSON content using jackson-lib + */ +public class JacksonLibHandler implements ContentTypeHandler { + +private static final String DEFAULT_CONTENT_TYPE = "application/json"; +private String defaultEncoding = "ISO-8859-1"; +private ObjectMapper mapper = new ObjectMapper(); + +public void toObject(Reader in, Object target) throws IOException { + +mapper.configure(Feature.WRITE_NULL_MAP_VALUES, false); +ObjectReader or = mapper.readerForUpdating(target); +or.readValue(in); //, new TypeReference); +} + +public String fromObject(Object obj, String resultCode, Writer stream) throws IOException { +mapper.configure(Feature.WRITE_NULL_MAP_VALUES, false); +mapper.writeValue(stream, obj); +return null; +} + +public String getContentType(
svn commit: r1221462 - /struts/struts2/trunk/xwork-core/src/main/resources/com/opensymphony/xwork2/validator/validators/default.xml
Author: jogep Date: Tue Dec 20 19:54:24 2011 New Revision: 1221462 URL: http://svn.apache.org/viewvc?rev=1221462&view=rev Log: WW-3727: com/opensymphony/xwork2/validator/default.xml uses old DTD Modified: struts/struts2/trunk/xwork-core/src/main/resources/com/opensymphony/xwork2/validator/validators/default.xml Modified: struts/struts2/trunk/xwork-core/src/main/resources/com/opensymphony/xwork2/validator/validators/default.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/resources/com/opensymphony/xwork2/validator/validators/default.xml?rev=1221462&r1=1221461&r2=1221462&view=diff == --- struts/struts2/trunk/xwork-core/src/main/resources/com/opensymphony/xwork2/validator/validators/default.xml (original) +++ struts/struts2/trunk/xwork-core/src/main/resources/com/opensymphony/xwork2/validator/validators/default.xml Tue Dec 20 19:54:24 2011 @@ -1,7 +1,7 @@ http://struts.apache.org/dtds/xwork-validator-config-1.0.dtd";> +"-//Apache Struts//XWork Validator Definition 1.0//EN" +"http://struts.apache.org/dtds/xwork-validator-definition-1.0.dtd";>
svn commit: r1240312 - /struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js
Author: jogep Date: Fri Feb 3 19:44:51 2012 New Revision: 1240312 URL: http://svn.apache.org/viewvc?rev=1240312&view=rev Log: WW-3736: Client Validation is broken for Struts2 themes Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js?rev=1240312&r1=1240311&r2=1240312&view=diff == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js (original) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/utils.js Fri Feb 3 19:44:51 2012 @@ -24,11 +24,16 @@ var StrutsUtils = {}; // gets an object with validation errors from string returned by // the ajaxValidation interceptor StrutsUtils.getValidationErrors = function(data) { - if(data.indexOf("/* {") === 0) { -return eval("( " + data.substring(2, data.length - 2) + " )"); - } else { -return null; - } +if (typeof data === "object") { +return data; +} +else { +if (data.indexOf("/* {") === 0) { +return eval("( " + data.substring(2, data.length - 2) + " )"); +} else { +return null; +} +} }; StrutsUtils.clearValidationErrors = function(form) {
svn commit: r1241573 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java
Author: jogep Date: Tue Feb 7 19:41:45 2012 New Revision: 1241573 URL: http://svn.apache.org/viewvc?rev=1241573&view=rev Log: WW-3750: ScopesHashModel calls OgnlValueStack.findValue too many times during rendering freemarker templates Patch provided by Pelladi Gabor Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java?rev=1241573&r1=1241572&r2=1241573&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java Tue Feb 7 19:41:45 2012 @@ -21,19 +21,18 @@ package org.apache.struts2.views.freemarker; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - import com.opensymphony.xwork2.util.ValueStack; - import freemarker.template.ObjectWrapper; import freemarker.template.SimpleHash; import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException; -import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** @@ -53,7 +52,8 @@ public class ScopesHashModel extends Sim private ServletContext servletContext; private ValueStack stack; private final Map unlistedModels = new HashMap(); - +private final Map stackCache = new ConcurrentHashMap(); +private static final Object NULL_OBJECT = new Object(); public ScopesHashModel(ObjectWrapper objectWrapper, ServletContext context, HttpServletRequest request, ValueStack stack) { super(objectWrapper); @@ -90,7 +90,7 @@ public class ScopesHashModel extends Sim if (stack != null) { -Object obj = stack.findValue(key); +Object obj = findValueOnStack(key); if (obj != null) { return wrap(obj); @@ -142,6 +142,24 @@ public class ScopesHashModel extends Sim return null; } +private Object findValueOnStack(final String key) { +if (this.stackCache.containsKey(key)) { +final Object value = this.stackCache.get(key); +if (value == NULL_OBJECT) { +return null; +} +return value; +} + +final Object value = this.stack.findValue(key); +if (value == null) { +this.stackCache.put(key, NULL_OBJECT); +} else { +this.stackCache.put(key, value); +} +return value; +} + public void put(String string, boolean b) { super.put(string, b); }
svn commit: r1243174 - in /struts/struts2/trunk/archetypes: struts2-archetype-blank/ struts2-archetype-blank/src/main/resources/META-INF/ struts2-archetype-blank/src/main/resources/META-INF/maven/ str
Author: jogep Date: Sat Feb 11 22:33:36 2012 New Revision: 1243174 URL: http://svn.apache.org/viewvc?rev=1243174&view=rev Log: WW-3738: Struts2 Maven Archetypes are broken Added: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/maven/archetype.xml (contents, props changed) - copied, changed from r1241553, struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/archetype.xml struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/maven/archetype.xml - copied, changed from r1241553, struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/archetype.xml Removed: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/archetype.xml struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/archetype.xml struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/archetype.xml struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/archetype.xml struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/archetype.xml struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/META-INF/archetype.xml Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-convention/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-plugin/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-portlet/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-starter/pom.xml Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml?rev=1243174&r1=1243173&r2=1243174&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml Sat Feb 11 22:33:36 2012 @@ -9,6 +9,7 @@ 4.0.0 struts2-archetype-blank 2.3.2-SNAPSHOT +jar Struts 2 Archetypes - Blank @@ -28,6 +29,8 @@ true **/pom.xml +**/archetype.xml +**/archetype-metadata.xml Copied: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/maven/archetype.xml (from r1241553, struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/archetype.xml) URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/maven/archetype.xml?p2=struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/maven/archetype.xml&p1=struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/archetype.xml&r1=1241553&r2=1243174&rev=1243174&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/archetype.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/META-INF/maven/archetype.xml Sat Feb 11 22:33:36 2012 @@ -1,5 +1,8 @@ - - +http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0"; +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"; +> struts2-archetype-blank
svn commit: r1244929 - in /struts/struts2/trunk/archetypes: struts2-archetype-blank/ struts2-archetype-blank/src/main/resources/archetype-resources/ struts2-archetype-blank/src/main/resources/archetyp
Author: jogep Date: Thu Feb 16 11:02:27 2012 New Revision: 1244929 URL: http://svn.apache.org/viewvc?rev=1244929&view=rev Log: WW-3738: Struts2 Maven Archetypes are broken Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example/package_es.properties struts/struts2/trunk/archetypes/struts2-archetype-convention/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/archetype-resources/src/main/resources/package_es.properties struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-plugin/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-portlet/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/archetype-resources/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-starter/pom.xml struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/archetype-resources/pom.xml Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml?rev=1244929&r1=1244928&r2=1244929&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-blank/pom.xml Thu Feb 16 11:02:27 2012 @@ -28,12 +28,43 @@ src/main/resources true -**/pom.xml -**/archetype.xml -**/archetype-metadata.xml +**/*.* + + + + src/main/resources/archetype-resources/src +false + +**/*.* + + + +org.apache.maven.archetype +archetype-packaging +2.0 + + + + + + +org.apache.maven.plugins +maven-resources-plugin +2.5 + +\ +UTF-8 + + + +maven-archetype-plugin +2.0 + + + Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml?rev=1244929&r1=1244928&r2=1244929&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/pom.xml Thu Feb 16 11:02:27 2012 @@ -2,11 +2,11 @@ http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> 4.0.0 -${groupId} -${artifactId} -${project.version} +\${groupId} +\${artifactId} +\${version} war -Struts 2 Blank Webapp +\${artifactId} ${project.version} @@ -17,19 +17,19 @@ org.apache.struts struts2-core -${struts2.version} +\${struts2.version} org.apache.struts struts2-config-browser-plugin -${struts2.version} +\${struts2.version} org.apache.struts struts2-junit-plugin -${struts2.version} +\${struts2.version} test @@ -56,7 +56,7 @@ org.springframework spring-core -2.5 +3.0.5.RELEASE test Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/main/resources/example/package_es.prop
svn commit: r1338360 - /struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java
Author: jogep Date: Mon May 14 19:42:11 2012 New Revision: 1338360 URL: http://svn.apache.org/viewvc?rev=1338360&view=rev Log: WW-3815: Dispatching after action phase renders with different stack/TextProvider Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java?rev=1338360&r1=1338359&r2=1338360&view=diff == --- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java (original) +++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java Mon May 14 19:42:11 2012 @@ -35,10 +35,7 @@ import javax.portlet.ActionResponse; import javax.portlet.RenderRequest; import java.util.Map; -import static org.apache.struts2.portlet.PortletConstants.EVENT_ACTION; -import static org.apache.struts2.portlet.PortletConstants.REQUEST; -import static org.apache.struts2.portlet.PortletConstants.RESPONSE; -import static org.apache.struts2.portlet.PortletConstants.STACK_FROM_EVENT_PHASE; +import static org.apache.struts2.portlet.PortletConstants.*; public class PortletStateInterceptor extends AbstractInterceptor { @@ -83,7 +80,7 @@ public class PortletStateInterceptor ext CompoundRoot oldRoot = oldStack.getRoot(); ValueStack currentStack = invocation.getStack(); CompoundRoot root = currentStack.getRoot(); - root.addAll(oldRoot); + root.addAll(0, oldRoot); if (LOG.isDebugEnabled()) LOG.debug("Restored stack"); } }
svn commit: r1351491 - /struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl
Author: jogep Date: Mon Jun 18 21:20:49 2012 New Revision: 1351491 URL: http://svn.apache.org/viewvc?rev=1351491&view=rev Log: WW-3842: The OptionTransferSelect tag doesn't recognize the attribute doubleOnmouseup and doubleOnmouseover Modified: struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl Modified: struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl?rev=1351491&r1=1351490&r2=1351491&view=diff == --- struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl (original) +++ struts/struts2/trunk/core/src/main/resources/template/simple/optiontransferselect.ftl Mon Jun 18 21:20:49 2012 @@ -214,11 +214,14 @@ onmousedown="${parameters.doubleOnmousedown?html}" <#t/> <#if parameters.doubleOnmouseup??><#t/> -onmouseup="${parameters.doubleMnmouseup?html}" +onmouseup="${parameters.doubleOnmouseup?html}" <#t/> <#if parameters.doubleOnmousemove??><#t/> onmousemove="${parameters.doubleOnmousemove?html}" <#t/> +<#if parameters.doubleOnmouseover??><#t/> +onmouseover="${parameters.doubleOnmouseover?html}" +<#t/> <#if parameters.doubleOnmouseout??><#t/> onmouseout="${parameters.doubleOnmouseout?html}" <#t/>
svn commit: r1356449 - /struts/site/src/site/xdoc/mail.xml
Author: jogep Date: Mon Jul 2 20:10:28 2012 New Revision: 1356449 URL: http://svn.apache.org/viewvc?rev=1356449&view=rev Log: Remove Link to WebWorks Forum. It does not exists anymore. Modified: struts/site/src/site/xdoc/mail.xml Modified: struts/site/src/site/xdoc/mail.xml URL: http://svn.apache.org/viewvc/struts/site/src/site/xdoc/mail.xml?rev=1356449&r1=1356448&r2=1356449&view=diff == --- struts/site/src/site/xdoc/mail.xml (original) +++ struts/site/src/site/xdoc/mail.xml Mon Jul 2 20:10:28 2012 @@ -292,13 +292,6 @@ limitations under the License. http://www.nabble.com/Struts---User-f206.html";> Nabble - -Struts 2 is derived from WebWork 2, -and the many of the posts on the WebWork list -also apply to Struts 2 -- -http://forums.opensymphony.com/forum.jspa?forumID=1";> - WebWork User Forum -
svn commit: r1356455 - /struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp
Author: jogep Date: Mon Jul 2 20:16:38 2012 New Revision: 1356455 URL: http://svn.apache.org/viewvc?rev=1356455&view=rev Log: MailReader App is not active anymore. Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp?rev=1356455&r1=1356454&r2=1356455&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp (original) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/showcase.jsp Mon Jul 2 20:16:38 2012 @@ -23,10 +23,6 @@ For more "by example" solutions, see the http://struts.apache.org/2.x/docs/cookbook.html";>Struts Cookbook pages. - -For a "best practices" example, see the -http://planetstruts.org/struts2-mailreader/";>MailReader application Tour and source code. -
svn commit: r1366884 - in /struts/struts2/trunk: apps/showcase/src/main/java/org/apache/struts2/showcase/ apps/showcase/src/main/resources/ apps/showcase/src/main/webapp/tags/ui/ core/src/main/java/or
Author: jogep Date: Sun Jul 29 18:23:06 2012 New Revision: 1366884 URL: http://svn.apache.org/viewvc?rev=1366884&view=rev Log: WW-3846 Add a new attributes for optionsCollection Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java struts/struts2/trunk/apps/showcase/src/main/resources/log4j.properties struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractListTag.java struts/struts2/trunk/core/src/main/resources/template/simple/combobox.ftl struts/struts2/trunk/core/src/main/resources/template/simple/doubleselect.ftl struts/struts2/trunk/core/src/main/resources/template/simple/radiomap.ftl struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl struts/struts2/trunk/core/src/site/resources/tags/checkboxlist.html struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html struts/struts2/trunk/core/src/site/resources/tags/inputtransferselect.html struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html struts/struts2/trunk/core/src/site/resources/tags/radio.html struts/struts2/trunk/core/src/site/resources/tags/select.html struts/struts2/trunk/core/src/site/resources/tags/updownselect.html Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java?rev=1366884&r1=1366883&r2=1366884&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java (original) +++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/UITagExample.java Sun Jul 29 18:23:06 2012 @@ -26,12 +26,7 @@ import com.opensymphony.xwork2.util.Valu import org.apache.struts2.ServletActionContext; import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** */ @@ -67,9 +62,9 @@ public class UITagExample extends Action String thoughts; public UITagExample() { -favouriteLanguages.add(new Language("EnglishKey", "English Language")); -favouriteLanguages.add(new Language("FrenchKey", "French Language")); -favouriteLanguages.add(new Language("SpanishKey", "Spanish Language")); +favouriteLanguages.add(new Language("EnglishKey", "English Language", "color: blue; font-style: italic;")); +favouriteLanguages.add(new Language("FrenchKey", "French Language", "color: grey;")); +favouriteLanguages.add(new Language("SpanishKey", "Spanish Language", "color: red; font-wight: bold;")); VehicalType car = new VehicalType("CarKey", "Car"); VehicalType motorcycle = new VehicalType("MotorcycleKey", "Motorcycle"); @@ -268,10 +263,12 @@ public class UITagExample extends Action public static class Language { String description; String key; +String style; -public Language(String key, String description) { +public Language(String key, String description, String style) { this.key = key; this.description = description; +this.style = style; } public String getKey() { @@ -280,6 +277,9 @@ public class UITagExample extends Action public String getDescription() { return description; } +public String getStyle() { +return style; +} } Modified: struts/struts2/trunk/apps/showcase/src/main/resources/log4j.properties URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/resources/log4j.properties?rev=1366884&r1=1366883&r2=1366884&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/resources/log4j.properties (original) +++ struts/struts2/trunk/apps/showcase/src/main/resources/log4j.properties Sun Jul 29 18:23:06 2012 @@ -24,7 +24,7 @@ log4j.logger.noModule=FATAL # OpenSymphony Stuff log4j.logger.com.opensymphony=INFO -log4j.logger.org.apache.struts2=DEBUG +log4j.logger.org.apache.struts2=INFO # Spring Stuff log4j.logger.org.springframework=INFO Modified: st
svn commit: r1366934 - /struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl
Author: jogep Date: Sun Jul 29 20:10:06 2012 New Revision: 1366934 URL: http://svn.apache.org/viewvc?rev=1366934&view=rev Log: WW-3846 Add a new attributes for optionsCollection Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl Modified: struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl?rev=1366934&r1=1366933&r2=1366934&view=diff == --- struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl (original) +++ struts/struts2/trunk/core/src/main/resources/template/simple/checkboxlist.ftl Sun Jul 29 20:10:06 2012 @@ -34,6 +34,27 @@ <#else> <#assign itemValue = stack.findString('top')/> +<#if parameters.listCssClass??> +<#if stack.findString(parameters.listCssClass)??> + <#assign itemCssClass= stack.findString(parameters.listCssClass)/> +<#else> + <#assign itemCssClass = ''/> + + +<#if parameters.listCssStyle??> +<#if stack.findString(parameters.listCssStyle)??> + <#assign itemCssStyle= stack.findString(parameters.listCssStyle)/> +<#else> + <#assign itemCssStyle = ''/> + + +<#if parameters.listTitle??> +<#if stack.findString(parameters.listTitle)??> + <#assign itemTitle= stack.findString(parameters.listTitle)/> +<#else> + <#assign itemTitle = ''/> + + <#assign itemKeyStr=itemKey.toString() /> @@ -43,8 +64,26 @@ <#if parameters.disabled?default(false)> disabled="disabled"<#rt/> -<#if parameters.title??> - title="${parameters.title?html}"<#rt/> +<#if itemCssClass?if_exists != ""> + class="${itemCssClass?html}"<#rt/> +<#else> +<#if parameters.cssClass??> + class="${parameters.cssClass?html}"<#rt/> + + +<#if itemCssStyle?if_exists != ""> + style="${itemCssStyle?html}"<#rt/> +<#else> +<#if parameters.cssStyle??> + style="${parameters.cssStyle?html}"<#rt/> + + +<#if itemTitle?if_exists != ""> + title="${itemTitle?html}"<#rt/> +<#else> +<#if parameters.title??> + title="${parameters.title?html}"<#rt/> + <#include "/${parameters.templateDir}/simple/css.ftl" /> <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
svn commit: r1367168 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractDoubleListTag.java
Author: jogep Date: Mon Jul 30 16:51:53 2012 New Revision: 1367168 URL: http://svn.apache.org/viewvc?rev=1367168&view=rev Log: WW-3846 Add a new attributes for optionsCollection Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractDoubleListTag.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractDoubleListTag.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractDoubleListTag.java?rev=1367168&r1=1367167&r2=1367168&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractDoubleListTag.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractDoubleListTag.java Mon Jul 30 16:51:53 2012 @@ -31,6 +31,9 @@ public abstract class AbstractDoubleList protected String doubleList; protected String doubleListKey; protected String doubleListValue; +protected String doubleListCssClass; +protected String doubleListCssStyle; +protected String doubleListTitle; protected String doubleName; protected String doubleValue; protected String formName; @@ -76,6 +79,9 @@ public abstract class AbstractDoubleList bean.setDoubleList(doubleList); bean.setDoubleListKey(doubleListKey); bean.setDoubleListValue(doubleListValue); +bean.setDoubleListCssClass(doubleListCssClass); +bean.setDoubleListCssStyle(doubleListCssStyle); +bean.setDoubleListTitle(doubleListTitle); bean.setDoubleName(doubleName); bean.setDoubleValue(doubleValue); bean.setFormName(formName); @@ -127,6 +133,18 @@ public abstract class AbstractDoubleList this.doubleListValue = listValue; } +public void setDoubleListCssClass(String doubleListCssClass) { +this.doubleListCssClass = doubleListCssClass; +} + +public void setDoubleListCssStyle(String doubleListCssStyle) { +this.doubleListCssStyle = doubleListCssStyle; +} + +public void setDoubleListTitle(String doubleListTitle) { +this.doubleListTitle = doubleListTitle; +} + public void setDoubleName(String aName) { doubleName = aName; }
svn commit: r1367769 - in /struts/struts2/trunk/archetypes: struts2-archetype-convention/src/main/resources/META-INF/maven/ struts2-archetype-dbportlet/src/main/resources/META-INF/maven/ struts2-arche
Author: jogep Date: Tue Jul 31 20:47:43 2012 New Revision: 1367769 URL: http://svn.apache.org/viewvc?rev=1367769&view=rev Log: WW-3856 Archetypes are missing some files Added: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/maven/ struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/maven/archetype-metadata.xml struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/maven/ struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/maven/ struts/struts2/trunk/archetypes/struts2-archetype-portlet/src/main/resources/META-INF/maven/archetype-metadata.xml struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/META-INF/maven/ struts/struts2/trunk/archetypes/struts2-archetype-starter/src/main/resources/META-INF/maven/archetype-metadata.xml Modified: struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/maven/archetype-metadata.xml Modified: struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/maven/archetype-metadata.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1367769&r1=1367768&r2=1367769&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/maven/archetype-metadata.xml (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-convention/src/main/resources/META-INF/maven/archetype-metadata.xml Tue Jul 31 20:47:43 2012 @@ -24,6 +24,13 @@ +src/main/resources + +**/*.xml + + + + src/main/webapp **/*.jsp Added: struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/maven/archetype-metadata.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1367769&view=auto == --- struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/maven/archetype-metadata.xml (added) +++ struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/src/main/resources/META-INF/maven/archetype-metadata.xml Tue Jul 31 20:47:43 2012 @@ -0,0 +1,41 @@ + + + + + +src/main/java + +**/*.java + + + + +src/test/java + +**/*.java + + + + +src/main/resources + +**/*.xml + + + + +src/main/webapp + +**/*.jsp + + + + +src/main/webapp/WEB-INF + +**/*.xml + + + + + Added: struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1367769&view=auto == --- struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml (added) +++ struts/struts2/trunk/archetypes/struts2-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml Tue Jul 31 20:47:43 2012 @@ -0,0 +1,42 @@ + + + + + +src/main/java + +**/*.java + + + + +src/test/java + +**/*.java + + + + +src/main/resources + +**/*.xml + + + + +src/main/webapp + +**/*.jsp + + + + +src/main + +**/*.xml +**/*.txt + + + + + Added: 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=1367769&view=auto == --- struts/struts2/trunk/archetypes/struts
svn commit: r1376638 - /struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/ConfigTest.java
Author: jogep Date: Thu Aug 23 18:30:10 2012 New Revision: 1376638 URL: http://svn.apache.org/viewvc?rev=1376638&view=rev Log: WW-3864: struts2-archetype-blank compile error Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/ConfigTest.java Modified: struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/ConfigTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/ConfigTest.java?rev=1376638&r1=1376637&r2=1376638&view=diff == --- struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/ConfigTest.java (original) +++ struts/struts2/trunk/archetypes/struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example/ConfigTest.java Thu Aug 23 18:30:10 2012 @@ -62,7 +62,7 @@ public class ConfigTest extends StrutsTe protected void setUp() throws Exception { super.setUp(); XmlConfigurationProvider c = new XmlConfigurationProvider("struts.xml"); -configurationManager.addConfigurationProvider(c); +configurationManager.addContainerProvider(c); configurationManager.reload(); }
svn commit: r1389534 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/ main/java/org/apache/struts2/views/jsp/ui/ main/resources/template/simple/ site/resources/tags/ test/
Author: jogep Date: Mon Sep 24 19:43:44 2012 New Revision: 1389534 URL: http://svn.apache.org/viewvc?rev=1389534&view=rev Log: WW-388: Update UI tags in FreeMarker to allow new HTML input types Added: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-7.txt Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TextField.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TextFieldTag.java struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl struts/struts2/trunk/core/src/site/resources/tags/combobox.html struts/struts2/trunk/core/src/site/resources/tags/password.html struts/struts2/trunk/core/src/site/resources/tags/textfield.html struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TextField.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TextField.java?rev=1389534&r1=1389533&r2=1389534&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TextField.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TextField.java Mon Sep 24 19:43:44 2012 @@ -21,13 +21,12 @@ package org.apache.struts2.components; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import com.opensymphony.xwork2.util.ValueStack; import org.apache.struts2.views.annotations.StrutsTag; import org.apache.struts2.views.annotations.StrutsTagAttribute; -import com.opensymphony.xwork2.util.ValueStack; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @@ -67,6 +66,7 @@ public class TextField extends UIBean { protected String maxlength; protected String readonly; protected String size; +protected String type; public TextField(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); @@ -90,6 +90,11 @@ public class TextField extends UIBean { if (readonly != null) { addParameter("readonly", findValue(readonly, Boolean.class)); } + +if (type != null) { +addParameter("type", findString(type)); +} + } @StrutsTagAttribute(description="HTML maxlength attribute", type="Integer") @@ -111,4 +116,9 @@ public class TextField extends UIBean { public void setSize(String size) { this.size = size; } + +@StrutsTagAttribute(description="Specifies the html5 type element to display. e.g. text, email, url", defaultValue="text") +public void setType(String type) { +this.type = type; +} } Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TextFieldTag.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TextFieldTag.java?rev=1389534&r1=1389533&r2=1389534&view=diff == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TextFieldTag.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TextFieldTag.java Mon Sep 24 19:43:44 2012 @@ -21,13 +21,12 @@ package org.apache.struts2.views.jsp.ui; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - +import com.opensymphony.xwork2.util.ValueStack; import org.apache.struts2.components.Component; import org.apache.struts2.components.TextField; -import com.opensymphony.xwork2.util.ValueStack; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @see TextField @@ -39,6 +38,7 @@ public class TextFieldTag extends Abstra protected String maxlength; protected String readonly; protected String size; +protected String type; public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return new TextField(stack, req, res); @@ -51,6 +51,7 @@ public class TextFieldTag extends Abstra textField.setMaxlength(maxlength); textField.setReadonly(readonly); textField.setSize(size); +textField.setType(type); } /** @@ -71,4 +72,8 @@ public class TextFieldTag extends Abstra public void setSize(String size) { this.size = size; } + +public void setType(String type) { +this.type = type; +} } Modified: struts/struts2/trunk/core/src/main/resources/template/simple/text.ftl URL: http://svn.apache.org/viewvc/struts/
svn commit: r1397692 [3/3] - in /struts/struts2/trunk/apps/rest-showcase: ./ src/main/resources/ src/main/webapp/WEB-INF/content/ src/main/webapp/css/ src/main/webapp/img/
Added: struts/struts2/trunk/apps/rest-showcase/src/main/webapp/css/bootstrap.min.css URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/rest-showcase/src/main/webapp/css/bootstrap.min.css?rev=1397692&view=auto == --- struts/struts2/trunk/apps/rest-showcase/src/main/webapp/css/bootstrap.min.css (added) +++ struts/struts2/trunk/apps/rest-showcase/src/main/webapp/css/bootstrap.min.css Fri Oct 12 19:04:04 2012 @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.1.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. [... 2 lines stripped ...] Added: struts/struts2/trunk/apps/rest-showcase/src/main/webapp/img/glyphicons-halflings-white.png URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/rest-showcase/src/main/webapp/img/glyphicons-halflings-white.png?rev=1397692&view=auto == Binary file - no diff available. Propchange: struts/struts2/trunk/apps/rest-showcase/src/main/webapp/img/glyphicons-halflings-white.png -- svn:mime-type = application/octet-stream Added: struts/struts2/trunk/apps/rest-showcase/src/main/webapp/img/glyphicons-halflings.png URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/rest-showcase/src/main/webapp/img/glyphicons-halflings.png?rev=1397692&view=auto == Binary file - no diff available. Propchange: struts/struts2/trunk/apps/rest-showcase/src/main/webapp/img/glyphicons-halflings.png -- svn:mime-type = application/octet-stream
svn commit: r1398832 - /struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml
Author: jogep Date: Tue Oct 16 14:54:44 2012 New Revision: 1398832 URL: http://svn.apache.org/viewvc?rev=1398832&view=rev Log: WW-3899 Person Manager Example in Struts2 Showcase does not work Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml?rev=1398832&r1=1398831&r2=1398832&view=diff == --- struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml (original) +++ struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml Tue Oct 16 14:54:44 2012 @@ -17,6 +17,9 @@ + + +
svn commit: r1400229 [3/3] - in /struts/struts2/trunk/apps/showcase/src/main/webapp: img/ js/ styles/
Added: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/bootstrap.min.css URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/styles/bootstrap.min.css?rev=1400229&view=auto == --- struts/struts2/trunk/apps/showcase/src/main/webapp/styles/bootstrap.min.css (added) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/styles/bootstrap.min.css Fri Oct 19 19:00:02 2012 @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.1.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. [... 2 lines stripped ...] Added: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/prettify.css URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/styles/prettify.css?rev=1400229&view=auto == --- struts/struts2/trunk/apps/showcase/src/main/webapp/styles/prettify.css (added) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/styles/prettify.css Fri Oct 19 19:00:02 2012 @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file
svn commit: r1413873 - /struts/site/branches/site2fluidomigration/src/site/xdoc/dev/volunteers.xml
Author: jogep Date: Mon Nov 26 21:35:07 2012 New Revision: 1413873 URL: http://svn.apache.org/viewvc?rev=1413873&view=rev Log: move myself to the pmc section Modified: struts/site/branches/site2fluidomigration/src/site/xdoc/dev/volunteers.xml Modified: struts/site/branches/site2fluidomigration/src/site/xdoc/dev/volunteers.xml URL: http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/xdoc/dev/volunteers.xml?rev=1413873&r1=1413872&r2=1413873&view=diff == --- struts/site/branches/site2fluidomigration/src/site/xdoc/dev/volunteers.xml (original) +++ struts/site/branches/site2fluidomigration/src/site/xdoc/dev/volunteers.xml Mon Nov 26 21:35:07 2012 @@ -139,6 +139,10 @@ limitations under the License. Maurizio Cucchiara (mcucchiara at apache.org) + +Johannes Geppert + (jogep at apache.org) + @@ -188,10 +192,6 @@ limitations under the License. (jafl at apache.org) -Johannes Geppert - (jogep at apache.org) - - Christian Grobmeier (grobmeier at apache.org)
svn commit: r1414332 - in /struts/site/branches/site2fluidomigration/src/site: resources/css/site.css site.xml
Author: jogep Date: Tue Nov 27 19:26:45 2012 New Revision: 1414332 URL: http://svn.apache.org/viewvc?rev=1414332&view=rev Log: add github ribbon Modified: struts/site/branches/site2fluidomigration/src/site/resources/css/site.css struts/site/branches/site2fluidomigration/src/site/site.xml Modified: struts/site/branches/site2fluidomigration/src/site/resources/css/site.css URL: http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/resources/css/site.css?rev=1414332&r1=1414331&r2=1414332&view=diff == --- struts/site/branches/site2fluidomigration/src/site/resources/css/site.css (original) +++ struts/site/branches/site2fluidomigration/src/site/resources/css/site.css Tue Nov 27 19:26:45 2012 @@ -51,3 +51,5 @@ a:visited {color: #00438a;} float: right; } +#bannerRight img { margin-right: 80px; } + Modified: struts/site/branches/site2fluidomigration/src/site/site.xml URL: http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/site.xml?rev=1414332&r1=1414331&r2=1414332&view=diff == --- struts/site/branches/site2fluidomigration/src/site/site.xml (original) +++ struts/site/branches/site2fluidomigration/src/site/site.xml Tue Nov 27 19:26:45 2012 @@ -13,6 +13,11 @@ false true true + +apache/struts2 +right +darkblue +
svn commit: r1414407 - /struts/site/branches/site2fluidomigration/src/site/resources/css/site.css
Author: jogep Date: Tue Nov 27 21:36:24 2012 New Revision: 1414407 URL: http://svn.apache.org/viewvc?rev=1414407&view=rev Log: fix github ribbon overwrites links to struts2 and struts 1 Modified: struts/site/branches/site2fluidomigration/src/site/resources/css/site.css Modified: struts/site/branches/site2fluidomigration/src/site/resources/css/site.css URL: http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/resources/css/site.css?rev=1414407&r1=1414406&r2=1414407&view=diff == --- struts/site/branches/site2fluidomigration/src/site/resources/css/site.css (original) +++ struts/site/branches/site2fluidomigration/src/site/resources/css/site.css Tue Nov 27 21:36:24 2012 @@ -53,3 +53,5 @@ a:visited {color: #00438a;} #bannerRight img { margin-right: 80px; } +.breadcrumb { padding-right: 130px; } +
svn commit: r1414410 - /struts/site/branches/site2fluidomigration/src/site/site.xml
Author: jogep Date: Tue Nov 27 21:47:44 2012 New Revision: 1414410 URL: http://svn.apache.org/viewvc?rev=1414410&view=rev Log: Remove Related Projects, Similar Projects and Java 5 for Struts 1Menus Modified: struts/site/branches/site2fluidomigration/src/site/site.xml Modified: struts/site/branches/site2fluidomigration/src/site/site.xml URL: http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/site.xml?rev=1414410&r1=1414409&r2=1414410&view=diff == --- struts/site/branches/site2fluidomigration/src/site/site.xml (original) +++ struts/site/branches/site2fluidomigration/src/site/site.xml Tue Nov 27 21:47:44 2012 @@ -88,10 +88,6 @@ href="kickstart.html" /> -http://people.apache.org/~vgritsenko/stats/projects/struts"; /> @@ -183,65 +179,6 @@ /> - -http://beehive.apache.org/"; -/> -http://myfaces.apache.org/"; -/> -http://tomcat.apache.org/"; -/> -http://commons.apache.org/"; -/> -http://velocity.apache.org/tools/devel/struts/"; -/> - - - - -http://cocoon.apache.org/"; -/> -http://tapestry.apache.org/"; -/> -http://turbine.apache.org/"; -/> -http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html"; -/> -http://www.stripesframework.org/"; -/> -http://wicket.apache.org/"; -/> - - - -http://strecks.sourceforge.net//"; -/> - - -
svn commit: r1414413 - /struts/site/branches/site2fluidomigration/src/site/site.xml
Author: jogep Date: Tue Nov 27 21:49:42 2012 New Revision: 1414413 URL: http://svn.apache.org/viewvc?rev=1414413&view=rev Log: Add missing http to facebook integration script Modified: struts/site/branches/site2fluidomigration/src/site/site.xml Modified: struts/site/branches/site2fluidomigration/src/site/site.xml URL: http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/site.xml?rev=1414413&r1=1414412&r2=1414413&view=diff == --- struts/site/branches/site2fluidomigration/src/site/site.xml (original) +++ struts/site/branches/site2fluidomigration/src/site/site.xml Tue Nov 27 21:49:42 2012 @@ -39,7 +39,7 @@ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; -js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; +js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1";; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
svn commit: r1431482 - in /struts/struts2/trunk: ./ xwork-core/ xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/ xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/
Author: jogep Date: Thu Jan 10 16:26:26 2013 New Revision: 1431482 URL: http://svn.apache.org/viewvc?rev=1431482&view=rev Log: WW-3959 Support for Slf4j as optional XWork Logging Backend Added: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/Slf4jLogger.java struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/Slf4jLoggerFactory.java Modified: struts/struts2/trunk/pom.xml struts/struts2/trunk/xwork-core/pom.xml struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/LoggerFactory.java Modified: struts/struts2/trunk/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/pom.xml?rev=1431482&r1=1431481&r2=1431482&view=diff == --- struts/struts2/trunk/pom.xml (original) +++ struts/struts2/trunk/pom.xml Thu Jan 10 16:26:26 2013 @@ -652,6 +652,17 @@ +org.slf4j +slf4j-api +1.7.2 + + +org.slf4j +slf4j-simple +1.7.2 + + + org.testng testng 5.1 Modified: struts/struts2/trunk/xwork-core/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/pom.xml?rev=1431482&r1=1431481&r2=1431482&view=diff == --- struts/struts2/trunk/xwork-core/pom.xml (original) +++ struts/struts2/trunk/xwork-core/pom.xml Thu Jan 10 16:26:26 2013 @@ -268,6 +268,17 @@ test + + +org.slf4j +slf4j-api +true + + +org.slf4j +slf4j-simple +true + Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/LoggerFactory.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/LoggerFactory.java?rev=1431482&r1=1431481&r2=1431482&view=diff == --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/LoggerFactory.java (original) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/LoggerFactory.java Thu Jan 10 16:26:26 2013 @@ -16,6 +16,7 @@ package com.opensymphony.xwork2.util.logging; import com.opensymphony.xwork2.util.logging.jdk.JdkLoggerFactory; +import com.opensymphony.xwork2.util.logging.slf4j.Slf4jLoggerFactory; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -59,11 +60,17 @@ public abstract class LoggerFactory { try { if (factory == null) { try { -Class.forName("org.apache.commons.logging.LogFactory"); -factory = new com.opensymphony.xwork2.util.logging.commons.CommonsLoggerFactory(); +Class.forName("org.slf4j.LoggerFactory"); +factory = new Slf4jLoggerFactory(); } catch (ClassNotFoundException ex) { -// commons logging not found, falling back to jdk logging -factory = new JdkLoggerFactory(); +//slf4j not found try commons LogFactory +try { +Class.forName("org.apache.commons.logging.LogFactory"); +factory = new com.opensymphony.xwork2.util.logging.commons.CommonsLoggerFactory(); +} catch (ClassNotFoundException cnfex) { +// commons logging not found, falling back to jdk logging +factory = new JdkLoggerFactory(); +} } } return factory; Added: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/Slf4jLogger.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/Slf4jLogger.java?rev=1431482&view=auto == --- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/Slf4jLogger.java (added) +++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/logging/slf4j/Slf4jLogger.java Thu Jan 10 16:26:26 2013 @@ -0,0 +1,108 @@ +/* + * Copyright 2002-2006,2009 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you ma
svn commit: r1482582 - /struts/site/trunk/content/xdoc/dev/volunteers.xml
Author: jogep Date: Tue May 14 20:51:59 2013 New Revision: 1482582 URL: http://svn.apache.org/r1482582 Log: Move Christian Grobmeier to PMC section Modified: struts/site/trunk/content/xdoc/dev/volunteers.xml Modified: struts/site/trunk/content/xdoc/dev/volunteers.xml URL: http://svn.apache.org/viewvc/struts/site/trunk/content/xdoc/dev/volunteers.xml?rev=1482582&r1=1482581&r2=1482582&view=diff == --- struts/site/trunk/content/xdoc/dev/volunteers.xml (original) +++ struts/site/trunk/content/xdoc/dev/volunteers.xml Tue May 14 20:51:59 2013 @@ -133,6 +133,10 @@ limitations under the License. Johannes Geppert (jogep at apache.org) + +Christian Grobmeier +(grobmeier at apache.org) + @@ -181,10 +185,6 @@ limitations under the License. John Lindal (jafl at apache.org) - -Christian Grobmeier -(grobmeier at apache.org) -
svn commit: r1521565 [3/19] - in /struts/struts2/trunk/archetypes/struts2-archetype-angularjs: ./ src/ src/main/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/META-INF/maven/ src
Added: struts/struts2/trunk/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/lib/angular/angular-bootstrap-prettify.min.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/lib/angular/angular-bootstrap-prettify.min.js?rev=1521565&view=auto == --- struts/struts2/trunk/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/lib/angular/angular-bootstrap-prettify.min.js (added) +++ struts/struts2/trunk/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/webapp/js/lib/angular/angular-bootstrap-prettify.min.js Tue Sep 10 17:55:21 2013 @@ -0,0 +1,41 @@ +/* + AngularJS v1.0.8 + (c) 2010-2012 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(u,s,H){'use strict';function F(c){return c.replace(/\&/g,"&").replace(/\/g,">").replace(/"/g,""")}function A(c,e){var b=s.element(""+e+"");c.html("");c.append(b.contents());return c}var w={},x={value:{}},K={"angular.js":"http://code.angularjs.org/"+s.version.full+"/angular.min.js","angular-resource.js":"http://code.angularjs.org/"+s.version.full+"/angular-resource.min.js","angular-sanitize.js":"http://code.angularjs.org/"+s.version.full+"/angular-sanitize.min.js";, +"angular-cookies.js":"http://code.angularjs.org/"+s.version.full+"/angular-cookies.min.js"};w.jsFiddle=function(c,e,b){return{terminal:!0,link:function(n,a,o){function d(a,b){return''}var p={html:"",css:"",js:""};s.forEach(o.jsFiddle.split(" "),function(a,b){var d=a.split(".")[1];p[d]+=d=="html"?b==0?"\n"+c(a,2):"\n\n\n <\!-- CACHE FILE: "+a+' --\>\n \n'+c(a, +4)+" <\/script>\n":c(a)+"\n"});p.html+="