Compare commits

..

1 Commits

Author SHA1 Message Date
Lukasz Lenart e5009a3420 [maven-release-plugin] copy for tag STRUTS_2_3_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1@1212122 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 21:07:36 +00:00
329 changed files with 3618 additions and 5446 deletions
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
@@ -34,9 +34,9 @@
<name>Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/apps/blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/apps/blank</url>
</scm>
<dependencies>
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jboss-blank</artifactId>
@@ -34,9 +34,9 @@
<name>JBoss Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/apps/jboss-blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/apps/jboss-blank</url>
</scm>
<dependencies>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
@@ -34,9 +34,9 @@
<name>Mail Reader Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/apps/mailreader</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/apps/mailreader</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
@@ -42,9 +42,9 @@
</modules>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/apps</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/apps</url>
</scm>
<profiles>
+6 -6
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -34,9 +34,9 @@
<name>Portlet Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/apps/portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/apps/portlet</url>
</scm>
<profiles>
@@ -190,8 +190,8 @@
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>
@@ -22,7 +22,7 @@ package org.apache.struts2.portlet.example.spring;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import com.opensymphony.xwork2.ActionSupport;
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="edit" extends="struts-portlet-default"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="eventing" extends="struts-portlet-default" namespace="/eventing">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="help" extends="struts-portlet-default"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="view" extends="struts-portlet-default"
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-view.xml"/>
@@ -1,3 +1,3 @@
<b>Hello from FreeMarker, ${firstName?html} ${lastName?html}!</b>
<b>Hello from FreeMarker, ${firstName} ${lastName}!</b>
<p/>
<a href="<@s.url action="index"/>">Back to front page</a>
+2 -2
View File
@@ -26,13 +26,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.3.3</version>
<version>2.3.1</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>
@@ -23,8 +23,8 @@
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- Overwrite Convention -->
@@ -20,8 +20,8 @@
<s:iterator value="model">
<tr>
<td>${id}</td>
<td><s:property value="clientName"/></td>
<td><s:property value="amount"/></td>
<td>${clientName}</td>
<td>${amount}</td>
<td><a href="orders/${id}">View</a> |
<a href="orders/${id}/edit">Edit</a> |
<a href="orders/${id}/deleteConfirm">Delete</a></td>
@@ -1,9 +1,7 @@
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="s" uri="/struts-tags" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Order ${id}</title>
@@ -16,11 +14,11 @@
</tr>
<tr>
<th>Client</th>
<td><s:property value="clientName"/></td>
<td>${clientName}</td>
</tr>
<tr>
<th>Amount</th>
<td><s:property value="amount"/></td>
<td>${amount}</td>
</tr>
</table>
<a href="../orders">Back to Orders</a>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
@@ -34,9 +34,9 @@
<name>Showcase Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/apps/showcase</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/apps/showcase</url>
</scm>
@@ -59,7 +59,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
public String execute() throws MalformedURLException, IOException {
if (page != null) {
if (page != null && page.trim().length() > 0) {
InputStream in = ClassLoaderUtil.getResourceAsStream(page.substring(page.indexOf("//")+1), getClass());
page = page.replace("//", "/");
@@ -78,7 +78,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
}
}
if (className != null) {
if (className != null && className.trim().length() > 0) {
className = "/"+className.replace('.', '/') + ".java";
InputStream in = getClass().getResourceAsStream(className);
if (in == null) {
@@ -93,7 +93,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
String rootPath = ServletActionContext.getServletContext().getRealPath("/");
if (config != null && (rootPath == null || config.startsWith(rootPath))) {
if (config != null && config.trim().length() > 0 && (rootPath == null || config.startsWith(rootPath))) {
int pos = config.lastIndexOf(':');
configLine = Integer.parseInt(config.substring(pos+1));
config = config.substring(0, pos).replace("//", "/");
@@ -107,27 +107,21 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
* @param className the className to set
*/
public void setClassName(String className) {
if (className != null && className.trim().length()>0) {
this.className = className;
}
this.className = className;
}
/**
* @param config the config to set
*/
public void setConfig(String config) {
if (config != null && config.trim().length()>0) {
this.config = config;
}
this.config = config;
}
/**
* @param page the page to set
*/
public void setPage(String page) {
if (page != null && page.trim().length()>0) {
this.page = page;
}
this.page = page;
}
/**
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="actionchaining" extends="struts-default" namespace="/actionchaining">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ajax" extends="struts-default">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="chat" extends="struts-default" namespace="/chat">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="conversion" namespace="/conversion" extends="struts-default">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="filedownload" extends="struts-default" namespace="/filedownload">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="fileupload" extends="struts-default" namespace="/fileupload">
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="freemarker" namespace="/freemarker" extends="struts-default">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="hangman" extends="struts-default" namespace="/hangman">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="integration" extends="struts1-default" namespace="/integration">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ognl" namespace="/nodecorate" extends="struts-default">
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="jsf" extends="jsf-default" namespace="/jsf">
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="modelDriven" extends="struts-default" namespace="/modelDriven">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!-- START SNIPPET: xworkSample -->
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="ui-tags" extends="struts-default" namespace="/tags/ui">
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-tags-ui.xml"/>
<include file="struts-tags-non-ui.xml" />
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="tiles" extends="tiles-default" namespace="/tiles">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="token" extends="struts-default" namespace="/token">
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="validation" extends="json-default" namespace="/validation">
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="wait" extends="struts-default" namespace="/wait">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="xslt" extends="struts-default" namespace="/xslt">
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!-- START SNIPPET: xworkSample -->
<struts>
@@ -1,5 +1,5 @@
[
<#list options as option>
["${option?html}"],
["${option}"],
</#list>
]
@@ -1,3 +1,3 @@
Hello, <br/>
Today is ${todayDate?html}, the time now is ${todayTime?html}
Today is ${todayDate}, the time now is ${todayTime}
@@ -1,2 +1,2 @@
Hello, ${name?html}
Hello, ${name}
@@ -1,2 +1,2 @@
So, you are a ${gender?html}
So, you are a ${gender}
@@ -118,7 +118,7 @@
<div class="center">
<div class="box">
<h3>Messages Posted In Room [${roomName?default('')?html}]</h3>
<h3>Messages Posted In Room [${roomName?default('')}]</h3>
<@s.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
@@ -143,7 +143,7 @@
<div class="right">
<div class="box">
<h3>Users Available In Room [${roomName?default('')?html}]</h3>
<h3>Users Available In Room [${roomName?default('')}]</h3>
<@s.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
@@ -1,6 +1,6 @@
<ul>
<#list availableUsers as user>
<li>${user.name?html}</li>
<li>${user.name}</li>
</#list>
</ul>
@@ -6,7 +6,7 @@
<body>
<#list actionMessages as msg>
${msg?html}
${msg}
</#list>
<@s.form action="guess" method="post">
@@ -13,9 +13,9 @@ There are ${peopleCount} people...
</tr>
<#list people as person>
<tr>
<td>${person.id?html}</td>
<td>${person.name?html}</td>
<td>${person.lastName?html}</td>
<td>${person.id}</td>
<td>${person.name}</td>
<td>${person.lastName}</td>
</tr>
</#list>
</table>
@@ -8,7 +8,7 @@
You have come to this page because you used an 'action' prefix.<p/>
The text you've entered is ${text?default('')?html}<p/>
The text you've enter is ${text?default('')}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
@@ -8,7 +8,7 @@
You have come to this page because you used an 'method' prefix.<p/>
The text you've enter is ${text?default('')?html}<p/>
The text you've enter is ${text?default('')}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
@@ -11,7 +11,7 @@
Because this is a 'redirect-action', the text will be lost, due to a redirection
implies a new request being issued from the client.<p/>
The text you've enter is ${text?default('')?html}<p/>
The text you've enter is ${text?default('')}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
+3 -3
View File
@@ -11,14 +11,14 @@
<sx:tabbedpanel id="test">
<sx:div id="one" label="Page" >
<h3><s:property default="Unknown page" value="page"/></h3>
<h3>${empty page ? "Unknown page" : page}</h3>
<pre>
<s:iterator value="pageLines" status="row">
${row.count}: <s:property/></s:iterator>
</pre>
</sx:div>
<sx:div id="two" label="Configuration" >
<h3><s:property default="Unknown configuration" value="config"/></h3>
<h3>${empty config ? "Unknown configuration" : config}</h3>
<pre>
<s:iterator value="configLines" status="row"><s:if test="%{(#row.count-1)==(configLines.size()/2)}">
@@ -27,7 +27,7 @@ ${configLine - padding + row.count - 1}: <s:property/></s:else></s:iterator>
</pre>
</sx:div>
<sx:div id="three" label="Java Action">
<h3><s:property default="Unknown or unavailable Action class" value="className"/></h3>
<h3>${empty className ? "Unknown or unavailable Action class" : className}</h3>
<pre>
<s:iterator value="classLines" status="row">
${row.count}: <s:property/></s:iterator>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Maven Archetypes</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes</url>
</scm>
<modules>
+6 -40
View File
@@ -3,19 +3,18 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.3.3</version>
<packaging>jar</packaging>
<version>2.3.1</version>
<name>Struts 2 Archetypes - Blank</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-blank</url>
</scm>
<properties>
@@ -28,43 +27,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
<include>**/pom.xml</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,8 +1,5 @@
<archetype
xmlns="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"
>
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-blank</id>
<!--
@@ -2,11 +2,11 @@
<project xmlns="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">
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<packaging>war</packaging>
<name>\${artifactId}</name>
<name>Struts 2 Blank Webapp</name>
<properties>
<struts2.version>${project.version}</struts2.version>
@@ -17,19 +17,19 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
<scope>test</scope>
</dependency>
@@ -46,6 +46,20 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!--
- This file is included by the struts.xml file as an example
- of how to break up the configuration file into multiple files.
@@ -1,5 +1,5 @@
HelloWorld.message = \u00A1Struts est\u00E1 bien\!...
HelloWorld.message = ¡Struts está bien!...
requiredstring = ${getText(fieldName)} es requerido.
password = Contrase\u00F1a
password = Contraseña
username = Nombre de Usuario
Missing.message = P\u00E1gina bajo construcci\u00F3n, trate de nuevo en la proxima versi\u00F3n.
Missing.message = Página bajo construcción, trate de nuevo en la proxima versión
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
@@ -2,19 +2,18 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.3.3</version>
<packaging>jar</packaging>
<version>2.3.1</version>
<name>Struts 2 Archetypes - Blank Convention</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-convention</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-convention</url>
</scm>
<properties>
@@ -27,43 +26,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
<include>**/pom.xml</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-convention</id>
</archetype>
@@ -1,7 +0,0 @@
<archetype
xmlns="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"
>
<id>struts2-archetype-convention</id>
</archetype>
@@ -2,11 +2,11 @@
<project xmlns="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">
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<packaging>war</packaging>
<name>\${artifactId}</name>
<name>Struts 2 Blank Convention Webapp</name>
<properties>
<struts2.version>${project.version}</struts2.version>
@@ -17,26 +17,26 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
@@ -1,2 +1,2 @@
hello.message = \u00A1Struts est\u00E1 bien\!...
hello.message = ¡Struts está bien!...
requiredstring = ${getText(fieldName)} es requerido.
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
+6 -40
View File
@@ -2,19 +2,18 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.3.3</version>
<packaging>jar</packaging>
<version>2.3.1</version>
<name>Struts 2 Archetypes - Database Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-dbportlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-dbportlet</url>
</scm>
<properties>
@@ -27,43 +26,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
<include>**/pom.xml</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-dbblank</id>
<sources>
<source>src/main/java/view/IndexAction.java</source>
<source>src/main/java/edit/IndexAction.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
<resource>src/main/webapp/WEB-INF/applicationContext.xml</resource>
<resource>src/main/webapp/WEB-INF/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/help/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-input.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-success.jsp</resource>
</resources>
</archetype>
@@ -2,11 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>\${artifactId}</name>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${project.version}</version>
<name>Struts 2 Database Portlet</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Database Portlet</description>
@@ -28,31 +28,31 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<!-- Spring -->
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<constant name="struts.convention.default.parent.package" value="struts-portlet-default" />
+6 -39
View File
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-plugin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-plugin</url>
</scm>
<properties>
@@ -27,43 +27,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
<include>**/pom.xml</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-plugin</id>
<sources>
<source>src/main/java/MyResult.java</source>
</sources>
<resources>
<resource>src/main/resources/struts-plugin.xml</resource>
<resource>LICENSE.txt</resource>
<resource>NOTICE.txt</resource>
<resource>README.txt</resource>
</resources>
</archetype>
@@ -3,11 +3,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>jar</packaging>
<name>\${artifactId}</name>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<name>Struts 2 Plugin</name>
<dependencies>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
+6 -39
View File
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-portlet</url>
</scm>
<properties>
@@ -27,43 +27,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
<include>**/pom.xml</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-portlet</id>
<sources>
<source>src/main/java/HelloAction.java</source>
<source>src/main/java/UpdateNameAction.java</source>
</sources>
<testSources>
<source>src/test/java/JettyPlutoLauncher.java</source>
</testSources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/WEB-INF/jsp/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/jsp/edit/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
</resources>
</archetype>
@@ -3,11 +3,11 @@
<project xmlns="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">
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<name>\${artifactId}</name>
<name>My Portlet Application</name>
<version>${project.version}</version>
<properties>
<struts2.version>${project.version}</struts2.version>
@@ -19,19 +19,19 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="default" extends="struts-portlet-default" namespace="/view">
+6 -39
View File
@@ -4,19 +4,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Starter</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/archetypes/struts2-archetype-starter</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/archetypes/struts2-archetype-starter</url>
</scm>
<properties>
@@ -29,43 +29,10 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
<include>**/pom.xml</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-starter</id>
<sources>
<source>src/main/java/HelloWorldAction.java</source>
<source>src/main/java/IndexAction.java</source>
<source>src/main/java/DateConverter.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/resources/xwork-conversion.properties</resource>
<resource>src/main/resources/struts.properties</resource>
<resource>src/main/resources/applicationContext.xml</resource>
<resource>src/main/resources/log4j.properties</resource>
<resource>src/main/webapp/jsp/index.jsp</resource>
<resource>src/main/webapp/jsp/helloWorld.jsp</resource>
<resource>src/main/webapp/WEB-INF/decorators/main.jsp</resource>
<resource>src/main/webapp/WEB-INF/decorators.xml</resource>
<resource>src/main/webapp/styles/main.css</resource>
<resource>src/main/webapp/styles/forms.css</resource>
<resource>src/main/webapp/styles/layout.css</resource>
<resource>src/main/webapp/styles/layout-1col.css</resource>
<resource>src/main/webapp/styles/layout-navleft-1col.css</resource>
<resource>src/main/webapp/styles/layout-navleft-2col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-1col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-3col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-localleft.css</resource>
<resource>src/main/webapp/styles/layout-navtop-subright.css</resource>
<resource>src/main/webapp/styles/nav-horizontal.css</resource>
<resource>src/main/webapp/styles/nav-vertical.css</resource>
<resource>src/main/webapp/styles/tools.css</resource>
<resource>src/main/webapp/styles/typo.css</resource>
<resource>src/main/webapp/WEB-INF/dwr.xml</resource>
<resource>src/main/webapp/WEB-INF/sitemesh.xml</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
</resources>
<testSources>
<source>src/test/java/HelloWorldActionTest.java</source>
<source>src/test/java/IndexActionTest.java</source>
</testSources>
<testResources>
<resource>src/test/resources/test.properties</resource>
</testResources>
</archetype>
@@ -2,11 +2,12 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>\${artifactId}</name>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${project.version}</version>
<name>Struts 2 Starter</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Starter</description>
<properties>
@@ -26,25 +27,25 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>\${struts2.version}</version>
<version>${struts2.version}</version>
</dependency>
<!-- Servlet & Jsp -->
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
+4 -6
View File
@@ -11,13 +11,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/assembly</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/assembly</url>
</scm>
<profiles>
@@ -276,8 +276,6 @@
<arg value="-nv" />
<arg value="-E" />
<arg value="-L" />
<arg value="-l 0" />
<arg value="-np" />
<arg value="--directory-prefix=${project.build.directory}/cwiki" />
<arg value="--no-check-certificate" />
<arg value="-r" />
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-admin-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Admin Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/bundles/admin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/bundles/admin</url>
</scm>
<dependencies>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-demo-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Demo Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/bundles/demo</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/bundles/demo</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
@@ -34,9 +34,9 @@
<name>Struts OSGi Bundles</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/bundles</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/bundles</url>
</scm>
<modules>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.3</version>
<version>2.3.1</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Core</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_3/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_3/core</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_1/core</url>
</scm>
<properties>
@@ -223,8 +223,4 @@ public final class StrutsConstants {
/** Enables caching of parsed OGNL expressions **/
public static final String STRUTS_ENABLE_OGNL_EXPRESSION_CACHE = "struts.ognl.enableExpressionCache";
/** The{@link org.apache.struts2.views.util.UrlHelper} implementation class **/
public static final String STRUTS_URL_HELPER = "struts.view.urlHelper";
}
@@ -22,7 +22,7 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -22,7 +22,7 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -28,7 +28,7 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -21,16 +21,18 @@
package org.apache.struts2.components;
import java.io.Writer;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.Writer;
/**
* <!-- START SNIPPET: javadoc -->
@@ -92,8 +94,8 @@ import java.io.Writer;
*
* @see Param
*/
@StrutsTag(name = "bean", tldTagClass = "org.apache.struts2.views.jsp.BeanTag",
description = "Instantiate a JavaBean and place it in the context")
@StrutsTag(name="bean", tldTagClass="org.apache.struts2.views.jsp.BeanTag",
description="Instantiate a JavaBean and place it in the context")
public class Bean extends ContextBean {
protected static final Logger LOG = LoggerFactory.getLogger(Bean.class);
@@ -105,12 +107,12 @@ public class Bean extends ContextBean {
public Bean(ValueStack stack) {
super(stack);
}
@Inject
public void setObjectFactory(ObjectFactory objectFactory) {
this.objectFactory = objectFactory;
}
@Inject
public void setReflectionProvider(ReflectionProvider prov) {
this.reflectionProvider = prov;
@@ -122,10 +124,11 @@ public class Bean extends ContextBean {
ValueStack stack = getStack();
try {
String beanName = findString(name, "name", "Bean name is required. Example: com.acme.FooBean or proper Spring bean ID");
bean = objectFactory.buildBean(beanName, stack.getContext(), false);
String beanName = findString(name, "name", "Bean name is required. Example: com.acme.FooBean");
bean = objectFactory.buildBean(ClassLoaderUtil.loadClass(beanName, getClass()), stack.getContext());
} catch (Exception e) {
LOG.error("Could not instantiate bean", e);
return false;
}
@@ -149,9 +152,9 @@ public class Bean extends ContextBean {
reflectionProvider.setProperty(key, value, bean, getStack().getContext());
}
@StrutsTagAttribute(description = "The class name of the bean to be instantiated (must respect JavaBean specification)", required = true)
@StrutsTagAttribute(description="The class name of the bean to be instantiated (must respect JavaBean specification)",
required=true)
public void setName(String name) {
this.name = name;
}
}
@@ -21,11 +21,19 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsConstants;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.StrutsException;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.util.FastByteArrayOutputStream;
@@ -33,14 +41,9 @@ import org.apache.struts2.views.jsp.TagUtils;
import org.apache.struts2.views.util.ContextUtil;
import org.apache.struts2.views.util.UrlHelper;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.TextParseUtil;
/**
* Base class to extend for UI components.
@@ -49,14 +52,12 @@ import java.util.Stack;
*
*/
public class Component {
public static final String COMPONENT_STACK = "__component_stack";
protected ValueStack stack;
protected Map parameters;
protected ActionMapper actionMapper;
protected boolean throwExceptionOnELFailure;
private UrlHelper urlHelper;
/**
* Constructor.
@@ -90,11 +91,7 @@ public class Component {
public void setThrowExceptionsOnELFailure(String throwException) {
this.throwExceptionOnELFailure = "true".equals(throwException);
}
@Inject
public void setUrlHelper(UrlHelper urlHelper) {
this.urlHelper = urlHelper;
}
/**
* Gets the OGNL value stack assoicated with this component.
* @return the OGNL value stack assoicated with this component.
@@ -410,7 +407,7 @@ public class Component {
String finalNamespace = determineNamespace(namespace, getStack(), req);
ActionMapping mapping = new ActionMapping(finalAction, finalNamespace, finalMethod, parameters);
String uri = actionMapper.getUriFromActionMapping(mapping);
return urlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult, forceAddSchemeHostAndPort, escapeAmp);
return UrlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult, forceAddSchemeHostAndPort, escapeAmp);
}
/**
@@ -448,8 +445,8 @@ public class Component {
stack.push(parameters);
stack.push(this);
try {
for (Object o : params.entrySet()) {
Map.Entry entry = (Map.Entry) o;
for (Iterator iterator = params.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
String key = (String) entry.getKey();
stack.setValue(key, entry.getValue());
}
@@ -22,7 +22,7 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import javax.servlet.http.HttpServletRequest;
@@ -36,7 +36,7 @@ import com.opensymphony.xwork2.validator.Validator;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -1,404 +0,0 @@
/**
*
*/
package org.apache.struts2.components;
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.IOException;
import java.io.Writer;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.util.Currency;
/**
* <!-- START SNIPPET: javadoc -->
* <p/>
* Format Number object in different ways.
* <p>
* The number tag will allow you to format a Number in a quick and easy way,
* based on the java.text.NumberFormat class. There are four basic number types,
* a number, a currency, a percentage and an integer. If a currency is
* specified, the number format will match the given currency. Further
* parameters can be overridden as needed.
* <p/>
* If a type is not defined, it will finally fall back to the default
* NumberFormat.getNumberInstance() formatting.
* <p/>
* <b>Note</b>: If the requested Number object isn't found on the stack, a blank
* will be returned.
* </p>
* <p/>
* Configurable attributes are :-
* <ul>
* <li>name</li>
* <li>currency - you can specify your own currency or as an OGNL expression</li>
* <li>type - if not specified try to find base on struts.number.format property</li>
* <li>groupingUsed - see NumberFormat.isGroupingUsed</li>
* <li>maximumFractionDigits - see NumberFormat.setMaximumFractionDigits</li>
* <li>maximumIntegerDigits - see NumberFormat.setMaximumIntegerDigits</li>
* <li>minimumFractionDigits - see NumberFormat.setMinimumFractionDigits</li>
* <li>minimumIntegerDigits - see NumberFormat.setMinimumIntegerDigits</li>
* <li>parseIntegerOnly - see NumberFormat.isParseIntegerOnly</li>
* <li>roundingMode - see below</li>
* </ul>
* <p/>
* <p/>
* <p/>
* Possible values for rounding mode are :-
* <ul>
* <li>ceiling</li>
* <li>down</li>
* <li>floor</li>
* <li>half-down</li>
* <li>half-even</li>
* <li>half-up</li>
* <li>unnecessary</li>
* <li>up</li>
* </ul>
* <p/>
* <p/>
* <p/>
* <!-- END SNIPPET: javadoc -->
* <p/>
* <p/>
* <b>Examples</b>
* <p/>
* <pre>
* &lt;!-- START SNIPPET: example --&gt;
* &lt;s:number name=&quot;invoice.total&quot; type=&quot;currency&quot; currency=&quot;XYZ&quot; /&gt;
* &lt;s:number name=&quot;invoice.quantity&quot; type=&quot;number&quot; /&gt;
* &lt;s:number name=&quot;invoice.discount&quot; type=&quot;percentage&quot; /&gt;
* &lt;s:number name=&quot;invoice.terms&quot; type=&quot;integer&quot; /&gt;
* &lt;!-- END SNIPPET: example --&gt;
* </pre>
* <p/>
* <code>Number</code>
*/
@StrutsTag(name = "number", tldBodyContent = "empty", tldTagClass = "org.apache.struts2.views.jsp.NumberTag", description = "Render a formatted number.")
public class Number extends ContextBean {
private static final Logger LOG = LoggerFactory.getLogger(Number.class);
/**
* Property name to fall back when no format is specified
*/
public static final String NUMBERTAG_PROPERTY = "struts.number.format";
private String name;
private String currency;
private String type;
private Boolean groupingUsed;
private Integer maximumFractionDigits;
private Integer maximumIntegerDigits;
private Integer minimumFractionDigits;
private Integer minimumIntegerDigits;
private Boolean parseIntegerOnly;
private String roundingMode;
public Number(ValueStack stack) {
super(stack);
}
public boolean end(Writer writer, String body) {
java.lang.Number number = findNumberName();
if (number != null) {
NumberFormat format = getNumberFormat();
findCurrency(format);
setNumberFormatParameters(format);
setRoundingMode(format);
String msg = format.format(number);
if (msg != null) {
try {
if (getVar() == null) {
writer.write(msg);
} else {
putInContext(msg);
}
} catch (IOException e) {
LOG.error("Could not write out Number tag", e);
}
}
}
return super.end(writer, "");
}
// try to find the currency, percentage and integer on the stack
private void findCurrency(NumberFormat format) {
if (currency != null) {
Object currencyValue = findValue(currency);
if (currencyValue != null) {
currency = currencyValue.toString();
}
try {
format.setCurrency(Currency.getInstance(currency));
} catch (IllegalArgumentException iae) {
LOG.error("Could not recognise a currency of [" + currency + "]");
}
}
}
private void setNumberFormatParameters(NumberFormat format) {
if (groupingUsed != null) {
format.setGroupingUsed(groupingUsed);
}
if (maximumFractionDigits != null) {
format.setMaximumFractionDigits(maximumFractionDigits);
}
if (maximumIntegerDigits != null) {
format.setMaximumIntegerDigits(maximumIntegerDigits);
}
if (minimumFractionDigits != null) {
format.setMinimumFractionDigits(minimumFractionDigits);
}
if (minimumIntegerDigits != null) {
format.setMinimumIntegerDigits(minimumIntegerDigits);
}
if (parseIntegerOnly != null) {
format.setParseIntegerOnly(parseIntegerOnly);
}
}
private java.lang.Number findNumberName() {
java.lang.Number number = null;
// find the name on the valueStack
try {
// suport Calendar also
Object numberObject = findValue(name);
if (numberObject instanceof java.lang.Number) {
number = (java.lang.Number) numberObject;
}
} catch (Exception e) {
LOG.error("Could not convert object with key [" + name + "] to a java.lang.Number instance");
}
return number;
}
private void setRoundingMode(NumberFormat format) {
if (roundingMode != null) {
roundingMode = findString(roundingMode);
if ("ceiling".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.CEILING);
} else if ("down".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.DOWN);
} else if ("floor".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.FLOOR);
} else if ("half-down".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.HALF_DOWN);
} else if ("half-even".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.HALF_EVEN);
} else if ("half-up".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.HALF_UP);
} else if ("unnecessary".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.UNNECESSARY);
} else if ("up".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.UP);
} else {
LOG.error("Could not recognise a roundingMode of [" + roundingMode + "]");
}
}
}
private NumberFormat getNumberFormat() {
NumberFormat format = null;
if (type == null) {
try {
type = findString(NUMBERTAG_PROPERTY);
} catch (Exception e) {
LOG.error("Could not find [" + NUMBERTAG_PROPERTY + "] on the stack!", e);
}
}
if (type != null) {
type = findString(type);
if ("currency".equals(type)) {
format = NumberFormat.getCurrencyInstance(ActionContext.getContext().getLocale());
} else if ("integer".equals(type)) {
format = NumberFormat.getIntegerInstance(ActionContext.getContext().getLocale());
} else if ("number".equals(type)) {
format = NumberFormat.getNumberInstance(ActionContext.getContext().getLocale());
} else if ("percent".equals(type)) {
format = NumberFormat.getPercentInstance(ActionContext.getContext().getLocale());
}
}
if (format == null) {
format = NumberFormat.getInstance(ActionContext.getContext().getLocale());
}
return format;
}
@StrutsTagAttribute(description = "Type of number formatter (currency, integer, number or percent, default is number)", rtexprvalue = false)
public void setType(String type) {
this.type = type;
}
@StrutsTagAttribute(description = "The currency to use for a currency format", type = "String", defaultValue = "")
public void setCurrency(String currency) {
this.currency = currency;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
@StrutsTagAttribute(description = "The number value to format", required = true)
public void setName(String name) {
this.name = name;
}
/**
* @return Returns the format.
*/
public String getType() {
return type;
}
/**
* @return Returns the currency.
*/
public String getCurrency() {
return currency;
}
@StrutsTagAttribute(description = "Whether grouping is used", type = "Boolean")
public void setGroupingUsed(Boolean groupingUsed) {
this.groupingUsed = groupingUsed;
}
/**
* @return Returns the grouping used.
*/
public Boolean isGroupingUsed() {
return groupingUsed;
}
/**
* @return the maximumFractionDigits
*/
public Integer getMaximumFractionDigits() {
return maximumFractionDigits;
}
/**
* @param maximumFractionDigits the maximumFractionDigits to set
*/
@StrutsTagAttribute(description = "Maximum fraction digits", type = "Integer")
public void setMaximumFractionDigits(Integer maximumFractionDigits) {
this.maximumFractionDigits = maximumFractionDigits;
}
/**
* @return the maximumIntegerDigits
*/
public Integer getMaximumIntegerDigits() {
return maximumIntegerDigits;
}
/**
* @param maximumIntegerDigits the maximumIntegerDigits to set
*/
@StrutsTagAttribute(description = "Maximum integer digits", type = "Integer")
public void setMaximumIntegerDigits(Integer maximumIntegerDigits) {
this.maximumIntegerDigits = maximumIntegerDigits;
}
/**
* @return the minimumFractionDigits
*/
public Integer getMinimumFractionDigits() {
return minimumFractionDigits;
}
/**
* @param minimumFractionDigits the minimumFractionDigits to set
*/
@StrutsTagAttribute(description = "Minimum fraction digits", type = "Integer")
public void setMinimumFractionDigits(Integer minimumFractionDigits) {
this.minimumFractionDigits = minimumFractionDigits;
}
/**
* @return the minimumIntegerDigits
*/
public Integer getMinimumIntegerDigits() {
return minimumIntegerDigits;
}
/**
* @param minimumIntegerDigits the minimumIntegerDigits to set
*/
@StrutsTagAttribute(description = "Maximum integer digits", type = "Integer")
public void setMinimumIntegerDigits(Integer minimumIntegerDigits) {
this.minimumIntegerDigits = minimumIntegerDigits;
}
/**
* @return the parseIntegerOnly
*/
public Boolean isParseIntegerOnly() {
return parseIntegerOnly;
}
/**
* @param parseIntegerOnly the parseIntegerOnly to set
*/
@StrutsTagAttribute(description = "Parse integer only", type = "Boolean")
public void setParseIntegerOnly(Boolean parseIntegerOnly) {
this.parseIntegerOnly = parseIntegerOnly;
}
/**
* @return the roundingMode
*/
public String getRoundingMode() {
return roundingMode;
}
/**
* @param roundingMode the roundingMode to set
*/
@StrutsTagAttribute(description = "The rounding mode to use", type = "String")
public void setRoundingMode(String roundingMode) {
this.roundingMode = roundingMode;
}
}
@@ -24,7 +24,7 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -176,10 +176,10 @@ public class Property extends Component {
private String prepare(String value) {
String result = value;
if (escapeHtml) {
result = StringEscapeUtils.escapeHtml4(result);
result = StringEscapeUtils.escapeHtml(result);
}
if (escapeJavaScript) {
result = StringEscapeUtils.escapeEcmaScript(result);
result = StringEscapeUtils.escapeJavaScript(result);
}
if (escapeXml) {
result = StringEscapeUtils.escapeXml(result);
@@ -27,15 +27,16 @@ import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.views.util.UrlHelper;
import org.apache.commons.lang.StringUtils;
import java.io.IOException;
import java.io.Writer;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -50,17 +51,12 @@ public class ServletUrlRenderer implements UrlRenderer {
private static final Logger LOG = LoggerFactory.getLogger(ServletUrlRenderer.class);
private ActionMapper actionMapper;
private UrlHelper urlHelper;
@Inject
public void setActionMapper(ActionMapper mapper) {
this.actionMapper = mapper;
}
@Inject
public void setUrlHelper(UrlHelper urlHelper) {
this.urlHelper = urlHelper;
}
/**
* {@inheritDoc}
@@ -91,7 +87,7 @@ public class ServletUrlRenderer implements UrlRenderer {
if (_value != null && _value.indexOf("?") > 0) {
_value = _value.substring(0, _value.indexOf("?"));
}
result = urlHelper.buildUrl(_value, urlComponent.getHttpServletRequest(), urlComponent.getHttpServletResponse(), urlComponent.getParameters(), scheme, urlComponent.isIncludeContext(), urlComponent.isEncode(), urlComponent.isForceAddSchemeHostAndPort(), urlComponent.isEscapeAmp());
result = UrlHelper.buildUrl(_value, urlComponent.getHttpServletRequest(), urlComponent.getHttpServletResponse(), urlComponent.getParameters(), scheme, urlComponent.isIncludeContext(), urlComponent.isEncode(), urlComponent.isForceAddSchemeHostAndPort(), urlComponent.isEscapeAmp());
}
String anchor = urlComponent.getAnchor();
if (StringUtils.isNotEmpty(anchor)) {
@@ -125,7 +121,8 @@ public class ServletUrlRenderer implements UrlRenderer {
* {@inheritDoc}
*/
public void renderFormUrl(Form formComponent) {
String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(), formComponent.request);
String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(),
formComponent.request);
String action;
if(formComponent.action != null) {
@@ -154,8 +151,8 @@ public class ServletUrlRenderer implements UrlRenderer {
if (actionConfig != null) {
ActionMapping mapping = new ActionMapping(actionName, namespace, actionMethod, formComponent.parameters);
String result = urlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping),
formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
String result = UrlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping),
formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
formComponent.addParameter("action", result);
// let's try to get the actual action class and name
@@ -190,7 +187,7 @@ public class ServletUrlRenderer implements UrlRenderer {
LOG.warn("No configuration found for the specified action: '" + actionName + "' in namespace: '" + namespace + "'. Form action defaulting to 'action' attribute's literal value.");
}
String result = urlHelper.buildUrl(action, formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
String result = UrlHelper.buildUrl(action, formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
formComponent.addParameter("action", result);
// namespace: cut out anything between the start and the last /
@@ -239,7 +236,7 @@ public class ServletUrlRenderer implements UrlRenderer {
}
if (UrlProvider.NONE.equalsIgnoreCase(includeParams)) {
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), Collections.<String, Object>emptyMap());
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), Collections.EMPTY_MAP);
} else if (UrlProvider.ALL.equalsIgnoreCase(includeParams)) {
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), urlComponent.getHttpServletRequest().getParameterMap());
@@ -270,7 +267,7 @@ public class ServletUrlRenderer implements UrlRenderer {
}
private void includeGetParameters(UrlProvider urlComponent) {
String query = extractQueryString(urlComponent);
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), urlHelper.parseQueryString(query, false));
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), UrlHelper.parseQueryString(query));
}
private String extractQueryString(UrlProvider urlComponent) {
@@ -307,9 +304,9 @@ public class ServletUrlRenderer implements UrlRenderer {
* @param parameters component parameters
* @param contextParameters request parameters
*/
protected void mergeRequestParameters(String value, Map<String, Object> parameters, Map<String, Object> contextParameters){
protected void mergeRequestParameters(String value, Map parameters, Map contextParameters){
Map<String, Object> mergedParams = new LinkedHashMap<String, Object>(contextParameters);
Map mergedParams = new LinkedHashMap(contextParameters);
// Merge contextParameters (from current request) with parameters specified in value attribute
// eg. value="someAction.action?id=someId&venue=someVenue"
@@ -318,23 +315,30 @@ public class ServletUrlRenderer implements UrlRenderer {
if (value != null && value.trim().length() > 0 && value.indexOf("?") > 0) {
String queryString = value.substring(value.indexOf("?")+1);
mergedParams = urlHelper.parseQueryString(queryString, false);
for (Map.Entry<String, Object> entry : contextParameters.entrySet()) {
if (!mergedParams.containsKey(entry.getKey())) {
mergedParams.put(entry.getKey(), entry.getValue());
mergedParams = UrlHelper.parseQueryString(queryString);
for (Iterator iterator = contextParameters.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
Object key = entry.getKey();
if (!mergedParams.containsKey(key)) {
mergedParams.put(key, entry.getValue());
}
}
}
// Merge parameters specified in value attribute
// eg. value="someAction.action?id=someId&venue=someVenue"
// with parameters specified though param tag
// eg. <param name="id" value="%{'someId'}" />
// where parameters specified through param tag takes priority.
for (Map.Entry<String, Object> entry : mergedParams.entrySet()) {
if (!parameters.containsKey(entry.getKey())) {
parameters.put(entry.getKey(), entry.getValue());
for (Iterator iterator = mergedParams.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
Object key = entry.getKey();
if (!parameters.containsKey(key)) {
parameters.put(key, entry.getValue());
}
}
}
@@ -24,7 +24,7 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.util.TextProviderHelper;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;

Some files were not shown because too many files have changed in this diff Show More