mirror of
https://github.com/apache/struts.git
synced 2026-08-09 08:36:54 +00:00
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 676a011b4f | |||
| 954c21481f | |||
| 4e61119eab | |||
| 7eb6cdbeaa | |||
| f75cc72633 | |||
| 517de353c1 | |||
| 02a84be2c7 | |||
| 5af2eda14c | |||
| 997c577d4f | |||
| b382c5c021 | |||
| 0e5d4f3e9f | |||
| 37ebc858a3 | |||
| 495753e1aa | |||
| 0b2069dba0 | |||
| 0d8f4d43bd | |||
| 5a9048065f | |||
| 73e763faf8 | |||
| 73c976a028 | |||
| 6411771bb0 | |||
| f45597252f | |||
| 6a4240bdf0 | |||
| e9a12de7ee | |||
| abd628ea09 | |||
| 78ee4b8ba2 | |||
| 4f07559dc1 | |||
| f064937984 | |||
| a99dadfebf | |||
| 5c15306366 | |||
| ecc0e56440 | |||
| b90fe0996f | |||
| 2dacf99394 | |||
| c8850cb558 | |||
| a377ce5c40 | |||
| 7146f389c7 | |||
| 73da07e6af | |||
| cbb55e9793 | |||
| a903a80600 | |||
| 79de91800e | |||
| d21a0c8e42 | |||
| aef1c6aaf6 | |||
| 3cd48592dd | |||
| 7eb38fdb66 | |||
| 4b9445de80 | |||
| c71a8dfd2d | |||
| 2d5fdbe6dd | |||
| 35b84844d9 | |||
| c7a0ec6256 | |||
| 880e5d1b7d | |||
| b0d14cea04 | |||
| c52cd98c9e | |||
| f01f6e3cfe | |||
| b5a58f1b90 | |||
| 9831ecf543 | |||
| 06d2aa4981 | |||
| 98af0ac15f | |||
| 86d97dc20b | |||
| 6399ec283b | |||
| f070d7e830 | |||
| da85bb6abd | |||
| 524a602fa7 | |||
| 9bd53cc212 | |||
| 26ed57b11a | |||
| 20689c0cf7 | |||
| 94d75f9cbe | |||
| 5aa97c1b4b | |||
| f47cfa889a | |||
| 9abf8dd346 | |||
| a9b26ca87f | |||
| 6ec3d2a8b6 | |||
| 4b40771643 | |||
| f3f8278411 | |||
| 4a5211716f | |||
| ef8c44967d | |||
| 29c2eb778b | |||
| eafd29bea7 | |||
| 261c5fb996 | |||
| b5eebb9842 | |||
| cc6edbb49a | |||
| 3ec7b8ca22 | |||
| 4a00dbb6b3 | |||
| bbec257e3b | |||
| 4599676018 | |||
| 7cb22a719c | |||
| 031098fa01 | |||
| 872a7b0b6d | |||
| 248d0f5879 | |||
| 54945c5417 | |||
| 9cad25f258 | |||
| 47e12adc0e | |||
| 5563389dc6 | |||
| 21fcf36ad3 | |||
| 970251ff95 | |||
| 5ec51ae1bc | |||
| 09f7f37d72 | |||
| 3683b8f7fd | |||
| 659a688d25 | |||
| 0c61bf4c34 | |||
| d91a168e3f | |||
| 47deea981b | |||
| c6af386d57 | |||
| 133ca637f0 |
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/apps/blank/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/blank/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/blank/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/apps/jboss-blank/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/jboss-blank/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/jboss-blank/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/jboss-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/jboss-blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/apps/mailreader/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/mailreader/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/mailreader/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/mailreader</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/mailreader</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/mailreader</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/apps/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/apps/portlet/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/portlet/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/portlet/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/portlet</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
@@ -190,8 +190,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ package org.apache.struts2.portlet.example.spring;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="view" 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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<include file="struts-view.xml"/>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<b>Hello from FreeMarker, ${firstName} ${lastName}!</b>
|
||||
<b>Hello from FreeMarker, ${firstName?html} ${lastName?html}!</b>
|
||||
<p/>
|
||||
<a href="<@s.url action="index"/>">Back to front page</a>
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<!-- Overwrite Convention -->
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<s:iterator value="model">
|
||||
<tr>
|
||||
<td>${id}</td>
|
||||
<td>${clientName}</td>
|
||||
<td>${amount}</td>
|
||||
<td><s:property value="clientName"/></td>
|
||||
<td><s:property value="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,7 +1,9 @@
|
||||
<!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>
|
||||
@@ -14,11 +16,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Client</th>
|
||||
<td>${clientName}</td>
|
||||
<td><s:property value="clientName"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Amount</th>
|
||||
<td>${amount}</td>
|
||||
<td><s:property value="amount"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="../orders">Back to Orders</a>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/apps/showcase/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/showcase/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/showcase/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/showcase</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/showcase</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/showcase</url>
|
||||
</scm>
|
||||
|
||||
|
||||
|
||||
+12
-6
@@ -59,7 +59,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
|
||||
|
||||
public String execute() throws MalformedURLException, IOException {
|
||||
|
||||
if (page != null && page.trim().length() > 0) {
|
||||
if (page != null) {
|
||||
|
||||
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 && className.trim().length() > 0) {
|
||||
if (className != null) {
|
||||
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 && config.trim().length() > 0 && (rootPath == null || config.startsWith(rootPath))) {
|
||||
if (config != null && (rootPath == null || config.startsWith(rootPath))) {
|
||||
int pos = config.lastIndexOf(':');
|
||||
configLine = Integer.parseInt(config.substring(pos+1));
|
||||
config = config.substring(0, pos).replace("//", "/");
|
||||
@@ -107,21 +107,27 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
|
||||
* @param className the className to set
|
||||
*/
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
if (className != null && className.trim().length()>0) {
|
||||
this.className = className;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param config the config to set
|
||||
*/
|
||||
public void setConfig(String config) {
|
||||
this.config = config;
|
||||
if (config != null && config.trim().length()>0) {
|
||||
this.config = config;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param page the page to set
|
||||
*/
|
||||
public void setPage(String page) {
|
||||
this.page = page;
|
||||
if (page != null && page.trim().length()>0) {
|
||||
this.page = page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="actionchaining" extends="struts-default" namespace="/actionchaining">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="chat" extends="struts-default" namespace="/chat">
|
||||
|
||||
@@ -1,8 +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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="conversion" namespace="/conversion" extends="struts-default">
|
||||
|
||||
@@ -1,8 +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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="filedownload" extends="struts-default" namespace="/filedownload">
|
||||
|
||||
@@ -1,8 +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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="fileupload" extends="struts-default" namespace="/fileupload">
|
||||
|
||||
@@ -1,9 +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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="freemarker" namespace="/freemarker" extends="struts-default">
|
||||
|
||||
@@ -1,8 +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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="hangman" extends="struts-default" namespace="/hangman">
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="integration" extends="struts1-default" namespace="/integration">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="ognl" namespace="/nodecorate" extends="struts-default">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="jsf" extends="jsf-default" namespace="/jsf">
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="modelDriven" extends="struts-default" namespace="/modelDriven">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<!-- START SNIPPET: xworkSample -->
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="ui-tags" extends="struts-default" namespace="/tags/ui">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<include file="struts-tags-ui.xml"/>
|
||||
<include file="struts-tags-non-ui.xml" />
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="tiles" extends="tiles-default" namespace="/tiles">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
<struts>
|
||||
<package name="token" extends="struts-default" namespace="/token">
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="validation" extends="json-default" namespace="/validation">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="xslt" extends="struts-default" namespace="/xslt">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?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">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<!-- START SNIPPET: xworkSample -->
|
||||
<struts>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[
|
||||
<#list options as option>
|
||||
["${option}"],
|
||||
["${option?html}"],
|
||||
</#list>
|
||||
]
|
||||
@@ -1,3 +1,3 @@
|
||||
|
||||
Hello, <br/>
|
||||
Today is ${todayDate}, the time now is ${todayTime}
|
||||
Today is ${todayDate?html}, the time now is ${todayTime?html}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
Hello, ${name}
|
||||
Hello, ${name?html}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
So, you are a ${gender}
|
||||
So, you are a ${gender?html}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
<div class="center">
|
||||
<div class="box">
|
||||
<h3>Messages Posted In Room [${roomName?default('')}]</h3>
|
||||
<h3>Messages Posted In Room [${roomName?default('')?html}]</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('')}]</h3>
|
||||
<h3>Users Available In Room [${roomName?default('')?html}]</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}</li>
|
||||
<li>${user.name?html}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<body>
|
||||
<#list actionMessages as msg>
|
||||
${msg}
|
||||
${msg?html}
|
||||
</#list>
|
||||
|
||||
<@s.form action="guess" method="post">
|
||||
|
||||
@@ -13,9 +13,9 @@ There are ${peopleCount} people...
|
||||
</tr>
|
||||
<#list people as person>
|
||||
<tr>
|
||||
<td>${person.id}</td>
|
||||
<td>${person.name}</td>
|
||||
<td>${person.lastName}</td>
|
||||
<td>${person.id?html}</td>
|
||||
<td>${person.name?html}</td>
|
||||
<td>${person.lastName?html}</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 enter is ${text?default('')}<p/>
|
||||
The text you've entered is ${text?default('')?html}<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('')}<p/>
|
||||
The text you've enter is ${text?default('')?html}<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('')}<p/>
|
||||
The text you've enter is ${text?default('')?html}<p/>
|
||||
|
||||
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
|
||||
<@s.a href="%{#url}">Back</@s.a>
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
<sx:tabbedpanel id="test">
|
||||
<sx:div id="one" label="Page" >
|
||||
<h3>${empty page ? "Unknown page" : page}</h3>
|
||||
<h3><s:property default="Unknown page" value="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>${empty config ? "Unknown configuration" : config}</h3>
|
||||
<h3><s:property default="Unknown configuration" value="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>${empty className ? "Unknown or unavailable Action class" : className}</h3>
|
||||
<h3><s:property default="Unknown or unavailable Action class" value="className"/></h3>
|
||||
<pre>
|
||||
<s:iterator value="classLines" status="row">
|
||||
${row.count}: <s:property/></s:iterator>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/archetypes/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -3,18 +3,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-blank</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Blank</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-blank/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-blank/</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-blank/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-blank</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-blank</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
@@ -27,10 +28,43 @@
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/pom.xml</include>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</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>
|
||||
|
||||
+5
-2
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archetype>
|
||||
<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-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>${project.version}</version>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>war</packaging>
|
||||
<name>Struts 2 Blank Webapp</name>
|
||||
<name>\${artifactId}</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,20 +46,6 @@
|
||||
<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>
|
||||
|
||||
+3
-3
@@ -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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
<!--
|
||||
- This file is included by the struts.xml file as an example
|
||||
- of how to break up the configuration file into multiple files.
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
HelloWorld.message = ¡Struts está bien!...
|
||||
HelloWorld.message = \u00A1Struts est\u00E1 bien\!...
|
||||
requiredstring = ${getText(fieldName)} es requerido.
|
||||
password = Contraseña
|
||||
password = Contrase\u00F1a
|
||||
username = Nombre de Usuario
|
||||
Missing.message = Página bajo construcción, trate de nuevo en la proxima versión
|
||||
Missing.message = P\u00E1gina bajo construcci\u00F3n, trate de nuevo en la proxima versi\u00F3n.
|
||||
+3
-3
@@ -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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
<struts>
|
||||
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
|
||||
<constant name="struts.devMode" value="true"/>
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
<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">
|
||||
<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">
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-convention</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Blank Convention</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-convention/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-convention/
|
||||
</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-convention/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-convention</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-convention</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-convention</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
@@ -28,10 +27,43 @@
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/pom.xml</include>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</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,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archetype>
|
||||
<id>struts2-archetype-convention</id>
|
||||
</archetype>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<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>
|
||||
+8
-8
@@ -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>${project.version}</version>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>war</packaging>
|
||||
<name>Struts 2 Blank Convention Webapp</name>
|
||||
<name>\${artifactId}</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
-1
@@ -1,2 +1,2 @@
|
||||
hello.message = ¡Struts está bien!...
|
||||
hello.message = \u00A1Struts est\u00E1 bien\!...
|
||||
requiredstring = ${getText(fieldName)} es requerido.
|
||||
|
||||
+3
-3
@@ -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.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
<struts>
|
||||
|
||||
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
<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">
|
||||
<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">
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-dbportlet</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Database Portlet</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/
|
||||
</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-dbportlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-dbportlet</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-dbportlet</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
@@ -28,10 +27,43 @@
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/pom.xml</include>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</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,21 +0,0 @@
|
||||
<?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>
|
||||
|
||||
+10
-10
@@ -2,11 +2,11 @@
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${project.version}</version>
|
||||
<name>Struts 2 Database Portlet</name>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>war</packaging>
|
||||
<name>\${artifactId}</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 -->
|
||||
|
||||
+3
-4
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<constant name="struts.convention.default.parent.package" value="struts-portlet-default" />
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
<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">
|
||||
<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">
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-plugin</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-plugin/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-plugin/
|
||||
</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-plugin/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-plugin</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
@@ -29,10 +27,43 @@
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/pom.xml</include>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</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,15 +0,0 @@
|
||||
<?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,10 +3,11 @@
|
||||
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>${project.version}</version>
|
||||
<name>Struts 2 Plugin</name>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>\${artifactId}</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
<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">
|
||||
<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">
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-portlet</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Portlet</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-portlet/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-portlet/
|
||||
</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-portlet/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-portlet</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-portlet</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
@@ -29,10 +27,43 @@
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/pom.xml</include>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</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,20 +0,0 @@
|
||||
<?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>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>war</packaging>
|
||||
<name>My Portlet Application</name>
|
||||
<version>${project.version}</version>
|
||||
<name>\${artifactId}</name>
|
||||
|
||||
<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>
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="default" extends="struts-portlet-default" namespace="/view">
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<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">
|
||||
<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">
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-starter</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Starter</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-starter/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-starter/
|
||||
</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-starter/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-starter</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-starter</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-starter</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
@@ -31,10 +29,43 @@
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/pom.xml</include>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</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,47 +0,0 @@
|
||||
<?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>
|
||||
|
||||
+9
-10
@@ -2,12 +2,11 @@
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${project.version}</version>
|
||||
<name>Struts 2 Starter</name>
|
||||
<url>http://www.myComp.com</url>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>war</packaging>
|
||||
<name>\${artifactId}</name>
|
||||
<description>Struts 2 Starter</description>
|
||||
|
||||
<properties>
|
||||
@@ -27,25 +26,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 -->
|
||||
|
||||
+4
-5
@@ -1,8 +1,7 @@
|
||||
<?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">
|
||||
<?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">
|
||||
|
||||
<struts>
|
||||
|
||||
|
||||
+6
-4
@@ -11,13 +11,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/assembly</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/assembly</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
@@ -276,6 +276,8 @@
|
||||
<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,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/bundles/admin/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/admin/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/bundles/admin/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/admin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/admin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/bundles/admin</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/bundles/demo/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/demo/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/bundles/demo/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/demo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/demo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/bundles/demo</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</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/trunk/bundles/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
+6
-6
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.3.4</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
@@ -34,13 +34,13 @@
|
||||
<name>Struts 2 Core</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/core/</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/core/</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/core/</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/core</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/core</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<tlib.version>2.2</tlib.version>
|
||||
<tlib.version>2.3</tlib.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -50,7 +50,7 @@
|
||||
<artifactId>maven-apt-plugin</artifactId>
|
||||
<version>1.0.15</version>
|
||||
<configuration>
|
||||
<A>uri=/struts-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=s,displayName="Struts Tags",
|
||||
<A>uri=/struts-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=s,displayName=Struts Tags,
|
||||
outFile=${basedir}/target/classes/META-INF/struts-tags.tld,
|
||||
description="To make it easier to access dynamic data;
|
||||
the Apache Struts framework includes a library of custom tags.
|
||||
|
||||
@@ -64,6 +64,9 @@ public final class StrutsConstants {
|
||||
/** The com.opensymphony.xwork2.ObjectFactory implementation class */
|
||||
public static final String STRUTS_OBJECTFACTORY = "struts.objectFactory";
|
||||
|
||||
/** The com.opensymphony.xwork2.util.FileManager implementation class */
|
||||
public static final String STRUTS_FILEMANAGER = "struts.fileManager";
|
||||
|
||||
/** The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class */
|
||||
public static final String STRUTS_OBJECTTYPEDETERMINER = "struts.objectTypeDeterminer";
|
||||
|
||||
@@ -223,4 +226,8 @@ 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.lang.StringUtils;
|
||||
import org.apache.commons.lang3.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.lang.StringUtils;
|
||||
import org.apache.commons.lang3.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.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -21,18 +21,16 @@
|
||||
|
||||
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 -->
|
||||
@@ -94,8 +92,8 @@ import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
|
||||
*
|
||||
* @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);
|
||||
|
||||
@@ -107,12 +105,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;
|
||||
@@ -124,11 +122,10 @@ public class Bean extends ContextBean {
|
||||
ValueStack stack = getStack();
|
||||
|
||||
try {
|
||||
String beanName = findString(name, "name", "Bean name is required. Example: com.acme.FooBean");
|
||||
bean = objectFactory.buildBean(ClassLoaderUtil.loadClass(beanName, getClass()), stack.getContext());
|
||||
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);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not instantiate bean", e);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -152,9 +149,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,19 +21,11 @@
|
||||
|
||||
package org.apache.struts2.components;
|
||||
|
||||
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 com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.struts2.StrutsException;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapper;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapping;
|
||||
import org.apache.struts2.util.FastByteArrayOutputStream;
|
||||
@@ -41,9 +33,14 @@ import org.apache.struts2.views.jsp.TagUtils;
|
||||
import org.apache.struts2.views.util.ContextUtil;
|
||||
import org.apache.struts2.views.util.UrlHelper;
|
||||
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
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;
|
||||
|
||||
/**
|
||||
* Base class to extend for UI components.
|
||||
@@ -52,12 +49,14 @@ import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
*
|
||||
*/
|
||||
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.
|
||||
@@ -91,7 +90,11 @@ 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.
|
||||
@@ -407,7 +410,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -445,8 +448,8 @@ public class Component {
|
||||
stack.push(parameters);
|
||||
stack.push(this);
|
||||
try {
|
||||
for (Iterator iterator = params.entrySet().iterator(); iterator.hasNext();) {
|
||||
Map.Entry entry = (Map.Entry) iterator.next();
|
||||
for (Object o : params.entrySet()) {
|
||||
Map.Entry entry = (Map.Entry) o;
|
||||
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.lang.StringUtils;
|
||||
import org.apache.commons.lang3.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.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -0,0 +1,404 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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>
|
||||
* <!-- START SNIPPET: example -->
|
||||
* <s:number name="invoice.total" type="currency" currency="XYZ" />
|
||||
* <s:number name="invoice.quantity" type="number" />
|
||||
* <s:number name="invoice.discount" type="percentage" />
|
||||
* <s:number name="invoice.terms" type="integer" />
|
||||
* <!-- END SNIPPET: example -->
|
||||
* </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.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.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.escapeHtml(result);
|
||||
result = StringEscapeUtils.escapeHtml4(result);
|
||||
}
|
||||
if (escapeJavaScript) {
|
||||
result = StringEscapeUtils.escapeJavaScript(result);
|
||||
result = StringEscapeUtils.escapeEcmaScript(result);
|
||||
}
|
||||
if (escapeXml) {
|
||||
result = StringEscapeUtils.escapeXml(result);
|
||||
|
||||
@@ -27,16 +27,15 @@ 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;
|
||||
|
||||
@@ -51,12 +50,17 @@ 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}
|
||||
@@ -87,7 +91,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)) {
|
||||
@@ -121,8 +125,7 @@ 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) {
|
||||
@@ -151,8 +154,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
|
||||
@@ -187,7 +190,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 /
|
||||
@@ -236,7 +239,7 @@ public class ServletUrlRenderer implements UrlRenderer {
|
||||
}
|
||||
|
||||
if (UrlProvider.NONE.equalsIgnoreCase(includeParams)) {
|
||||
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), Collections.EMPTY_MAP);
|
||||
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), Collections.<String, Object>emptyMap());
|
||||
} else if (UrlProvider.ALL.equalsIgnoreCase(includeParams)) {
|
||||
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), urlComponent.getHttpServletRequest().getParameterMap());
|
||||
|
||||
@@ -267,7 +270,7 @@ public class ServletUrlRenderer implements UrlRenderer {
|
||||
}
|
||||
private void includeGetParameters(UrlProvider urlComponent) {
|
||||
String query = extractQueryString(urlComponent);
|
||||
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), UrlHelper.parseQueryString(query));
|
||||
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), urlHelper.parseQueryString(query, false));
|
||||
}
|
||||
|
||||
private String extractQueryString(UrlProvider urlComponent) {
|
||||
@@ -304,9 +307,9 @@ public class ServletUrlRenderer implements UrlRenderer {
|
||||
* @param parameters component parameters
|
||||
* @param contextParameters request parameters
|
||||
*/
|
||||
protected void mergeRequestParameters(String value, Map parameters, Map contextParameters){
|
||||
protected void mergeRequestParameters(String value, Map<String, Object> parameters, Map<String, Object> contextParameters){
|
||||
|
||||
Map mergedParams = new LinkedHashMap(contextParameters);
|
||||
Map<String, Object> mergedParams = new LinkedHashMap<String, Object>(contextParameters);
|
||||
|
||||
// Merge contextParameters (from current request) with parameters specified in value attribute
|
||||
// eg. value="someAction.action?id=someId&venue=someVenue"
|
||||
@@ -315,30 +318,23 @@ 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);
|
||||
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());
|
||||
mergedParams = urlHelper.parseQueryString(queryString, false);
|
||||
for (Map.Entry<String, Object> entry : contextParameters.entrySet()) {
|
||||
if (!mergedParams.containsKey(entry.getKey())) {
|
||||
mergedParams.put(entry.getKey(), 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 (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());
|
||||
for (Map.Entry<String, Object> entry : mergedParams.entrySet()) {
|
||||
if (!parameters.containsKey(entry.getKey())) {
|
||||
parameters.put(entry.getKey(), 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.lang.StringUtils;
|
||||
import org.apache.commons.lang3.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
Reference in New Issue
Block a user