mirror of
https://github.com/apache/struts.git
synced 2026-08-07 23:57:03 +00:00
Compare commits
95 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f0c159d871 | |||
| 859ff1af30 | |||
| 394470e190 | |||
| 8b2df4e019 | |||
| ea96d18d0f | |||
| 978afa48eb | |||
| 61da6900d9 | |||
| fed4f8e8a4 | |||
| d7804297e3 | |||
| 486b1479ae | |||
| 732472bd6e | |||
| 3acccdecca | |||
| abe07c22c2 | |||
| 8e0c17e607 | |||
| 535b610848 | |||
| 1f030bfde0 | |||
| dfa3073690 | |||
| 038ddb4663 | |||
| f152e7fa70 | |||
| 7e6f641ebb | |||
| 9fbb0d92b9 | |||
| 9df00b0a86 | |||
| 07fca85b08 | |||
| a1e8c628f5 | |||
| 3d19149866 | |||
| d1635c5c9e | |||
| 4eee1f4747 | |||
| e5a217a891 | |||
| 90cd4fc717 | |||
| aa991b14b0 | |||
| b9ebe65738 | |||
| 3bf95951bc | |||
| 3ae920e5a3 | |||
| 00ce58a3d6 | |||
| 8ca0e87d35 | |||
| 01fd6750a0 | |||
| f7594cf03f | |||
| 8c7db9d2b0 | |||
| 359bcdbe48 | |||
| 2c13925b49 | |||
| 6e33b77ad8 | |||
| 1815a9925b | |||
| 48394634f5 | |||
| eaa423dc71 | |||
| b4f49eed47 | |||
| fc7ee40bd6 | |||
| cee2b773b1 | |||
| 6b98b9d33d | |||
| aaa27dc380 | |||
| e091eb41f3 | |||
| b56b9b9ff4 | |||
| f1a2affae1 | |||
| b68257de96 | |||
| 878d7e55cb | |||
| cff4d773b4 | |||
| 4460ddae65 | |||
| 9122aff601 | |||
| a4eb0803dc | |||
| 34a10bae06 | |||
| 8a4c6f9376 | |||
| 62d20e0302 | |||
| 80df6b3065 | |||
| c20ed48c44 | |||
| ae90857f11 | |||
| eb988a4b15 | |||
| 7e61564f82 | |||
| 07c8e20161 | |||
| 762cc86714 | |||
| 42d24e190f | |||
| 16fade2857 | |||
| 9d10ca7a9b | |||
| c66877c460 | |||
| 34af1cd8a2 | |||
| da6fa05ed9 | |||
| 0de4b61ff2 | |||
| 41eb4c2444 | |||
| 9220708b59 | |||
| d89ac943b4 | |||
| 8daf1db8d9 | |||
| 8cefc26601 | |||
| df8f62bb50 | |||
| 890e62bcf8 | |||
| fb161f5535 | |||
| fe36e8bf08 | |||
| 66e95042ec | |||
| 9d20642ccc | |||
| 94c0a6cfdf | |||
| 1c55798977 | |||
| e6e1976f39 | |||
| 44615af72b | |||
| 0aefd0a8c1 | |||
| feafa63d71 | |||
| fc57c2c242 | |||
| 0c00c11d0b | |||
| a34bb460f5 |
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-blank</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Blank Webapp</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/apps/blank</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-jboss-blank</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>JBoss Blank Webapp</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/jboss-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/jboss-blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/apps/jboss-blank</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-mailreader</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Mail Reader Webapp</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/mailreader</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/mailreader</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/apps/mailreader</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
@@ -42,9 +42,9 @@
|
||||
</modules>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/apps</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Portlet Webapp</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/apps/portlet</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<name>Struts 2 Rest Showcase Example</name>
|
||||
<description>Struts 2 Rest Showcase Example</description>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-showcase</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Showcase Webapp</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/showcase</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/apps/showcase</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/apps/showcase</url>
|
||||
</scm>
|
||||
|
||||
|
||||
|
||||
@@ -44,19 +44,19 @@ public class Skill implements IdEntity {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
return StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(name));
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(name));
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
return StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(description));
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(description));
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Serializable getId() {
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@
|
||||
</field>
|
||||
<field name="regexValidatorField">
|
||||
<field-validator type="regex">
|
||||
<param name="expression">.*\.txt</param>
|
||||
<param name="regex">.*\.txt</param>
|
||||
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
|
||||
</field-validator>
|
||||
</field>
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@
|
||||
</field>
|
||||
<field name="regexValidatorField">
|
||||
<field-validator type="regex">
|
||||
<param name="expression">.*\.txt</param>
|
||||
<param name="regex"><![CDATA[ [^<>]+ ]]></param>
|
||||
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
|
||||
</field-validator>
|
||||
</field>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Maven Archetypes</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-blank</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Blank</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-blank</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-blank</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
+64
-57
@@ -1,61 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archetype-descriptor name="struts2-archetype-blank">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="true" packaged="true">
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="true">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*package*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="true">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*-validation.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="true" packaged="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/struts.xml</include>
|
||||
<include>**/example.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/webapp/example</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/index.html</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/webapp/WEB-INF</directory>
|
||||
<includes>
|
||||
<include>**/web.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<fileSet filtered="true" packaged="true">
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="true">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*package*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>log4j.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="true">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*-validation.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="true" packaged="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/struts.xml</include>
|
||||
<include>**/example.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/webapp/example</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/index.html</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/webapp/WEB-INF</directory>
|
||||
<includes>
|
||||
<include>**/web.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
<value>file:\${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
@@ -82,10 +82,10 @@
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppSourceDirectory>\${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-blank</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
<descriptor>\${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-convention</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Blank Convention</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-convention</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-convention</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-convention</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
+7
@@ -23,6 +23,13 @@
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>log4j.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
|
||||
+4
-4
@@ -88,7 +88,7 @@
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
<value>file:\${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
@@ -96,10 +96,10 @@
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppSourceDirectory>\${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
<contextPath>/struts2-convention</contextPath>
|
||||
<descriptor>\${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-dbportlet</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Database Portlet</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-dbportlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-dbportlet</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-dbportlet</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-plugin</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-plugin</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-portlet</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Portlet</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-portlet</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-portlet</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-starter</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Struts 2 Archetypes - Starter</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-starter</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-starter</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/archetypes/struts2-archetype-starter</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
<value>file:\${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
@@ -105,10 +105,10 @@
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppSourceDirectory>\${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
<descriptor>\${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -11,13 +11,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/assembly</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/assembly</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-admin-bundle</artifactId>
|
||||
@@ -12,9 +12,9 @@
|
||||
<name>Struts 2 OSGi Admin Bundle</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles/admin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles/admin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/bundles/admin</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-demo-bundle</artifactId>
|
||||
@@ -12,9 +12,9 @@
|
||||
<name>Struts 2 OSGi Demo Bundle</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles/demo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles/demo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/bundles/demo</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts OSGi Bundles</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/bundles</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Core</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/core</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/core</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/core</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/core</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -228,6 +228,9 @@ public final class StrutsConstants {
|
||||
/** Enables caching of parsed OGNL expressions **/
|
||||
public static final String STRUTS_ENABLE_OGNL_EXPRESSION_CACHE = "struts.ognl.enableExpressionCache";
|
||||
|
||||
/** Enables evaluation of OGNL expressions **/
|
||||
public static final String STRUTS_ENABLE_OGNL_EVAL_EXPRESSION = "struts.ognl.enableOGNLEvalExpression";
|
||||
|
||||
/** The{@link org.apache.struts2.views.util.UrlHelper} implementation class **/
|
||||
public static final String STRUTS_URL_HELPER = "struts.view.urlHelper";
|
||||
|
||||
@@ -247,4 +250,6 @@ public final class StrutsConstants {
|
||||
public static final String STRUTS_CONVERTER_CREATOR = "struts.converter.creator";
|
||||
public static final String STRUTS_CONVERTER_HOLDER = "struts..converter.holder";
|
||||
|
||||
public static final String STRUTS_EXPRESSION_PARSER = "struts.expression.parser";
|
||||
|
||||
}
|
||||
|
||||
@@ -881,7 +881,7 @@ public abstract class UIBean extends Component {
|
||||
if (name != null) {
|
||||
return name.replaceAll("[\\/\\.\\[\\]]", "_");
|
||||
} else {
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -895,7 +895,7 @@ public abstract class UIBean extends Component {
|
||||
if (val != null) {
|
||||
return val.replaceAll("\"", """);
|
||||
} else {
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,10 +49,7 @@ import com.opensymphony.xwork2.inject.ContainerBuilder;
|
||||
import com.opensymphony.xwork2.inject.Context;
|
||||
import com.opensymphony.xwork2.inject.Factory;
|
||||
import com.opensymphony.xwork2.inject.Scope;
|
||||
import com.opensymphony.xwork2.util.ClassLoaderUtil;
|
||||
import com.opensymphony.xwork2.util.LocalizedTextUtil;
|
||||
import com.opensymphony.xwork2.util.PatternMatcher;
|
||||
import com.opensymphony.xwork2.util.ValueStackFactory;
|
||||
import com.opensymphony.xwork2.util.*;
|
||||
import com.opensymphony.xwork2.util.location.LocatableProperties;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
@@ -276,6 +273,13 @@ import java.util.StringTokenizer;
|
||||
* <td>singleton</td>
|
||||
* <td>Holds user converters' instances</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>com.opensymphony.xwork2.util.TextParser</td>
|
||||
* <td>struts.expression.parser</td>
|
||||
* <td>singleton</td>
|
||||
* <td>Used to parse expressions like ${foo.bar} or %{bar.foo} but it is up tp the TextParser's
|
||||
* implementation what kind of opening char to use (#, $, %, etc)</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* <!-- END SNIPPET: extensionPoints -->
|
||||
@@ -355,6 +359,8 @@ public class BeanSelectionProvider implements ConfigurationProvider {
|
||||
alias(UnknownHandlerManager.class, StrutsConstants.STRUTS_UNKNOWN_HANDLER_MANAGER, builder, props);
|
||||
alias(UrlHelper.class, StrutsConstants.STRUTS_URL_HELPER, builder, props);
|
||||
|
||||
alias(TextParser.class, StrutsConstants.STRUTS_EXPRESSION_PARSER, builder, props);
|
||||
|
||||
if ("true".equalsIgnoreCase(props.getProperty(StrutsConstants.STRUTS_DEVMODE))) {
|
||||
props.setProperty(StrutsConstants.STRUTS_I18N_RELOAD, "true");
|
||||
props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true");
|
||||
@@ -369,6 +375,7 @@ public class BeanSelectionProvider implements ConfigurationProvider {
|
||||
// Convert Struts properties into XWork properties
|
||||
convertIfExist(props, StrutsConstants.STRUTS_LOG_MISSING_PROPERTIES, XWorkConstants.LOG_MISSING_PROPERTIES);
|
||||
convertIfExist(props, StrutsConstants.STRUTS_ENABLE_OGNL_EXPRESSION_CACHE, XWorkConstants.ENABLE_OGNL_EXPRESSION_CACHE);
|
||||
convertIfExist(props, StrutsConstants.STRUTS_ENABLE_OGNL_EVAL_EXPRESSION, XWorkConstants.ENABLE_OGNL_EVAL_EXPRESSION);
|
||||
convertIfExist(props, StrutsConstants.STRUTS_ALLOW_STATIC_METHOD_ACCESS, XWorkConstants.ALLOW_STATIC_METHOD_ACCESS);
|
||||
convertIfExist(props, StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, XWorkConstants.RELOAD_XML_CONFIGURATION);
|
||||
|
||||
|
||||
@@ -139,9 +139,9 @@ public class Dispatcher {
|
||||
private String multipartSaveDir;
|
||||
|
||||
/**
|
||||
* Stores reference to instance of {@link MultiPartRequest} implementation defined by {@link StrutsConstants#STRUTS_MULTIPART_PARSER}
|
||||
* Stores the value of StrutsConstants.STRUTS_MULTIPART_HANDLER setting
|
||||
*/
|
||||
private MultiPartRequest multipartHandler;
|
||||
private String multipartHandlerName;
|
||||
|
||||
/**
|
||||
* Provide list of default configuration files.
|
||||
@@ -252,9 +252,9 @@ public class Dispatcher {
|
||||
multipartSaveDir = val;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setMultipartHandler(MultiPartRequest multiPartRequest) {
|
||||
this.multipartHandler = multiPartRequest;
|
||||
@Inject(StrutsConstants.STRUTS_MULTIPART_PARSER)
|
||||
public void setMultipartHandler(String val) {
|
||||
multipartHandlerName = val;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@@ -774,8 +774,9 @@ public class Dispatcher {
|
||||
|
||||
String content_type = request.getContentType();
|
||||
if (content_type != null && content_type.contains("multipart/form-data")) {
|
||||
MultiPartRequest mpr = getMultiPartRequest();
|
||||
LocaleProvider provider = getContainer().getInstance(LocaleProvider.class);
|
||||
request = new MultiPartRequestWrapper(multipartHandler, request, getSaveDir(servletContext), provider);
|
||||
request = new MultiPartRequestWrapper(mpr, request, getSaveDir(servletContext), provider);
|
||||
} else {
|
||||
request = new StrutsRequestWrapper(request);
|
||||
}
|
||||
@@ -783,6 +784,27 @@ public class Dispatcher {
|
||||
return request;
|
||||
}
|
||||
|
||||
/**
|
||||
* On each request it must return a new instance as implementation could be not thread safe
|
||||
* and thus ensure of resource clean up
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected MultiPartRequest getMultiPartRequest() {
|
||||
MultiPartRequest mpr = null;
|
||||
//check for alternate implementations of MultiPartRequest
|
||||
Set<String> multiNames = getContainer().getInstanceNames(MultiPartRequest.class);
|
||||
for (String multiName : multiNames) {
|
||||
if (multiName.equals(multipartHandlerName)) {
|
||||
mpr = getContainer().getInstance(MultiPartRequest.class, multiName);
|
||||
}
|
||||
}
|
||||
if (mpr == null ) {
|
||||
mpr = getContainer().getInstance(MultiPartRequest.class);
|
||||
}
|
||||
return mpr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all the files created by MultiPartRequestWrapper.
|
||||
*
|
||||
|
||||
@@ -82,6 +82,11 @@ public class HttpHeaderResult implements Result {
|
||||
private static final long serialVersionUID = 195648957144219214L;
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpHeaderResult.class);
|
||||
|
||||
/**
|
||||
* This result type doesn't have a default param, null is ok to reduce noice in logs
|
||||
*/
|
||||
public static final String DEFAULT_PARAM = null;
|
||||
|
||||
private boolean parse = true;
|
||||
private Map<String, String> headers;
|
||||
private int status = -1;
|
||||
|
||||
@@ -198,8 +198,9 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec
|
||||
if (resultConfig != null) {
|
||||
Map<String, String> resultConfigParams = resultConfig.getParams();
|
||||
|
||||
List<String> prohibitedResultParams = getProhibitedResultParams();
|
||||
for (Map.Entry<String, String> e : resultConfigParams.entrySet()) {
|
||||
if (!getProhibitedResultParams().contains(e.getKey())) {
|
||||
if (!prohibitedResultParams.contains(e.getKey())) {
|
||||
String potentialValue = e.getValue() == null ? "" : conditionalParse(e.getValue(), invocation);
|
||||
if (!suppressEmptyParameters || ((potentialValue != null) && (potentialValue.length() > 0))) {
|
||||
requestParameters.put(e.getKey(), potentialValue);
|
||||
@@ -227,7 +228,18 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec
|
||||
}
|
||||
|
||||
protected List<String> getProhibitedResultParams() {
|
||||
return Arrays.asList(DEFAULT_PARAM, "namespace", "method", "encode", "parse", "location", "prependServletContext", "suppressEmptyParameters", "anchor");
|
||||
return Arrays.asList(
|
||||
DEFAULT_PARAM,
|
||||
"namespace",
|
||||
"method",
|
||||
"encode",
|
||||
"parse",
|
||||
"location",
|
||||
"prependServletContext",
|
||||
"suppressEmptyParameters",
|
||||
"anchor",
|
||||
"statusCode"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -197,13 +197,13 @@ public abstract class StrutsResultSupport implements Result, StrutsStatics {
|
||||
if (parse && param != null && invocation != null) {
|
||||
return TextParseUtil.translateVariables(param, invocation.getStack(),
|
||||
new TextParseUtil.ParsedValueEvaluator() {
|
||||
public Object evaluate(Object parsedValue) {
|
||||
public Object evaluate(String parsedValue) {
|
||||
if (encode) {
|
||||
if (parsedValue != null) {
|
||||
try {
|
||||
// use UTF-8 as this is the recommended encoding by W3C to
|
||||
// avoid incompatibilities.
|
||||
return URLEncoder.encode(parsedValue.toString(), "UTF-8");
|
||||
return URLEncoder.encode(parsedValue, "UTF-8");
|
||||
}
|
||||
catch(UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
|
||||
@@ -21,18 +21,16 @@
|
||||
|
||||
package org.apache.struts2.dispatcher.mapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <!-- START SNIPPET: description -->
|
||||
@@ -88,12 +86,11 @@ public class CompositeActionMapper implements ActionMapper {
|
||||
protected Container container;
|
||||
|
||||
protected List<ActionMapper> actionMappers = new ArrayList<ActionMapper>();
|
||||
|
||||
@Inject
|
||||
public void setContainer(Container container) {
|
||||
|
||||
public CompositeActionMapper(@Inject Container container) {
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
|
||||
@Inject(StrutsConstants.STRUTS_MAPPER_COMPOSITE)
|
||||
public void setActionMappers(String list) {
|
||||
if (list != null) {
|
||||
|
||||
@@ -295,8 +295,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
*
|
||||
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getMapping(javax.servlet.http.HttpServletRequest)
|
||||
*/
|
||||
public ActionMapping getMapping(HttpServletRequest request,
|
||||
ConfigurationManager configManager) {
|
||||
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
|
||||
ActionMapping mapping = new ActionMapping();
|
||||
String uri = getUri(request);
|
||||
|
||||
@@ -309,22 +308,13 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
}
|
||||
|
||||
parseNameAndNamespace(uri, mapping, configManager);
|
||||
|
||||
handleSpecialParameters(request, mapping);
|
||||
|
||||
// if Action name is empty it can be a request to static resource, return null to handle that case
|
||||
if (StringUtils.isEmpty(mapping.getName())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
parseActionName(mapping);
|
||||
|
||||
return mapping;
|
||||
return parseActionName(mapping);
|
||||
}
|
||||
|
||||
protected ActionMapping parseActionName(ActionMapping mapping) {
|
||||
if (mapping.getName() == null) {
|
||||
return mapping;
|
||||
return null;
|
||||
}
|
||||
if (allowDynamicMethodCalls) {
|
||||
// handle "name!method" convention.
|
||||
@@ -346,8 +336,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
* @param request The request
|
||||
* @param mapping The action mapping
|
||||
*/
|
||||
public void handleSpecialParameters(HttpServletRequest request,
|
||||
ActionMapping mapping) {
|
||||
public void handleSpecialParameters(HttpServletRequest request, ActionMapping mapping) {
|
||||
// handle special parameter prefixes.
|
||||
Set<String> uniqueParameters = new HashSet<String>();
|
||||
Map parameterMap = request.getParameterMap();
|
||||
@@ -377,8 +366,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
* @param uri The uri
|
||||
* @param mapping The action mapping to populate
|
||||
*/
|
||||
protected void parseNameAndNamespace(String uri, ActionMapping mapping,
|
||||
ConfigurationManager configManager) {
|
||||
protected void parseNameAndNamespace(String uri, ActionMapping mapping, ConfigurationManager configManager) {
|
||||
String namespace, name;
|
||||
int lastSlash = uri.lastIndexOf("/");
|
||||
if (lastSlash == -1) {
|
||||
@@ -421,7 +409,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
}
|
||||
}
|
||||
|
||||
if (!allowSlashesInActionNames && name != null) {
|
||||
if (!allowSlashesInActionNames) {
|
||||
int pos = name.lastIndexOf('/');
|
||||
if (pos > -1 && pos < name.length() - 1) {
|
||||
name = name.substring(pos + 1);
|
||||
|
||||
@@ -2,12 +2,14 @@ package org.apache.struts2.util.fs;
|
||||
|
||||
import com.opensymphony.xwork2.util.fs.DefaultFileManager;
|
||||
import com.opensymphony.xwork2.util.fs.FileRevision;
|
||||
import com.opensymphony.xwork2.util.fs.JarEntryRevision;
|
||||
import com.opensymphony.xwork2.util.fs.Revision;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@@ -45,7 +47,7 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Cannot load [#0] class, not a JBoss 5!", VFS_JBOSS7);
|
||||
LOG.debug("Cannot load [#0] class, not a JBoss 5!", VFS_JBOSS5);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -70,7 +72,18 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Creating revision for URL: " + fileName);
|
||||
}
|
||||
Revision revision = FileRevision.build(normalizeToFileProtocol(fileUrl));
|
||||
URL normalizedUrl = normalizeToFileProtocol(fileUrl);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Normalized URL for [#0] is [#1]", fileName, normalizedUrl.toString());
|
||||
}
|
||||
Revision revision;
|
||||
if ("file".equals(normalizedUrl.getProtocol())) {
|
||||
revision = FileRevision.build(normalizedUrl);
|
||||
} else if ("jar".equals(normalizedUrl.getProtocol())) {
|
||||
revision = JarEntryRevision.build(normalizedUrl);
|
||||
} else {
|
||||
revision = Revision.build(normalizedUrl);
|
||||
}
|
||||
files.put(fileName, revision);
|
||||
} else {
|
||||
super.monitorFile(fileUrl);
|
||||
@@ -122,43 +135,71 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
*/
|
||||
protected URL getJBossPhysicalUrl(URL url) throws IOException {
|
||||
Object content = url.openConnection().getContent();
|
||||
try {
|
||||
String s = content.getClass().toString();
|
||||
if (s.startsWith("class org.jboss.vfs.VirtualFile")) { // JBoss 7 and probably 6
|
||||
File physicalFile = readJBossPhysicalFile(content);
|
||||
return physicalFile.toURI().toURL();
|
||||
} else if (s.startsWith("class org.jboss.virtual.VirtualFile")) { // JBoss 5
|
||||
String fileName = url.toExternalForm();
|
||||
return new URL("file", null, fileName.substring(fileName.indexOf(":") + 1));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Error calling getPhysicalFile() on JBoss VirtualFile.", e);
|
||||
String classContent = content.getClass().toString();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Reading physical URL for [#0]", url.toString());
|
||||
}
|
||||
if (classContent.startsWith("class org.jboss.vfs.VirtualFile")) { // JBoss 7 and probably 6
|
||||
File physicalFile = readJBossPhysicalFile(content);
|
||||
return physicalFile.toURI().toURL();
|
||||
} else if (classContent.startsWith("class org.jboss.virtual.VirtualFile")) { // JBoss 5
|
||||
return readJBoss5Url(content);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
private File readJBossPhysicalFile(Object content) throws Exception {
|
||||
Method method = content.getClass().getDeclaredMethod("getPhysicalFile");
|
||||
return (File) method.invoke(content);
|
||||
}
|
||||
|
||||
private List<URL> getAllJBossPhysicalUrls(URL url) throws IOException {
|
||||
List<URL> urls = new ArrayList<URL>();
|
||||
Object content = url.openConnection().getContent();
|
||||
try {
|
||||
if (content.getClass().toString().startsWith("class org.jboss.vfs.VirtualFile")) {
|
||||
File physicalFile = readJBossPhysicalFile(content);
|
||||
String classContent = content.getClass().toString();
|
||||
if (classContent.startsWith("class org.jboss.vfs.VirtualFile")) {
|
||||
File physicalFile = readJBossPhysicalFile(content);
|
||||
if (physicalFile != null) {
|
||||
readFile(urls, physicalFile);
|
||||
readFile(urls, physicalFile.getParentFile());
|
||||
} else {
|
||||
urls.add(url);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Error calling getPhysicalFile() on JBoss VirtualFile!", e);
|
||||
} else if (classContent.startsWith("class org.jboss.virtual.VirtualFile")) {
|
||||
URL physicalUrl = readJBoss5Url(content);
|
||||
if (physicalUrl != null) {
|
||||
urls.add(physicalUrl);
|
||||
}
|
||||
} else {
|
||||
urls.add(url);
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
|
||||
private File readJBossPhysicalFile(Object content) {
|
||||
try {
|
||||
Method method = content.getClass().getDeclaredMethod("getPhysicalFile");
|
||||
return (File) method.invoke(content);
|
||||
} catch (NoSuchMethodException e) {
|
||||
LOG.error("Provided class content [#0] is not a JBoss VirtualFile, getPhysicalFile() method not found!", e, content.getClass().getSimpleName());
|
||||
} catch (InvocationTargetException e) {
|
||||
LOG.error("Cannot invoke getPhysicalFile() method!", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
LOG.error("Cannot access getPhysicalFile() method!", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private URL readJBoss5Url(Object content) {
|
||||
try {
|
||||
Method method = content.getClass().getDeclaredMethod("getHandler");
|
||||
method.setAccessible(true);
|
||||
Object handler = method.invoke(content);
|
||||
method = handler.getClass().getMethod("getRealURL");
|
||||
return (URL) method.invoke(handler);
|
||||
} catch (NoSuchMethodException e) {
|
||||
LOG.error("Provided class content [#0] is not a JBoss VirtualFile, getHandler() or getRealURL() method not found!", e, content.getClass().getSimpleName());
|
||||
} catch (InvocationTargetException e) {
|
||||
LOG.error("Cannot invoke getHandler() or getRealURL() method!", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
LOG.error("Cannot access getHandler() or getRealURL() method!", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void readFile(List<URL> urls, File physicalFile) throws MalformedURLException {
|
||||
File[] files = physicalFile.listFiles();
|
||||
if (physicalFile.isDirectory() && files != null) {
|
||||
|
||||
@@ -26,6 +26,8 @@ import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.LocaleProvider;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.ObjectWrapper;
|
||||
import freemarker.template.Template;
|
||||
@@ -103,6 +105,8 @@ public class FreemarkerResult extends StrutsResultSupport {
|
||||
|
||||
private static final long serialVersionUID = -3778230771704661631L;
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(FreemarkerResult.class);
|
||||
|
||||
protected ActionInvocation invocation;
|
||||
protected Configuration configuration;
|
||||
protected ObjectWrapper wrapper;
|
||||
@@ -191,6 +195,16 @@ public class FreemarkerResult extends StrutsResultSupport {
|
||||
parentCharArrayWriter.flush();
|
||||
parentCharArrayWriter.writeTo(writer);
|
||||
}
|
||||
} catch (TemplateException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Error processing Freemarker result!", e);
|
||||
}
|
||||
throw e;
|
||||
} catch (IOException e) {
|
||||
if (LOG.isErrorEnabled()){
|
||||
LOG.error("Error processing Freemarker result!", e);
|
||||
}
|
||||
throw e;
|
||||
} finally {
|
||||
if (isTopTemplate && parentCharArrayWriter != null) {
|
||||
req.removeAttribute(PARENT_TEMPLATE_WRITER);
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
protected String requiredposition;
|
||||
protected String errorPosition;
|
||||
protected String name;
|
||||
protected String required;
|
||||
protected String requiredLabel;
|
||||
protected String tabindex;
|
||||
protected String value;
|
||||
protected String template;
|
||||
@@ -100,7 +100,7 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
uiBean.setRequiredPosition(requiredposition);
|
||||
uiBean.setErrorPosition(errorPosition);
|
||||
uiBean.setName(name);
|
||||
uiBean.setRequiredLabel(required);
|
||||
uiBean.setRequiredLabel(requiredLabel);
|
||||
uiBean.setTabindex(tabindex);
|
||||
uiBean.setValue(value);
|
||||
uiBean.setTemplate(template);
|
||||
@@ -181,8 +181,8 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setRequired(String required) {
|
||||
this.required = required;
|
||||
public void setRequiredLabel(String requiredLabel) {
|
||||
this.requiredLabel = requiredLabel;
|
||||
}
|
||||
|
||||
public void setTabindex(String tabindex) {
|
||||
|
||||
@@ -241,47 +241,45 @@ public class DefaultUrlHelper implements UrlHelper {
|
||||
|
||||
private String buildParameterSubstring(String name, String value) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(translateAndEncode(name));
|
||||
builder.append(encode(name));
|
||||
builder.append('=');
|
||||
builder.append(translateAndEncode(value));
|
||||
builder.append(encode(value));
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates any script expressions using {@link com.opensymphony.xwork2.util.TextParseUtil#translateVariables} and
|
||||
* encodes the URL using {@link java.net.URLEncoder#encode} with the encoding specified in the configuration.
|
||||
*
|
||||
* @param input
|
||||
* @return the translated and encoded string
|
||||
*/
|
||||
public String translateAndEncode(String input) {
|
||||
String translatedInput = translateVariable(input);
|
||||
try {
|
||||
return URLEncoder.encode(translatedInput, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Could not encode URL parameter '#0', returning value un-encoded", input);
|
||||
}
|
||||
return translatedInput;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Encodes the URL using {@link java.net.URLEncoder#encode} with the encoding specified in the configuration.
|
||||
*
|
||||
* @param input the input to encode
|
||||
* @return the encoded string
|
||||
*/
|
||||
public String encode( String input ) {
|
||||
try {
|
||||
return URLEncoder.encode(input, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Could not encode URL parameter '#0', returning value un-encoded", input);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
}
|
||||
|
||||
public String translateAndDecode(String input) {
|
||||
String translatedInput = translateVariable(input);
|
||||
try {
|
||||
return URLDecoder.decode(translatedInput, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Could not encode URL parameter '#0', returning value un-encoded", input);
|
||||
}
|
||||
return translatedInput;
|
||||
}
|
||||
}
|
||||
|
||||
private String translateVariable(String input) {
|
||||
ValueStack valueStack = ServletActionContext.getContext().getValueStack();
|
||||
return TextParseUtil.translateVariables(input, valueStack);
|
||||
}
|
||||
/**
|
||||
* Decodes the URL using {@link java.net.URLDecoder#decode(String, String)} with the encoding specified in the configuration.
|
||||
*
|
||||
* @param input the input to decode
|
||||
* @return the encoded string
|
||||
*/
|
||||
public String decode( String input ) {
|
||||
try {
|
||||
return URLDecoder.decode(input, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Could not decode URL parameter '#0', returning value un-decoded", input);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Object> parseQueryString(String queryString, boolean forceValueArray) {
|
||||
Map<String, Object> queryParams = new LinkedHashMap<String, Object>();
|
||||
@@ -299,8 +297,8 @@ public class DefaultUrlHelper implements UrlHelper {
|
||||
paramValue = tmpParams[1];
|
||||
}
|
||||
if (paramName != null) {
|
||||
paramName = translateAndDecode(paramName);
|
||||
String translatedParamValue = translateAndDecode(paramValue);
|
||||
paramName = decode(paramName);
|
||||
String translatedParamValue = decode(paramValue);
|
||||
|
||||
if (queryParams.containsKey(paramName) || forceValueArray) {
|
||||
// WW-1619 append new param value to existing value(s)
|
||||
|
||||
@@ -100,6 +100,8 @@
|
||||
|
||||
<bean class="com.opensymphony.xwork2.ognl.OgnlUtil" />
|
||||
|
||||
<bean type="com.opensymphony.xwork2.util.TextParser" name="struts" class="com.opensymphony.xwork2.util.OgnlTextParser" scope="singleton"/>
|
||||
|
||||
<bean type="ognl.PropertyAccessor" name="com.opensymphony.xwork2.util.CompoundRoot" class="com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor" />
|
||||
<bean type="ognl.PropertyAccessor" name="java.lang.Object" class="com.opensymphony.xwork2.ognl.accessor.ObjectAccessor" />
|
||||
<bean type="ognl.PropertyAccessor" name="java.util.Iterator" class="com.opensymphony.xwork2.ognl.accessor.XWorkIteratorPropertyAccessor" />
|
||||
|
||||
@@ -183,6 +183,7 @@ public class ServletRedirectResultTest extends StrutsTestCase implements StrutsS
|
||||
.addParam("location", "someLocation")
|
||||
.addParam("prependServletContext", "true")
|
||||
.addParam("method", "someMethod")
|
||||
.addParam("statusCode", "333")
|
||||
.addParam("param1", "value 1")
|
||||
.addParam("param2", "value 2")
|
||||
.addParam("param3", "value 3")
|
||||
@@ -221,7 +222,6 @@ public class ServletRedirectResultTest extends StrutsTestCase implements StrutsS
|
||||
result.setActionMapper(container.getInstance(ActionMapper.class));
|
||||
result.execute(mockInvocation);
|
||||
assertEquals("/myNamespace/myAction.action?param1=value+1¶m2=value+2¶m3=value+3#fragment", res.getRedirectedUrl());
|
||||
|
||||
control.verify();
|
||||
}
|
||||
|
||||
|
||||
+4
-14
@@ -21,23 +21,14 @@
|
||||
|
||||
package org.apache.struts2.dispatcher.mapper;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
import com.mockobjects.dynamic.C;
|
||||
import com.mockobjects.dynamic.Mock;
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.inject.Scope.Strategy;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -49,9 +40,8 @@ public class CompositeActionMapperTest extends TestCase {
|
||||
Mock mockContainer;
|
||||
|
||||
public void setUp() throws Exception {
|
||||
compositeActionMapper = new CompositeActionMapper();
|
||||
mockContainer = new Mock(Container.class);
|
||||
compositeActionMapper.setContainer((Container)mockContainer.proxy());
|
||||
compositeActionMapper = new CompositeActionMapper((Container)mockContainer.proxy());
|
||||
}
|
||||
|
||||
|
||||
|
||||
+11
-13
@@ -21,17 +21,6 @@
|
||||
|
||||
package org.apache.struts2.dispatcher.mapper;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.ServletRedirectResult;
|
||||
import org.apache.struts2.dispatcher.StrutsResultSupport;
|
||||
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
|
||||
import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse;
|
||||
|
||||
import com.mockobjects.dynamic.Mock;
|
||||
import com.mockobjects.servlet.MockHttpServletRequest;
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
@@ -41,6 +30,16 @@ import com.opensymphony.xwork2.config.Configuration;
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.config.entities.PackageConfig;
|
||||
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.ServletRedirectResult;
|
||||
import org.apache.struts2.dispatcher.StrutsResultSupport;
|
||||
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
|
||||
import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DefaultActionMapper test case.
|
||||
@@ -257,8 +256,7 @@ public class DefaultActionMapperTest extends StrutsTestCase {
|
||||
public void testGetMappingWithActionName_null() throws Exception {
|
||||
DefaultActionMapper mapper = new DefaultActionMapper();
|
||||
ActionMapping mapping = mapper.getMappingFromActionName(null);
|
||||
assertEquals(null, mapping.getName());
|
||||
assertEquals(null, mapping.getMethod());
|
||||
assertNull(mapping);
|
||||
}
|
||||
|
||||
public void testGetUri() throws Exception {
|
||||
|
||||
@@ -380,7 +380,7 @@ public class DefaultUrlHelperTest extends StrutsTestCase {
|
||||
|
||||
public void testTranslateAndEncode() throws Exception {
|
||||
setProp(StrutsConstants.STRUTS_I18N_ENCODING, "UTF-8");
|
||||
String result = urlHelper.translateAndEncode("\u65b0\u805e");
|
||||
String result = urlHelper.encode("\u65b0\u805e");
|
||||
String expectedResult = "%E6%96%B0%E8%81%9E";
|
||||
|
||||
assertEquals(result, expectedResult);
|
||||
@@ -388,7 +388,7 @@ public class DefaultUrlHelperTest extends StrutsTestCase {
|
||||
|
||||
public void testTranslateAndDecode() throws Exception {
|
||||
setProp(StrutsConstants.STRUTS_I18N_ENCODING, "UTF-8");
|
||||
String result = urlHelper.translateAndDecode("%E6%96%B0%E8%81%9E");
|
||||
String result = urlHelper.decode("%E6%96%B0%E8%81%9E");
|
||||
String expectedResult = "\u65b0\u805e";
|
||||
|
||||
assertEquals(result, expectedResult);
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-codebehind-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Codebehind Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/codebehind</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/codebehind</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/codebehind</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/codebehind</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/codebehind</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/codebehind</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Configuration Browser Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/config-browser</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/config-browser</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/config-browser</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/config-browser</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/config-browser</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/config-browser</url>
|
||||
</scm>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-convention-plugin</artifactId>
|
||||
@@ -11,9 +11,9 @@
|
||||
<name>Struts 2 Convention Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-convention-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-convention-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-convention-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/branches/STRUTS_2_3_14_X/tags/STRUTS_2_3_14_2/trunk/struts2-convention-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/branches/STRUTS_2_3_14_X/tags/STRUTS_2_3_14_2/trunk/struts2-convention-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/branches/STRUTS_2_3_14_X/tags/STRUTS_2_3_14_2/trunk/struts2-convention-plugin</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
||||
+1
-1
@@ -757,7 +757,7 @@ public class PackageBasedActionConfigBuilderTest extends TestCase {
|
||||
((ObjectFactory)obj).setReflectionProvider(new OgnlReflectionProvider() {
|
||||
|
||||
@Override
|
||||
public void setProperties(Map<String, String> properties, Object o) {
|
||||
public void setProperties(Map<String, ?> properties, Object o) {
|
||||
}
|
||||
|
||||
public void setProperties(Map<String, String> properties, Object o, Map<String, Object> context, boolean throwPropertyExceptions) throws ReflectionException {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<parent>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
@@ -33,9 +33,9 @@
|
||||
<name>Struts 2 Dojo Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dojo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dojo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/dojo</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/dojo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/dojo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/dojo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-dwr-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 DWR Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dwr</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dwr</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/dwr</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/dwr</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/dwr</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/dwr</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
@@ -35,9 +35,9 @@
|
||||
<name>Struts 2 Embedded JSP Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/embeddedjsp</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/embeddedjsp</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/embeddedjsp</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/embeddedjsp</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/embeddedjsp</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/embeddedjsp</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -25,6 +25,8 @@ import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.util.TextParser;
|
||||
import com.opensymphony.xwork2.util.OgnlTextParser;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
|
||||
import com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate;
|
||||
@@ -275,6 +277,8 @@ public class EmbeddedJSPResultTest extends TestCase {
|
||||
//mock container
|
||||
Container container = EasyMock.createNiceMock(Container.class);
|
||||
EasyMock.expect(container.getInstance(XWorkConverter.class)).andReturn(converter).anyTimes();
|
||||
TextParser parser = new OgnlTextParser();
|
||||
EasyMock.expect(container.getInstance(TextParser.class)).andReturn(parser).anyTimes();
|
||||
EasyMock.expect(container.getInstanceNames(FileManager.class)).andReturn(new HashSet<String>()).anyTimes();
|
||||
EasyMock.expect(container.getInstance(FileManager.class)).andReturn(fileManager).anyTimes();
|
||||
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
@@ -13,9 +13,9 @@
|
||||
<url>http://struts.apache.org</url>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-gxp-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-gxp-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-gxp-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/branches/STRUTS_2_3_14_X/tags/STRUTS_2_3_14_2/trunk/struts2-gxp-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/branches/STRUTS_2_3_14_X/tags/STRUTS_2_3_14_2/trunk/struts2-gxp-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/branches/STRUTS_2_3_14_X/tags/STRUTS_2_3_14_2/trunk/struts2-gxp-plugin</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-jasperreports-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Jasper Reports Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jasperreports</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jasperreports</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/jasperreports</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jasperreports</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jasperreports</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jasperreports</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-javatemplates-plugin</artifactId>
|
||||
@@ -33,9 +33,9 @@
|
||||
<name>Struts 2 Java Templates Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/javatemplates</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/javatemplates</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/javatemplates</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/javatemplates</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/javatemplates</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/javatemplates</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+5
-1
@@ -24,10 +24,12 @@ package org.apache.struts2.views.java.simple;
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.util.TextParser;
|
||||
import com.opensymphony.xwork2.util.OgnlTextParser;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.struts2.components.Component;
|
||||
import org.apache.struts2.components.UIBean;
|
||||
import org.apache.struts2.components.template.Template;
|
||||
@@ -107,6 +109,8 @@ public abstract class AbstractTest extends TestCase {
|
||||
XWorkConverter converter = new ConverterEx();
|
||||
EasyMock.expect(container.getInstance(String.class, StrutsConstants.STRUTS_TAG_ALTSYNTAX)).andReturn("true").anyTimes();
|
||||
EasyMock.expect(container.getInstance(XWorkConverter.class)).andReturn(converter).anyTimes();
|
||||
TextParser parser = new OgnlTextParser();
|
||||
EasyMock.expect(container.getInstance(TextParser.class)).andReturn(parser).anyTimes();
|
||||
stackContext.put(ActionContext.CONTAINER, container);
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-jfreechart-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 JFreeChart Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jfreechart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jfreechart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/jfreechart</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jfreechart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jfreechart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jfreechart</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-jsf-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 JSF Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jsf</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jsf</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/jsf</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jsf</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jsf</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/jsf</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -21,15 +21,14 @@
|
||||
|
||||
package org.apache.struts2.jsf;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.application.NavigationHandler;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.config.entities.ActionConfig;
|
||||
import com.opensymphony.xwork2.config.entities.ResultConfig;
|
||||
|
||||
import javax.faces.application.NavigationHandler;
|
||||
import javax.faces.context.FacesContext;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Overrides the JFS navigation by delegating the result to handling by the core
|
||||
* result code lookup and execution. If a result cannot be found, the previous
|
||||
@@ -60,7 +59,7 @@ public class StrutsNavigationHandler extends NavigationHandler {
|
||||
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
|
||||
ActionContext ctx = ActionContext.getContext();
|
||||
if (outcome != null) {
|
||||
if (ctx == null && ctx.getActionInvocation() == null) {
|
||||
if (ctx == null || ctx.getActionInvocation() == null) {
|
||||
delegateToParentNavigation(facesContext, fromAction, outcome);
|
||||
} else {
|
||||
ActionConfig config = ctx.getActionInvocation().getProxy().getConfig();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-json-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 JSON Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/json</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/json</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/json</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/json</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/json</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/json</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
||||
+13
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-junit-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 JUnit Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/junit</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/junit</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/junit</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/junit</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/junit</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/junit</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -66,6 +66,15 @@
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Convention Plugin tests -->
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-convention-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Portlet -->
|
||||
<dependency>
|
||||
<groupId>javax.portlet</groupId>
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
|
||||
package org.apache.struts2;
|
||||
|
||||
import com.opensymphony.xwork2.*;
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.ActionProxy;
|
||||
import com.opensymphony.xwork2.ActionProxyFactory;
|
||||
import com.opensymphony.xwork2.ValidationAware;
|
||||
import com.opensymphony.xwork2.XWorkJUnit4TestCase;
|
||||
import com.opensymphony.xwork2.config.Configuration;
|
||||
import com.opensymphony.xwork2.interceptor.annotations.After;
|
||||
import com.opensymphony.xwork2.interceptor.annotations.Before;
|
||||
@@ -41,12 +45,18 @@ import org.springframework.mock.web.MockServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.*;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Formatter;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
@@ -199,6 +209,23 @@ public abstract class StrutsJUnit4TestCase<T> extends XWorkJUnit4TestCase {
|
||||
pageContext = new MockPageContext(servletContext, request, response);
|
||||
}
|
||||
|
||||
public void finishExecution() {
|
||||
HttpSession session = this.request.getSession();
|
||||
Enumeration attributeNames = session.getAttributeNames();
|
||||
|
||||
MockHttpServletRequest nextRequest = new MockHttpServletRequest();
|
||||
|
||||
while (attributeNames.hasMoreElements()) {
|
||||
String key = (String) attributeNames.nextElement();
|
||||
Object attribute = session.getAttribute(key);
|
||||
nextRequest.getSession().setAttribute(key, attribute);
|
||||
}
|
||||
|
||||
this.response = new MockHttpServletResponse();
|
||||
this.request = nextRequest;
|
||||
this.pageContext = new MockPageContext(servletContext, request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the configuration settings, XWork configuration, and
|
||||
* message resources
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* $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.
|
||||
*/
|
||||
package actions;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.apache.struts2.convention.annotation.Action;
|
||||
import org.apache.struts2.convention.annotation.Result;
|
||||
|
||||
/**
|
||||
* Example action, which is called by the convention plugin test case
|
||||
*/
|
||||
public class ViewAction extends ActionSupport {
|
||||
private String message;
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
public String execute() {
|
||||
message = "Hello World";
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* $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.
|
||||
*/
|
||||
package org.apache.struts2.convention;
|
||||
|
||||
import actions.ViewAction;
|
||||
import org.apache.struts2.StrutsJUnit4TestCase;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Uses the convention plugin to execute actions
|
||||
*/
|
||||
public class StrutsJUnit4ConventionTestCaseTest extends StrutsJUnit4TestCase<ViewAction>{
|
||||
@Test
|
||||
public void testConventionUrl() throws Exception {
|
||||
// TODO: Currently output is empty
|
||||
String output = executeAction("/view.action");
|
||||
|
||||
ViewAction action = this.getAction();
|
||||
Assert.assertEquals("Hello World", action.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getConfigPath() {
|
||||
return "struts-convention-configuration.xml";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* $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.
|
||||
*/
|
||||
package org.apache.struts2.session;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
|
||||
/**
|
||||
* An action which reads a value from the session.
|
||||
* The value is previously set by SessionSetAction.
|
||||
*/
|
||||
public class SessionGetAction extends ActionSupport {
|
||||
private static final long serialVersionUID = 8366502863472148631L;
|
||||
|
||||
public String execute() {
|
||||
return ActionSupport.SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* $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.
|
||||
*/
|
||||
package org.apache.struts2.session;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
|
||||
/**
|
||||
* An action which sets a value into the session
|
||||
*/
|
||||
public class SessionSetAction extends ActionSupport {
|
||||
private static final long serialVersionUID = -3097127804272607687L;
|
||||
|
||||
public String SESSION_KEY = "sessionKey";
|
||||
public String SESSION_VALUE = "sessionValue";
|
||||
|
||||
public String execute() {
|
||||
ActionContext.getContext().getSession().put(SESSION_KEY, SESSION_VALUE);
|
||||
return ActionSupport.SUCCESS;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* $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.
|
||||
*/
|
||||
|
||||
package org.apache.struts2.session;
|
||||
|
||||
import org.apache.struts2.JUnitTestAction;
|
||||
import org.apache.struts2.StrutsJUnit4TestCase;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Calls SessionSet which sets a value into the session and afterwards calls SessionGet, which
|
||||
* should return this session value.
|
||||
*
|
||||
* In prior versions only one executeAction() call could happen in a single test case, because
|
||||
* either the session values were deleted or the wrong result would be returned (always the result of
|
||||
* the first action execution).
|
||||
*/
|
||||
public class StrutsJUnit4SessionTestCaseTest extends StrutsJUnit4TestCase<JUnitTestAction>{
|
||||
@Test
|
||||
public void testPersistingSessionValues() throws Exception {
|
||||
String output = executeAction("/sessiontest/sessionSet.action");
|
||||
Assert.assertEquals("sessionValue", output);
|
||||
|
||||
this.finishExecution();
|
||||
|
||||
String output2 = executeAction("/sessiontest/sessionGet.action");
|
||||
Assert.assertEquals("sessionValue", output2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getConfigPath() {
|
||||
return "struts-session-values-test.xml";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
/*
|
||||
* $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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
||||
|
||||
<struts>
|
||||
<bean type="com.opensymphony.xwork2.UnknownHandler" name="convention" class="org.apache.struts2.convention.ConventionUnknownHandler"/>
|
||||
|
||||
<bean type="org.apache.struts2.convention.ActionConfigBuilder" name="convention" class="org.apache.struts2.convention.PackageBasedActionConfigBuilder"/>
|
||||
<bean type="org.apache.struts2.convention.ActionNameBuilder" name="convention" class="org.apache.struts2.convention.SEOActionNameBuilder"/>
|
||||
<bean type="org.apache.struts2.convention.ResultMapBuilder" name="convention" class="org.apache.struts2.convention.DefaultResultMapBuilder"/>
|
||||
<bean type="org.apache.struts2.convention.InterceptorMapBuilder" name="convention" class="org.apache.struts2.convention.DefaultInterceptorMapBuilder"/>
|
||||
<bean type="org.apache.struts2.convention.ConventionsService" name="convention" class="org.apache.struts2.convention.ConventionsServiceImpl"/>
|
||||
|
||||
<bean type="com.opensymphony.xwork2.config.PackageProvider" name="convention.packageProvider" class="org.apache.struts2.convention.ClasspathPackageProvider"/>
|
||||
<bean type="com.opensymphony.xwork2.config.PackageProvider" name="convention.containerProvider" class="org.apache.struts2.convention.ClasspathConfigurationProvider"/>
|
||||
|
||||
<constant name="struts.convention.actionConfigBuilder" value="convention"/>
|
||||
<constant name="struts.convention.actionNameBuilder" value="convention"/>
|
||||
<constant name="struts.convention.resultMapBuilder" value="convention"/>
|
||||
<constant name="struts.convention.interceptorMapBuilder" value="convention"/>
|
||||
<constant name="struts.convention.conventionsService" value="convention"/>
|
||||
|
||||
<constant name="struts.convention.result.path" value="/"/>
|
||||
<constant name="struts.convention.result.flatLayout" value="true"/>
|
||||
<constant name="struts.convention.action.suffix" value="Action"/>
|
||||
<constant name="struts.convention.action.disableScanning" value="false"/>
|
||||
<constant name="struts.convention.action.mapAllMatches" value="false"/>
|
||||
<constant name="struts.convention.action.checkImplementsAction" value="true"/>
|
||||
<constant name="struts.convention.default.parent.package" value="convention-default"/>
|
||||
<constant name="struts.convention.action.name.lowercase" value="true"/>
|
||||
<constant name="struts.convention.action.name.separator" value="-"/>
|
||||
<constant name="struts.convention.package.locators" value="action,actions,struts,struts2"/>
|
||||
<constant name="struts.convention.package.locators.disable" value="false"/>
|
||||
<constant name="struts.convention.package.locators.basePackage" value=""/>
|
||||
<constant name="struts.convention.exclude.packages" value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"/>
|
||||
<constant name="struts.convention.relative.result.types" value="dispatcher,velocity,freemarker"/>
|
||||
<constant name="struts.convention.redirect.to.slash" value="true"/>
|
||||
<constant name="struts.convention.action.alwaysMapExecute" value="true"/>
|
||||
<constant name="struts.mapper.alwaysSelectFullNamespace" value="true"/>
|
||||
<!-- <constant name="struts.convention.action.includeJars" /> -->
|
||||
<constant name="struts.convention.action.fileProtocols" value="jar" />
|
||||
|
||||
<constant name="struts.convention.classes.reload" value="false" />
|
||||
|
||||
<constant name="struts.convention.exclude.parentClassLoader" value="true" />
|
||||
|
||||
<package name="convention-default" extends="struts-default">
|
||||
</package>
|
||||
</struts>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!--
|
||||
~ $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.
|
||||
-->
|
||||
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.1.dtd">
|
||||
|
||||
<struts>
|
||||
<package name="test" namespace="/sessiontest" extends="struts-default">
|
||||
<action name="sessionSet" class="org.apache.struts2.session.SessionSetAction">
|
||||
<result type="freemarker">/template-session.ftl</result>
|
||||
</action>
|
||||
<action name="sessionGet" class="org.apache.struts2.session.SessionGetAction">
|
||||
<result type="freemarker">/template-session.ftl</result>
|
||||
</action>
|
||||
</package>
|
||||
</struts>
|
||||
@@ -0,0 +1,21 @@
|
||||
<#--
|
||||
~ $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.
|
||||
-->
|
||||
${Session.sessionKey}
|
||||
@@ -0,0 +1,25 @@
|
||||
<%--
|
||||
~ $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.
|
||||
--%>
|
||||
<html>
|
||||
<body>
|
||||
This is the view
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-plugin</artifactId>
|
||||
@@ -12,9 +12,9 @@
|
||||
<name>Struts 2 OSGi Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/osgi</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/osgi</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/osgi</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/osgi</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/osgi</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/osgi</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-oval-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 OVal Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/oval</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/oval</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/oval</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/oval</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/oval</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/oval</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-pell-multipart-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Pell Multipart Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/pell-multipart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/pell-multipart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/pell-multipart</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/pell-multipart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/pell-multipart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/pell-multipart</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plexus-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Plexus Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/plexus</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/plexus</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/plexus</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/plexus</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/plexus</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/plexus</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts Plugins</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-tiles-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Portlet Tiles Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet-tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet-tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet-tiles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/portlet-tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/portlet-tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/portlet-tiles</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-plugin</artifactId>
|
||||
@@ -11,9 +11,9 @@
|
||||
<name>Struts 2 Portlet Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/portlet</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-plugin</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<name>Struts 2 REST Plugin</name>
|
||||
|
||||
<properties>
|
||||
|
||||
+13
-9
@@ -78,24 +78,28 @@ public class DefaultContentTypeHandlerManager implements ContentTypeHandlerManag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the handler for the request by looking at the request content type and extension
|
||||
* @param req The request
|
||||
* @param request The request
|
||||
* @return The appropriate handler
|
||||
*/
|
||||
public ContentTypeHandler getHandlerForRequest(HttpServletRequest req) {
|
||||
public ContentTypeHandler getHandlerForRequest(HttpServletRequest request) {
|
||||
ContentTypeHandler handler = null;
|
||||
String contentType = req.getContentType();
|
||||
String contentType = request.getContentType();
|
||||
if (contentType != null) {
|
||||
int index = contentType.indexOf(';');
|
||||
if( index != -1)
|
||||
contentType = contentType.substring(0,index).trim();
|
||||
handler = handlersByContentType.get(contentType);
|
||||
if (handler == null) {
|
||||
// strip off encoding and search again (e.g., application/json;charset=ISO-8859-1)
|
||||
int index = contentType.indexOf(';');
|
||||
if (index != -1) {
|
||||
contentType = contentType.substring(0, index).trim();
|
||||
}
|
||||
handler = handlersByContentType.get(contentType);
|
||||
}
|
||||
}
|
||||
|
||||
if (handler == null) {
|
||||
String extension = findExtension(req.getRequestURI());
|
||||
String extension = findExtension(request.getRequestURI());
|
||||
handler = handlersByExtension.get(extension);
|
||||
}
|
||||
return handler;
|
||||
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package org.apache.struts2.rest;
|
||||
|
||||
import com.opensymphony.xwork2.XWorkTestCase;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.inject.Scope;
|
||||
import org.apache.struts2.rest.handler.ContentTypeHandler;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class DefaultContentTypeHandlerManagerTest extends XWorkTestCase {
|
||||
|
||||
public void testObtainingHandlerForRequestWithEncoding() throws Exception {
|
||||
// given
|
||||
DefaultContentTypeHandlerManager handlerManager = new DefaultContentTypeHandlerManager();
|
||||
handlerManager.setContainer(new DummyContainer("application/json;charset=UTF-8", null));
|
||||
|
||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||
request.setContentType("application/json;charset=UTF-8");
|
||||
|
||||
// when
|
||||
ContentTypeHandler handler = handlerManager.getHandlerForRequest(request);
|
||||
|
||||
// then
|
||||
assertNotNull(handler);
|
||||
assertEquals("application/json;charset=UTF-8", handler.getContentType());
|
||||
}
|
||||
|
||||
public void testObtainingHandlerForRequestWithoutEncoding() throws Exception {
|
||||
// given
|
||||
DefaultContentTypeHandlerManager handlerManager = new DefaultContentTypeHandlerManager();
|
||||
handlerManager.setContainer(new DummyContainer("application/json", null));
|
||||
|
||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||
request.setContentType("application/json;charset=UTF-8");
|
||||
|
||||
// when
|
||||
ContentTypeHandler handler = handlerManager.getHandlerForRequest(request);
|
||||
|
||||
// then
|
||||
assertNotNull(handler);
|
||||
assertEquals("application/json", handler.getContentType());
|
||||
}
|
||||
|
||||
public void testObtainingHandlerForRequestByExtension() throws Exception {
|
||||
// given
|
||||
DefaultContentTypeHandlerManager handlerManager = new DefaultContentTypeHandlerManager();
|
||||
handlerManager.setContainer(new DummyContainer("text/html", "json"));
|
||||
|
||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||
request.setContentType("application/json;charset=UTF-8");
|
||||
request.setRequestURI("/index.json");
|
||||
|
||||
// when
|
||||
ContentTypeHandler handler = handlerManager.getHandlerForRequest(request);
|
||||
|
||||
// then
|
||||
assertNotNull(handler);
|
||||
assertEquals("text/html", handler.getContentType());
|
||||
assertEquals("json", handler.getExtension());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DummyContainer implements Container {
|
||||
|
||||
private ContentTypeHandler handler;
|
||||
|
||||
DummyContainer(final String contentType, final String extension) {
|
||||
handler = new ContentTypeHandler() {
|
||||
|
||||
public void toObject(Reader in, Object target) throws IOException {
|
||||
|
||||
}
|
||||
|
||||
public String fromObject(Object obj, String resultCode, Writer stream) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
public String getExtension() {
|
||||
return extension;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void inject(Object o) {
|
||||
|
||||
}
|
||||
|
||||
public <T> T inject(Class<T> implementation) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> T getInstance(Class<T> type, String name) {
|
||||
if (name.startsWith(DefaultContentTypeHandlerManager.STRUTS_REST_HANDLER_OVERRIDE_PREFIX)) {
|
||||
return null;
|
||||
}
|
||||
return (T) handler;
|
||||
}
|
||||
|
||||
public <T> T getInstance(Class<T> type) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Set<String> getInstanceNames(Class<?> type) {
|
||||
Set<String> handlers = new HashSet<String>();
|
||||
handlers.add("handler");
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public void setScopeStrategy(Scope.Strategy scopeStrategy) {
|
||||
|
||||
}
|
||||
|
||||
public void removeScopeStrategy() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-sitegraph-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Sitegraph Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitegraph</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitegraph</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/sitegraph</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/sitegraph</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/sitegraph</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/sitegraph</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-sitemesh-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Sitemesh Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitemesh</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitemesh</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/sitemesh</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/sitemesh</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/sitemesh</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/sitemesh</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-spring-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Spring Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/spring</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/spring</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/spring</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/spring</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/spring</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/spring</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-struts1-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Struts 1 Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/struts1</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/struts1</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/struts1</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/struts1</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/struts1</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/struts1</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-testng-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 TestNG Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/testng</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/testng</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/testng</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/testng</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/testng</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/testng</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-tiles-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Tiles Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/tiles</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-tiles3-plugin</artifactId>
|
||||
@@ -34,9 +34,9 @@
|
||||
<name>Struts 2 Tiles 3 Plugin</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles3</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles3</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles3</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/tiles3</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/plugins/tiles3</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2/plugins/tiles3</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Struts 2</name>
|
||||
<url>http://struts.apache.org/2.x/</url>
|
||||
@@ -28,9 +28,9 @@
|
||||
-->
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14_2</url>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
@@ -89,7 +89,7 @@
|
||||
<tiles.version>2.0.6</tiles.version>
|
||||
|
||||
<!-- SCM Site Configuration -->
|
||||
<site.mainDirectory>${user.home}/struts2-site</site.mainDirectory>
|
||||
<site.mainDirectory>${project.build.directory}/site</site.mainDirectory>
|
||||
<siteContent.path>${site.mainDirectory}/staging</siteContent.path>
|
||||
<scmCheckout.path>${site.mainDirectory}/scm</scmCheckout.path>
|
||||
<siteDeploy.url>file://${siteContent.path}</siteDeploy.url>
|
||||
@@ -315,6 +315,7 @@
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<stagingSiteURL>${siteDeploy.url}</stagingSiteURL>
|
||||
<relativizeDecorationLinks>false</relativizeDecorationLinks>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -7,42 +7,42 @@
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-blank</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Blank</description>
|
||||
</archetype>
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-convention</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Blank Convention</description>
|
||||
</archetype>
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-dbportlet</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Database Portlet</description>
|
||||
</archetype>
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-plugin</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Plugin</description>
|
||||
</archetype>
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-portlet</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Portlet</description>
|
||||
</archetype>
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-starter</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Starter</description>
|
||||
</archetype>
|
||||
|
||||
+7
-4
@@ -30,14 +30,14 @@
|
||||
<bannerRight>
|
||||
<name>Apache Struts</name>
|
||||
<src>images/struts2.png</src>
|
||||
<href>http://struts.apache.org/2.x/index.html</href>
|
||||
<href>2.x/index.html</href>
|
||||
</bannerRight>
|
||||
<body>
|
||||
<links>
|
||||
<item name="Apache"
|
||||
href="http://www.apache.org/"/>
|
||||
<item name="Struts"
|
||||
href="http://struts.apache.org/index.html"/>
|
||||
href="http://struts.apache.org/"/>
|
||||
</links>
|
||||
<menu name="Struts 2">
|
||||
<item name="Welcome"
|
||||
@@ -50,7 +50,10 @@
|
||||
href="http://apache.org/foundation/sponsorship.html"/>
|
||||
</menu>
|
||||
|
||||
<menu ref="parent" inherit="bottom" />
|
||||
<menu name="Parent project">
|
||||
<item name="Apache Struts"
|
||||
href="http://struts.apache.org/"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Documentation">
|
||||
<item name="Getting Started"
|
||||
@@ -134,7 +137,7 @@
|
||||
|
||||
<menu name="Development">
|
||||
<item name="Struts 2.x Draft Docs"
|
||||
href="http://struts.apache.org/2.x/index.html"/>
|
||||
href="index.html"/>
|
||||
<item name="How to Help FAQ"
|
||||
href="http://struts.apache.org/helping.html"/>
|
||||
<item name="Development Lists"
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
<subsection>
|
||||
<p>
|
||||
To download the framework, visit
|
||||
<a href="http://struts.apache.org/download.cgi#struts210">
|
||||
<a href="http://struts.apache.org/download.cgi#struts${aname}">
|
||||
Apache Struts Distributions.
|
||||
</a>
|
||||
For more about Apache Struts 2, visit
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.14.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts.xwork</groupId>
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/xwork-core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/xwork-core</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/xwork-core</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/xwork-core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/xwork-core</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14_2/xwork-core</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -40,14 +40,8 @@ import java.util.Map;
|
||||
* @author Bill Lynch (docs)
|
||||
*/
|
||||
public class ActionContext implements Serializable {
|
||||
static ThreadLocal actionContext = new ThreadLocal();
|
||||
|
||||
/**
|
||||
* Constant that indicates the action is running under a "development mode".
|
||||
* This mode provides more feedback that is useful for developers but probably
|
||||
* too verbose/error prone for production.
|
||||
*/
|
||||
//public static final String DEV_MODE = "__devMode";
|
||||
static ThreadLocal<ActionContext> actionContext = new ThreadLocal<ActionContext>();
|
||||
|
||||
/**
|
||||
* Constant for the name of the action being executed.
|
||||
@@ -100,8 +94,7 @@ public class ActionContext implements Serializable {
|
||||
*/
|
||||
public static final String CONTAINER = "com.opensymphony.xwork2.ActionContext.container";
|
||||
|
||||
Map<String, Object> context;
|
||||
|
||||
private Map<String, Object> context;
|
||||
|
||||
/**
|
||||
* Creates a new ActionContext initialized with another context.
|
||||
@@ -164,16 +157,7 @@ public class ActionContext implements Serializable {
|
||||
* @return the ActionContext for the current thread, is never <tt>null</tt>.
|
||||
*/
|
||||
public static ActionContext getContext() {
|
||||
return (ActionContext) actionContext.get();
|
||||
|
||||
// Don't do lazy context creation, as it requires container; the creation of which may
|
||||
// precede the context creation
|
||||
//if (context == null) {
|
||||
// ValueStack vs = ValueStackFactory.getFactory().createValueStack();
|
||||
// context = new ActionContext(vs.getContext());
|
||||
// setContext(context);
|
||||
//}
|
||||
|
||||
return actionContext.get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -250,7 +250,7 @@ public class ObjectFactory implements Serializable {
|
||||
* @param params property name -> value Map to set onto the Validator instance
|
||||
* @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
|
||||
*/
|
||||
public Validator buildValidator(String className, Map<String, String> params, Map<String, Object> extraContext) throws Exception {
|
||||
public Validator buildValidator(String className, Map<String, Object> params, Map<String, Object> extraContext) throws Exception {
|
||||
Validator validator = (Validator) buildBean(className, null);
|
||||
reflectionProvider.setProperties(params, validator);
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ public final class XWorkConstants {
|
||||
public static final String DEV_MODE = "devMode";
|
||||
public static final String LOG_MISSING_PROPERTIES = "logMissingProperties";
|
||||
public static final String ENABLE_OGNL_EXPRESSION_CACHE = "enableOGNLExpressionCache";
|
||||
public static final String ENABLE_OGNL_EVAL_EXPRESSION = "enableOGNLEvalExpression";
|
||||
public static final String RELOAD_XML_CONFIGURATION = "reloadXmlConfiguration";
|
||||
public static final String ALLOW_STATIC_METHOD_ACCESS = "allowStaticMethodAccess";
|
||||
public static final String XWORK_LOGGER_FACTORY = "xwork.loggerFactory";
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2002-2006,2009 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.opensymphony.xwork2;
|
||||
|
||||
import com.opensymphony.xwork2.config.Configuration;
|
||||
|
||||
@@ -319,6 +319,7 @@ public class DefaultConfiguration implements Configuration {
|
||||
builder.factory(OgnlUtil.class, Scope.SINGLETON);
|
||||
builder.constant(XWorkConstants.DEV_MODE, "false");
|
||||
builder.constant(XWorkConstants.LOG_MISSING_PROPERTIES, "false");
|
||||
builder.constant(XWorkConstants.ENABLE_OGNL_EVAL_EXPRESSION, "false");
|
||||
builder.constant(XWorkConstants.RELOAD_XML_CONFIGURATION, "false");
|
||||
return builder.create(true);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user