mirror of
https://github.com/apache/struts.git
synced 2026-08-08 16:16:58 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0dddbc206 |
+9
-8
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/apps/blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/apps/blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/apps/blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/apps/blank</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -65,14 +65,15 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<scanTargets>
|
||||
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
|
||||
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
|
||||
<scanTarget>src/main/resources/struts.xml</scanTarget>
|
||||
<scanTarget>src/main/resources/example.xml</scanTarget>
|
||||
</scanTargets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<struts>
|
||||
|
||||
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
|
||||
<constant name="struts.devMode" value="true" />
|
||||
<constant name="struts.devMode" value="false" />
|
||||
|
||||
<package name="default" namespace="/" extends="struts-default">
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/apps/jboss-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/apps/jboss-blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/apps/jboss-blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/jboss-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/jboss-blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/apps/jboss-blank</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/apps/mailreader</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/apps/mailreader</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/apps/mailreader</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/mailreader</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/mailreader</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/apps/mailreader</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/apps</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/apps</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/apps</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/apps</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
+19
-5
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/apps/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/apps/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/apps/portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/apps/portlet</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
@@ -118,8 +118,22 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<version>1.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>struts</groupId>
|
||||
<artifactId>struts</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-digester</groupId>
|
||||
<artifactId>commons-digester</artifactId>
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
<name>Struts 2 Rest Showcase Example</name>
|
||||
<description>Struts 2 Rest Showcase Example</description>
|
||||
|
||||
@@ -47,11 +47,6 @@
|
||||
<artifactId>struts2-convention-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
||||
+19
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/apps/showcase</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/apps/showcase</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/apps/showcase</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/showcase</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/apps/showcase</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/apps/showcase</url>
|
||||
</scm>
|
||||
|
||||
|
||||
@@ -134,8 +134,23 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>struts</groupId>
|
||||
<artifactId>struts</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>opensymphony</groupId>
|
||||
<artifactId>sitemesh</artifactId>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-blank</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes/struts2-archetype-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-blank</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-blank</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-blank</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-convention</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes/struts2-archetype-convention</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-convention</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-convention</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-convention</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-convention</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-convention</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-dbportlet</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes/struts2-archetype-dbportlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-dbportlet</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-dbportlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-dbportlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-dbportlet</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-dbportlet</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-plugin</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes/struts2-archetype-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-plugin</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-portlet</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes/struts2-archetype-portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-portlet</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-portlet</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-portlet</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-starter</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/archetypes/struts2-archetype-starter</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-starter</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/archetypes/struts2-archetype-starter</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-starter</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-starter</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/archetypes/struts2-archetype-starter</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
+4
-4
@@ -11,13 +11,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/assembly</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/assembly</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/bundles/admin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/bundles/admin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/bundles/admin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles/admin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles/admin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/bundles/admin</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+10
-4
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/bundles/demo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/bundles/demo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/bundles/demo</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles/demo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles/demo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/bundles/demo</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -28,6 +28,12 @@
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/bundles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/bundles</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/bundles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/bundles</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/core</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/core</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/core</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/core</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -21,18 +21,19 @@
|
||||
|
||||
package org.apache.struts2.components;
|
||||
|
||||
import java.io.Writer;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.struts2.views.annotations.StrutsTag;
|
||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||
import org.apache.struts2.util.MakeIterator;
|
||||
import org.apache.struts2.views.jsp.IteratorStatus;
|
||||
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.util.MakeIterator;
|
||||
import org.apache.struts2.views.annotations.StrutsTag;
|
||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||
import org.apache.struts2.views.jsp.IteratorStatus;
|
||||
|
||||
import java.io.Writer;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <!-- START SNIPPET: javadoc -->
|
||||
@@ -356,7 +357,7 @@ public class IteratorComponent extends ContextBean {
|
||||
}
|
||||
}
|
||||
|
||||
static class CounterIterator implements Iterator<Object> {
|
||||
class CounterIterator implements Iterator<Object> {
|
||||
private int step;
|
||||
private int end;
|
||||
private int currentIndex;
|
||||
@@ -379,7 +380,7 @@ public class IteratorComponent extends ContextBean {
|
||||
if (hasNext()) {
|
||||
int nextIndex = peekNextIndex();
|
||||
currentIndex += step;
|
||||
return values != null ? values.get(nextIndex) : nextIndex;
|
||||
return value != null ? values.get(nextIndex) : nextIndex;
|
||||
} else {
|
||||
throw new IndexOutOfBoundsException("Index " + ( currentIndex + step) + " must be less than or equal to " + end);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Currency;
|
||||
|
||||
@@ -211,8 +212,6 @@ public class Number extends ContextBean {
|
||||
}
|
||||
|
||||
private void setRoundingMode(NumberFormat format) {
|
||||
/*
|
||||
TODO lukaszlenart: enable when switched to Java 1.6
|
||||
if (roundingMode != null) {
|
||||
roundingMode = findString(roundingMode);
|
||||
if ("ceiling".equals(roundingMode)) {
|
||||
@@ -235,7 +234,6 @@ public class Number extends ContextBean {
|
||||
LOG.error("Could not recognise a roundingMode of [" + roundingMode + "]");
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private NumberFormat getNumberFormat() {
|
||||
@@ -398,7 +396,7 @@ public class Number extends ContextBean {
|
||||
/**
|
||||
* @param roundingMode the roundingMode to set
|
||||
*/
|
||||
@StrutsTagAttribute(description = "The rounding mode to use - not implemented yet as this required Java 1.6", type = "String")
|
||||
@StrutsTagAttribute(description = "The rounding mode to use", type = "String")
|
||||
public void setRoundingMode(String roundingMode) {
|
||||
this.roundingMode = roundingMode;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* useful in both cases: when the complex expression takes time (performance improvement) or is hard to read (code
|
||||
* readability improvement).</p>
|
||||
* <p>If the tag is used with body content, the evaluation of the value parameter is omitted. Instead, the String to
|
||||
* which the body evaluates is set as value for the scoped variable.</p>
|
||||
* which the body eveluates is set as value for the scoped variable.</p>
|
||||
*
|
||||
* The scopes available are as follows :-
|
||||
* <ul>
|
||||
@@ -72,11 +72,8 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
*
|
||||
* <pre>
|
||||
* <!-- START SNIPPET: example -->
|
||||
* <s:set var="personName" value="person.name"/>
|
||||
* Hello, <s:property value="#personName"/>
|
||||
*
|
||||
* <s:set var="janesName">Jane Doe</s:set>
|
||||
* <s:property value="#janesName"/>
|
||||
* <s:set name="personName" value="person.name"/>
|
||||
* Hello, <s:property value="#personName"/>. How are you?
|
||||
* <!-- END SNIPPET: example -->
|
||||
* </pre>
|
||||
*
|
||||
|
||||
@@ -286,7 +286,7 @@ public class BeanSelectionProvider implements ConfigurationProvider {
|
||||
|
||||
public void register(ContainerBuilder builder, LocatableProperties props) {
|
||||
alias(ObjectFactory.class, StrutsConstants.STRUTS_OBJECTFACTORY, builder, props);
|
||||
alias(FileManagerFactory.class, StrutsConstants.STRUTS_FILE_MANAGER_FACTORY, builder, props, Scope.SINGLETON);
|
||||
alias(FileManagerFactory.class, StrutsConstants.STRUTS_FILE_MANAGER_FACTORY, builder, props);
|
||||
alias(XWorkConverter.class, StrutsConstants.STRUTS_XWORKCONVERTER, builder, props);
|
||||
alias(TextProvider.class, StrutsConstants.STRUTS_XWORKTEXTPROVIDER, builder, props, Scope.DEFAULT);
|
||||
alias(LocaleProvider.class, StrutsConstants.STRUTS_LOCALE_PROVIDER, builder, props);
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
|
||||
package org.apache.struts2.dispatcher;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
@@ -34,7 +31,11 @@ import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
|
||||
|
||||
/**
|
||||
* <!-- SNIPPET START: description -->
|
||||
@@ -79,8 +80,6 @@ public class ActionContextCleanUp implements Filter {
|
||||
*/
|
||||
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
|
||||
|
||||
showDeprecatedWarning();
|
||||
|
||||
HttpServletRequest request = (HttpServletRequest) req;
|
||||
HttpServletResponse response = (HttpServletResponse) res;
|
||||
|
||||
@@ -138,22 +137,4 @@ public class ActionContextCleanUp implements Filter {
|
||||
|
||||
public void init(FilterConfig arg0) throws ServletException {
|
||||
}
|
||||
|
||||
private void showDeprecatedWarning() {
|
||||
String msg =
|
||||
"\n\n" +
|
||||
"***************************************************************************\n" +
|
||||
"* WARNING!!! *\n" +
|
||||
"* *\n" +
|
||||
"* >>> ActionContextCleanUp <<< is deprecated! Please use the new filters! *\n" +
|
||||
"* *\n" +
|
||||
"* This can be a source of unpredictable problems! *\n" +
|
||||
"* *\n" +
|
||||
"* Please refer to the docs for more details! *\n" +
|
||||
"* http://struts.apache.org/2.x/docs/webxml.html *\n" +
|
||||
"* *\n" +
|
||||
"***************************************************************************\n\n";
|
||||
System.out.println(msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,30 +37,9 @@ import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* <b>Default implementation to server static content</b>
|
||||
* <p/>
|
||||
* This class is used to serve common static content needed when using various parts of Struts, such as JavaScript
|
||||
* files, CSS files, etc. It works by looking for requests to /struts/* (or /static/*), and then mapping the value after "/struts/"
|
||||
* to common packages in Struts and, optionally, in your class path. By default, the following packages are
|
||||
* automatically searched:
|
||||
* <ul>
|
||||
* <li>org.apache.struts2.static</li>
|
||||
* <li>template</li>
|
||||
* <li>static</li>
|
||||
* </ul>
|
||||
* <p/> This means that you can simply request /struts/xhtml/styles.css and the XHTML UI theme's default stylesheet
|
||||
* will be returned. Likewise, many of the AJAX UI components require various JavaScript files, which are found in the
|
||||
* org.apache.struts2.static package. If you wish to add additional packages to be searched, you can add a comma
|
||||
* separated (space, tab and new line will do as well) list in the filter init parameter named "packages". <b>Be
|
||||
* careful</b>, however, to expose any packages that may have sensitive information, such as properties file with
|
||||
* database access credentials.
|
||||
* <p/>
|
||||
*/
|
||||
public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
/**
|
||||
* Provide a logging instance.
|
||||
@@ -70,7 +49,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
/**
|
||||
* Store set of path prefixes to use with static resources.
|
||||
*/
|
||||
protected List<String> pathPrefixes;
|
||||
protected String[] pathPrefixes;
|
||||
|
||||
/**
|
||||
* Store state of StrutsConstants.STRUTS_SERVE_STATIC_CONTENT setting.
|
||||
@@ -151,9 +130,9 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
* A comma-delimited String listing packages
|
||||
* @return A string array of packages
|
||||
*/
|
||||
protected List<String> parse(String packages) {
|
||||
protected String[] parse(String packages) {
|
||||
if (packages == null) {
|
||||
return Collections.emptyList();
|
||||
return null;
|
||||
}
|
||||
List<String> pathPrefixes = new ArrayList<String>();
|
||||
|
||||
@@ -166,7 +145,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
pathPrefixes.add(pathPrefix);
|
||||
}
|
||||
|
||||
return pathPrefixes;
|
||||
return pathPrefixes.toArray(new String[pathPrefixes.size()]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -254,6 +233,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
} finally {
|
||||
is.close();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +256,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
}
|
||||
}
|
||||
|
||||
log = LoggerFactory.getLogger(DefaultStaticContentLoader.class);
|
||||
log = LoggerFactory.getLogger(FilterDispatcher.class);
|
||||
|
||||
}
|
||||
|
||||
@@ -296,6 +276,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
* @param packagePrefix The package prefix to use to locate the resource
|
||||
* @return full path
|
||||
* @throws UnsupportedEncodingException
|
||||
* @throws IOException
|
||||
*/
|
||||
protected String buildPath(String name, String packagePrefix) throws UnsupportedEncodingException {
|
||||
String resourcePath;
|
||||
|
||||
@@ -20,20 +20,15 @@
|
||||
*/
|
||||
package org.apache.struts2.dispatcher;
|
||||
|
||||
import org.apache.struts2.dispatcher.ng.HostConfig;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.struts2.dispatcher.ng.HostConfig;
|
||||
|
||||
/**
|
||||
* Interface for loading static resources, based on a path. After implementing your own static content loader
|
||||
* you must tell the framework how to use it, eg.
|
||||
*
|
||||
* <bean name="myContentLoader" type="org.apache.struts2.dispatcher" class="com.company.struts.MyContentLoader"/>
|
||||
* <constant name="struts.staticContentLoader" value="myContentLoader"/>
|
||||
*
|
||||
* Check {@link org.apache.struts2.config.BeanSelectionProvider} for more details.
|
||||
* Interface for loading static resources, based on a path
|
||||
*/
|
||||
public interface StaticContentLoader {
|
||||
|
||||
|
||||
+82
-84
@@ -3,8 +3,8 @@ package org.apache.struts2.dispatcher.mapper;
|
||||
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.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* <!-- START SNIPPET: description -->
|
||||
*
|
||||
*
|
||||
* A prefix based action mapper that is capable of delegating to other {@link ActionMapper}s based on the request's prefix
|
||||
*
|
||||
* It is configured through struts.xml
|
||||
@@ -37,100 +37,98 @@ import java.util.Map;
|
||||
*
|
||||
* @see ActionMapper
|
||||
* @see ActionMapping
|
||||
*
|
||||
*/
|
||||
public class PrefixBasedActionMapper extends DefaultActionMapper implements ActionMapper {
|
||||
protected transient final Log log = LogFactory.getLog(getClass());
|
||||
protected Container container;
|
||||
protected Map<String,ActionMapper> actionMappers = new HashMap<String,ActionMapper>();
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(PrefixBasedActionMapper.class);
|
||||
@Inject
|
||||
public void setContainer(Container container) {
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
protected Container container;
|
||||
protected Map<String, ActionMapper> actionMappers = new HashMap<String, ActionMapper>();
|
||||
|
||||
@Inject
|
||||
public void setContainer(Container container) {
|
||||
this.container = container;
|
||||
@Inject(StrutsConstants.PREFIX_BASED_MAPPER_CONFIGURATION)
|
||||
public void setPrefixBasedActionMappers(String list) {
|
||||
if (list != null) {
|
||||
String[] mappers = list.split(",");
|
||||
for (String mapper : mappers) {
|
||||
String[] thisMapper = mapper.split(":");
|
||||
if ((thisMapper != null) && (thisMapper.length == 2)) {
|
||||
String mapperPrefix = thisMapper[0].trim();
|
||||
String mapperName = thisMapper[1].trim();
|
||||
Object obj = container.getInstance(ActionMapper.class, mapperName);
|
||||
if (obj != null) {
|
||||
actionMappers.put(mapperPrefix, (ActionMapper) obj);
|
||||
} else if (log.isDebugEnabled()) {
|
||||
log.debug("invalid PrefixBasedActionMapper config entry: " + mapper);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(StrutsConstants.PREFIX_BASED_MAPPER_CONFIGURATION)
|
||||
public void setPrefixBasedActionMappers(String list) {
|
||||
if (list != null) {
|
||||
String[] mappers = list.split(",");
|
||||
for (String mapper : mappers) {
|
||||
String[] thisMapper = mapper.split(":");
|
||||
if ((thisMapper != null) && (thisMapper.length == 2)) {
|
||||
String mapperPrefix = thisMapper[0].trim();
|
||||
String mapperName = thisMapper[1].trim();
|
||||
Object obj = container.getInstance(ActionMapper.class, mapperName);
|
||||
if (obj != null) {
|
||||
actionMappers.put(mapperPrefix, (ActionMapper) obj);
|
||||
} else if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("invalid PrefixBasedActionMapper config entry: [#0]", mapper);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
|
||||
String uri = getUri(request);
|
||||
for (int lastIndex = uri.lastIndexOf('/'); lastIndex > (-1); lastIndex = uri.lastIndexOf('/', lastIndex-1)) {
|
||||
ActionMapper actionMapper = actionMappers.get(uri.substring(0,lastIndex));
|
||||
if (actionMapper != null) {
|
||||
ActionMapping actionMapping = actionMapper.getMapping(request, configManager);
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Using ActionMapper "+actionMapper);
|
||||
}
|
||||
if (actionMapping != null) {
|
||||
if (log.isDebugEnabled()) {
|
||||
if (actionMapping.getParams() != null) {
|
||||
log.debug("ActionMapper found mapping. Parameters: "+actionMapping.getParams());
|
||||
for (Map.Entry<String,Object> mappingParameterEntry : ((Map<String,Object>)(actionMapping.getParams())).entrySet()) {
|
||||
Object paramValue = mappingParameterEntry.getValue();
|
||||
if (paramValue == null) {
|
||||
log.debug(mappingParameterEntry.getKey()+" : null!");
|
||||
} else if (paramValue instanceof String[]) {
|
||||
log.debug(mappingParameterEntry.getKey()+" : (String[]) "+Arrays.toString((String[])paramValue));
|
||||
} else if (paramValue instanceof String) {
|
||||
log.debug(mappingParameterEntry.getKey()+" : (String) "+(String)paramValue);
|
||||
} else {
|
||||
log.debug(mappingParameterEntry.getKey()+" : (Object) "+(paramValue.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return actionMapping;
|
||||
} else if (log.isDebugEnabled()) {
|
||||
log.debug("ActionMapper "+actionMapper+" failed to return an ActionMapping");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
|
||||
String uri = getUri(request);
|
||||
for (int lastIndex = uri.lastIndexOf('/'); lastIndex > (-1); lastIndex = uri.lastIndexOf('/', lastIndex - 1)) {
|
||||
ActionMapper actionMapper = actionMappers.get(uri.substring(0, lastIndex));
|
||||
if (actionMapper != null) {
|
||||
ActionMapping actionMapping = actionMapper.getMapping(request, configManager);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Using ActionMapper [#0]", actionMapper.toString());
|
||||
}
|
||||
if (actionMapping != null) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
if (actionMapping.getParams() != null) {
|
||||
LOG.debug("ActionMapper found mapping. Parameters: [#0]", actionMapping.getParams().toString());
|
||||
for (Map.Entry<String, Object> mappingParameterEntry : actionMapping.getParams().entrySet()) {
|
||||
Object paramValue = mappingParameterEntry.getValue();
|
||||
if (paramValue == null) {
|
||||
LOG.debug("[#0] : null!", mappingParameterEntry.getKey());
|
||||
} else if (paramValue instanceof String[]) {
|
||||
LOG.debug("[#0] : (String[]) #1", mappingParameterEntry.getKey(), Arrays.toString((String[]) paramValue));
|
||||
} else if (paramValue instanceof String) {
|
||||
LOG.debug("[#0] : (String) [#1]", mappingParameterEntry.getKey(), paramValue.toString());
|
||||
} else {
|
||||
LOG.debug("[#0] : (Object) [#1]", mappingParameterEntry.getKey(), paramValue.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return actionMapping;
|
||||
} else if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("ActionMapper [#0] failed to return an ActionMapping", actionMapper.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("No ActionMapper found");
|
||||
}
|
||||
return null;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("no ActionMapper found");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getUriFromActionMapping(ActionMapping mapping) {
|
||||
String namespace = mapping.getNamespace();
|
||||
for (int lastIndex = namespace.length(); lastIndex > (-1); lastIndex = namespace.lastIndexOf('/', lastIndex - 1)) {
|
||||
ActionMapper actionMapper = actionMappers.get(namespace.substring(0, lastIndex));
|
||||
if (actionMapper != null) {
|
||||
String uri = actionMapper.getUriFromActionMapping(mapping);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Using ActionMapper [#0]", actionMapper.toString());
|
||||
}
|
||||
if (uri != null) {
|
||||
return uri;
|
||||
} else if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("ActionMapper [#0] failed to return an ActionMapping (null)", actionMapper.toString());
|
||||
}
|
||||
}
|
||||
public String getUriFromActionMapping(ActionMapping mapping) {
|
||||
String namespace = mapping.getNamespace();
|
||||
for (int lastIndex = namespace.length(); lastIndex > (-1); lastIndex = namespace.lastIndexOf('/', lastIndex-1)) {
|
||||
ActionMapper actionMapper = actionMappers.get(namespace.substring(0,lastIndex));
|
||||
if (actionMapper != null) {
|
||||
String uri = actionMapper.getUriFromActionMapping(mapping);
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Using ActionMapper "+actionMapper);
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("ActionMapper failed to return a uri");
|
||||
if (uri != null) {
|
||||
return uri;
|
||||
} else if (log.isDebugEnabled()) {
|
||||
log.debug("ActionMapper "+actionMapper+" failed to return an ActionMapping (null)");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("ActionMapper failed to return a uri");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,13 +58,12 @@ public class CheckboxInterceptor extends AbstractInterceptor {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CheckboxInterceptor.class);
|
||||
|
||||
public String intercept(ActionInvocation ai) throws Exception {
|
||||
Map<String, Object> parameters = ai.getInvocationContext().getParameters();
|
||||
Map parameters = ai.getInvocationContext().getParameters();
|
||||
Map<String, String[]> newParams = new HashMap<String, String[]>();
|
||||
Set<Map.Entry<String, Object>> entries = parameters.entrySet();
|
||||
|
||||
for (Iterator<Map.Entry<String, Object>> iterator = entries.iterator(); iterator.hasNext();) {
|
||||
Map.Entry<String, Object> entry = iterator.next();
|
||||
String key = entry.getKey();
|
||||
Set<Map.Entry> entries = parameters.entrySet();
|
||||
for (Iterator<Map.Entry> iterator = entries.iterator(); iterator.hasNext();) {
|
||||
Map.Entry entry = iterator.next();
|
||||
String key = (String)entry.getKey();
|
||||
|
||||
if (key.startsWith("__checkbox_")) {
|
||||
String name = key.substring("__checkbox_".length());
|
||||
|
||||
@@ -20,14 +20,16 @@
|
||||
*/
|
||||
package org.apache.struts2.interceptor;
|
||||
|
||||
import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
|
||||
|
||||
|
||||
/**
|
||||
* Just as the CheckboxInterceptor checks that if only the hidden field is present, so too does this interceptor. If
|
||||
* the "__multiselect_" request parameter is present and its visible counterpart is not, set a new request parameter to an
|
||||
@@ -47,7 +49,7 @@ public class MultiselectInterceptor extends AbstractInterceptor {
|
||||
* @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
|
||||
*/
|
||||
public String intercept(ActionInvocation actionInvocation) throws Exception {
|
||||
Map<String, Object> parameters = actionInvocation.getInvocationContext().getParameters();
|
||||
Map parameters = actionInvocation.getInvocationContext().getParameters();
|
||||
Map<String, Object> newParams = new HashMap<String, Object>();
|
||||
Set<String> keys = parameters.keySet();
|
||||
|
||||
@@ -72,5 +74,4 @@ public class MultiselectInterceptor extends AbstractInterceptor {
|
||||
|
||||
return actionInvocation.invoke();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,8 +33,8 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
@Override
|
||||
public boolean support() {
|
||||
boolean supports = isJBoss7() || isJBoss5();
|
||||
if (supports && LOG.isDebugEnabled()) {
|
||||
LOG.debug("JBoss server detected, Struts 2 will use [#0] to support file system operations!", JBossFileManager.class.getSimpleName());
|
||||
if (supports && LOG.isInfoEnabled()) {
|
||||
LOG.info("JBoss server detected, Struts 2 will use [#0] to support file system operations!", JBossFileManager.class.getSimpleName());
|
||||
}
|
||||
return supports;
|
||||
}
|
||||
@@ -61,15 +61,13 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
|
||||
@Override
|
||||
public void monitorFile(URL fileUrl) {
|
||||
if (isJBossUrl(fileUrl)) {
|
||||
String fileName = fileUrl.toString();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Creating revision for URL: " + fileName);
|
||||
if (isReloadingConfigs()) {
|
||||
if (isJBossUrl(fileUrl)) {
|
||||
Revision revision = FileRevision.build(normalizeToFileProtocol(fileUrl));
|
||||
files.put(fileUrl.toString(), revision);
|
||||
} else {
|
||||
super.monitorFile(fileUrl);
|
||||
}
|
||||
Revision revision = FileRevision.build(normalizeToFileProtocol(fileUrl));
|
||||
files.put(fileName, revision);
|
||||
} else {
|
||||
super.monitorFile(fileUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,15 +146,14 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
urls.add(url);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Error calling getPhysicalFile() on JBoss VirtualFile!", e);
|
||||
LOG.warn("Error calling getPhysicalFile() on JBoss VirtualFile.", e);
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
|
||||
private void readFile(List<URL> urls, File physicalFile) throws MalformedURLException {
|
||||
File[] files = physicalFile.listFiles();
|
||||
if (physicalFile.isDirectory() && files != null) {
|
||||
for (File file : files) {
|
||||
if (physicalFile.isDirectory()) {
|
||||
for (File file : physicalFile.listFiles()) {
|
||||
if (file.isFile()) {
|
||||
addIfAbsent(urls, file.toURI().toURL());
|
||||
} else if (file.isDirectory()) {
|
||||
|
||||
@@ -184,9 +184,8 @@ struts.freemarker.beanwrapperCache=false
|
||||
### See the StrutsBeanWrapper javadocs for more information
|
||||
struts.freemarker.wrapper.altMap=true
|
||||
|
||||
### maxStrongSize for MruCacheStorage for freemarker, when set to 0 SoftCacheStorage which performs better in heavy loaded application
|
||||
### check WW-3766 for more details
|
||||
struts.freemarker.mru.max.strong.size=0
|
||||
### maxStrongSize for MruCacheStorage for freemarker
|
||||
struts.freemarker.mru.max.strong.size=100
|
||||
|
||||
### configure the XSLTResult class to use stylesheet caching.
|
||||
### Set to true for developers and false for production.
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
<bean class="com.opensymphony.xwork2.ObjectFactory" name="xwork" />
|
||||
<bean type="com.opensymphony.xwork2.ObjectFactory" name="struts" class="org.apache.struts2.impl.StrutsObjectFactory" />
|
||||
|
||||
<bean type="com.opensymphony.xwork2.FileManager" class="com.opensymphony.xwork2.util.fs.DefaultFileManager" name="system" scope="singleton"/>
|
||||
<bean type="com.opensymphony.xwork2.FileManager" class="com.opensymphony.xwork2.util.fs.DefaultFileManager" name="system"/>
|
||||
|
||||
<bean type="com.opensymphony.xwork2.FileManagerFactory" class="com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory" name="xwork" scope="singleton"/>
|
||||
<bean type="com.opensymphony.xwork2.FileManagerFactory" class="com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory" name="struts" scope="singleton"/>
|
||||
<bean type="com.opensymphony.xwork2.FileManagerFactory" class="com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory" name="xwork"/>
|
||||
<bean type="com.opensymphony.xwork2.FileManagerFactory" class="com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory" name="struts"/>
|
||||
|
||||
<bean type="com.opensymphony.xwork2.ActionProxyFactory" name="xwork" class="com.opensymphony.xwork2.DefaultActionProxyFactory"/>
|
||||
<bean type="com.opensymphony.xwork2.ActionProxyFactory" name="struts" class="org.apache.struts2.impl.StrutsActionProxyFactory"/>
|
||||
|
||||
@@ -111,7 +111,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">The rounding mode to use - not implemented yet as this required Java 1.6</td>
|
||||
<td align="left" valign="top">The rounding mode to use</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">type</td>
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
package org.apache.struts2.components;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
|
||||
import java.io.StringWriter;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class IteratorComponentTest extends StrutsTestCase {
|
||||
|
||||
public void testIterator() throws Exception {
|
||||
// given
|
||||
final ValueStack stack = ActionContext.getContext().getValueStack();
|
||||
stack.push(new FooAction());
|
||||
|
||||
StringWriter out = new StringWriter();
|
||||
|
||||
IteratorComponent ic = new IteratorComponent(stack);
|
||||
ic.setValue("items");
|
||||
ic.setVar("val");
|
||||
|
||||
Property prop = new Property(stack);
|
||||
|
||||
ic.getComponentStack().push(prop);
|
||||
ic.getComponentStack().push(prop);
|
||||
ic.getComponentStack().push(prop);
|
||||
ic.getComponentStack().push(prop);
|
||||
|
||||
String body = " ";
|
||||
|
||||
// when
|
||||
assertTrue(ic.start(out));
|
||||
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
prop.start(out);
|
||||
prop.end(out, body);
|
||||
ic.end(out, null);
|
||||
}
|
||||
|
||||
// then
|
||||
assertEquals("item1 item2 item3 item4 ", out.getBuffer().toString());
|
||||
}
|
||||
|
||||
public void testIteratorWithBegin() throws Exception {
|
||||
// given
|
||||
final ValueStack stack = ActionContext.getContext().getValueStack();
|
||||
stack.push(new FooAction());
|
||||
|
||||
StringWriter out = new StringWriter();
|
||||
|
||||
IteratorComponent ic = new IteratorComponent(stack);
|
||||
ic.setValue("items");
|
||||
ic.setVar("val");
|
||||
ic.setBegin("1");
|
||||
Property prop = new Property(stack);
|
||||
|
||||
ic.getComponentStack().push(prop);
|
||||
ic.getComponentStack().push(prop);
|
||||
ic.getComponentStack().push(prop);
|
||||
|
||||
String body = " ";
|
||||
|
||||
// when
|
||||
assertTrue(ic.start(out));
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
prop.start(out);
|
||||
prop.end(out, body);
|
||||
ic.end(out, null);
|
||||
}
|
||||
|
||||
// then
|
||||
assertEquals("item2 item3 item4 ", out.getBuffer().toString());
|
||||
}
|
||||
|
||||
static class FooAction {
|
||||
|
||||
private List items;
|
||||
|
||||
public FooAction() {
|
||||
items = Arrays.asList("item1", "item2", "item3", "item4");
|
||||
}
|
||||
|
||||
public List getItems() {
|
||||
return items;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package org.apache.struts2.dispatcher;
|
||||
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DefaultStaticContentLoaderTest extends StrutsTestCase {
|
||||
|
||||
public void testParsePackages() throws Exception {
|
||||
|
||||
DefaultStaticContentLoader filterDispatcher = new DefaultStaticContentLoader();
|
||||
List<String> result1 = filterDispatcher.parse("foo.bar.package1 foo.bar.package2 foo.bar.package3");
|
||||
List<String> result2 = filterDispatcher.parse("foo.bar.package1\tfoo.bar.package2\tfoo.bar.package3");
|
||||
List<String> result3 = filterDispatcher.parse("foo.bar.package1,foo.bar.package2,foo.bar.package3");
|
||||
List<String> result4 = filterDispatcher.parse("foo.bar.package1 foo.bar.package2 \t foo.bar.package3 , foo.bar.package4");
|
||||
|
||||
assertEquals(result1.get(0), "foo/bar/package1/");
|
||||
assertEquals(result1.get(1), "foo/bar/package2/");
|
||||
assertEquals(result1.get(2), "foo/bar/package3/");
|
||||
|
||||
assertEquals(result2.get(0), "foo/bar/package1/");
|
||||
assertEquals(result2.get(1), "foo/bar/package2/");
|
||||
assertEquals(result2.get(2), "foo/bar/package3/");
|
||||
|
||||
assertEquals(result3.get(0), "foo/bar/package1/");
|
||||
assertEquals(result3.get(1), "foo/bar/package2/");
|
||||
assertEquals(result3.get(2), "foo/bar/package3/");
|
||||
|
||||
assertEquals(result4.get(0), "foo/bar/package1/");
|
||||
assertEquals(result4.get(1), "foo/bar/package2/");
|
||||
assertEquals(result4.get(2), "foo/bar/package3/");
|
||||
assertEquals(result4.get(3), "foo/bar/package4/");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,8 +23,8 @@ package org.apache.struts2.dispatcher;
|
||||
|
||||
import com.mockobjects.dynamic.C;
|
||||
import com.mockobjects.dynamic.Mock;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.ObjectFactory;
|
||||
import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.config.Configuration;
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.config.entities.InterceptorMapping;
|
||||
@@ -33,6 +33,7 @@ import com.opensymphony.xwork2.config.entities.PackageConfig;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.interceptor.Interceptor;
|
||||
import com.opensymphony.xwork2.util.LocalizedTextUtil;
|
||||
import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.FilterDispatcherTest.InnerDestroyableObjectFactory;
|
||||
@@ -193,19 +194,17 @@ public class DispatcherTest extends StrutsTestCase {
|
||||
cm.setConfiguration((Configuration)mockConfiguration.proxy());
|
||||
|
||||
Mock mockContainer = new Mock(Container.class);
|
||||
String reloadConfigs = container.getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION);
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(String.class), C.eq(XWorkConstants.RELOAD_XML_CONFIGURATION)),
|
||||
reloadConfigs);
|
||||
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(ObjectFactory.class)), destroyedObjectFactory);
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(String.class), C.eq(XWorkConstants.RELOAD_XML_CONFIGURATION)),
|
||||
reloadConfigs);
|
||||
|
||||
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
|
||||
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
|
||||
mockConfiguration.expectAndReturn("getContainer", mockContainer.proxy());
|
||||
FileManagerFactory fileManagerFactory = new DefaultFileManagerFactory();
|
||||
container.inject(fileManagerFactory);
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(FileManagerFactory.class)), fileManagerFactory);
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(FileManagerFactory.class)), fileManagerFactory);
|
||||
mockConfiguration.expect("destroy");
|
||||
mockConfiguration.matchAndReturn("getPackageConfigs", new HashMap<String, PackageConfig>());
|
||||
|
||||
|
||||
du.setConfigurationManager(cm);
|
||||
assertFalse(destroyedObjectFactory.destroyed);
|
||||
du.cleanup();
|
||||
@@ -230,11 +229,9 @@ public class DispatcherTest extends StrutsTestCase {
|
||||
|
||||
Mock mockContainer = new Mock(Container.class);
|
||||
mockContainer.matchAndReturn("getInstance", C.args(C.eq(ObjectFactory.class)), new ObjectFactory());
|
||||
String reloadConfigs = container.getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION);
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(String.class), C.eq(XWorkConstants.RELOAD_XML_CONFIGURATION)),
|
||||
reloadConfigs);
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(String.class), C.eq(XWorkConstants.RELOAD_XML_CONFIGURATION)),
|
||||
reloadConfigs);
|
||||
DefaultFileManagerFactory factory = new DefaultFileManagerFactory();
|
||||
container.inject(factory);
|
||||
mockContainer.matchAndReturn("getInstance", C.args(C.eq(FileManagerFactory.class)), factory);
|
||||
|
||||
Mock mockConfiguration = new Mock(Configuration.class);
|
||||
mockConfiguration.matchAndReturn("getPackageConfigs", packageConfigs);
|
||||
|
||||
@@ -49,6 +49,35 @@ import java.util.HashMap;
|
||||
*/
|
||||
public class FilterDispatcherTest extends StrutsTestCase {
|
||||
|
||||
|
||||
public void testParsePackages() throws Exception {
|
||||
|
||||
DefaultStaticContentLoader filterDispatcher = new DefaultStaticContentLoader();
|
||||
String[] result1 = filterDispatcher.parse("foo.bar.package1 foo.bar.package2 foo.bar.package3");
|
||||
String[] result2 = filterDispatcher.parse("foo.bar.package1\tfoo.bar.package2\tfoo.bar.package3");
|
||||
String[] result3 = filterDispatcher.parse("foo.bar.package1,foo.bar.package2,foo.bar.package3");
|
||||
String[] result4 = filterDispatcher.parse("foo.bar.package1 foo.bar.package2 \t foo.bar.package3 , foo.bar.package4");
|
||||
|
||||
assertEquals(result1[0], "foo/bar/package1/");
|
||||
assertEquals(result1[1], "foo/bar/package2/");
|
||||
assertEquals(result1[2], "foo/bar/package3/");
|
||||
|
||||
assertEquals(result2[0], "foo/bar/package1/");
|
||||
assertEquals(result2[1], "foo/bar/package2/");
|
||||
assertEquals(result2[2], "foo/bar/package3/");
|
||||
|
||||
assertEquals(result3[0], "foo/bar/package1/");
|
||||
assertEquals(result3[1], "foo/bar/package2/");
|
||||
assertEquals(result3[2], "foo/bar/package3/");
|
||||
|
||||
assertEquals(result4[0], "foo/bar/package1/");
|
||||
assertEquals(result4[1], "foo/bar/package2/");
|
||||
assertEquals(result4[2], "foo/bar/package3/");
|
||||
assertEquals(result4[3], "foo/bar/package4/");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void testIfActionMapperIsNullDontServiceAction() throws Exception {
|
||||
MockServletContext servletContext = new MockServletContext();
|
||||
MockFilterConfig filterConfig = new MockFilterConfig(servletContext);
|
||||
|
||||
@@ -217,24 +217,10 @@ public class FreeMarkerResultTest extends StrutsTestCase {
|
||||
Dispatcher dispatcher = Dispatcher.getInstance();
|
||||
ActionMapping mapping = dispatcher.getContainer().getInstance(ActionMapper.class).getMapping(request, dispatcher.getConfigurationManager());
|
||||
dispatcher.serviceAction(request, response, servletContext, mapping);
|
||||
|
||||
// TODO lukaszlenart: remove expectedJDK15 and if() after switching to Java 1.6
|
||||
String expectedJDK15 =
|
||||
"<input type=\"text\" name=\"test\" value=\"\" id=\"test\" foo=\"bar\" placeholder=\"input\"/>"
|
||||
+ "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" foo=\"bar\" placeholder=\"input\"/>"
|
||||
+ "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" break=\"true\"/>";
|
||||
String expectedJDK16 =
|
||||
"<input type=\"text\" name=\"test\" value=\"\" id=\"test\" placeholder=\"input\" foo=\"bar\"/>"
|
||||
String expected = "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" placeholder=\"input\" foo=\"bar\"/>"
|
||||
+ "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" placeholder=\"input\" foo=\"bar\"/>"
|
||||
+ "<input type=\"text\" name=\"test\" value=\"\" id=\"test\" break=\"true\"/>";
|
||||
|
||||
String result = stringWriter.toString();
|
||||
|
||||
if (result.contains("foo=\"bar\" placeholder=\"input\"")) {
|
||||
assertEquals(expectedJDK15, result);
|
||||
} else {
|
||||
assertEquals(expectedJDK16, result);
|
||||
}
|
||||
assertEquals(expected, stringWriter.toString());
|
||||
}
|
||||
|
||||
public void testManualListInTemplate() throws Exception {
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.apache.struts2.views.jsp;
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import org.apache.struts2.TestAction;
|
||||
|
||||
import java.math.RoundingMode;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -65,10 +66,7 @@ public class NumberTagTest extends AbstractTagTest {
|
||||
|
||||
// then
|
||||
NumberFormat format = NumberFormat.getCurrencyInstance((Locale) context.get(ActionContext.LOCALE));
|
||||
/*
|
||||
TODO lukaszlenart: enable when switched to Java 1.6
|
||||
format.setRoundingMode(RoundingMode.CEILING);
|
||||
*/
|
||||
String expected = format.format(120.0f);
|
||||
|
||||
assertEquals(expected, writer.toString());
|
||||
@@ -92,10 +90,7 @@ public class NumberTagTest extends AbstractTagTest {
|
||||
|
||||
// then
|
||||
NumberFormat format = NumberFormat.getInstance((Locale) context.get(ActionContext.LOCALE));
|
||||
/*
|
||||
TODO lukaszlenart: enable when switched to Java 1.6
|
||||
format.setRoundingMode(RoundingMode.CEILING);
|
||||
*/
|
||||
String expected = format.format(120.45f);
|
||||
|
||||
assertEquals(expected, writer.toString());
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/codebehind</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/codebehind</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/codebehind</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/codebehind</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/codebehind</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/codebehind</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/config-browser</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/config-browser</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/config-browser</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/config-browser</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/config-browser</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/config-browser</url>
|
||||
</scm>
|
||||
|
||||
</project>
|
||||
|
||||
-15
@@ -95,19 +95,4 @@ public class ActionNamesAction extends ActionSupport {
|
||||
actionNames = new TreeSet<String>(configHelper.getActionNames(namespace));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Index action to support cooperation with REST plugin
|
||||
*
|
||||
* @return action result
|
||||
* @throws Exception
|
||||
*/
|
||||
public String index() throws Exception {
|
||||
return execute();
|
||||
}
|
||||
|
||||
public String redirect() {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-10
@@ -83,16 +83,6 @@ public class ListValidatorsAction extends ActionSupport {
|
||||
return super.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Index action to support cooperation with REST plugin
|
||||
*
|
||||
* @return action result
|
||||
* @throws Exception
|
||||
*/
|
||||
public String index() throws Exception {
|
||||
return execute();
|
||||
}
|
||||
|
||||
protected void loadValidators() {
|
||||
Class value = getClassInstance();
|
||||
if ( value != null ) {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<result name="input" type="freemarker">/config-browser/error.ftl</result>
|
||||
</global-results>
|
||||
|
||||
<action name="index" class="org.apache.struts2.config_browser.ActionNamesAction" method="redirect">
|
||||
<action name="index">
|
||||
<result type="redirectAction">actionNames</result>
|
||||
</action>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/trunk/struts2-convention-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_8/trunk/struts2-convention-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_8/trunk/struts2-convention-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_6/trunk/struts2-convention-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_6/trunk/struts2-convention-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_6/trunk/struts2-convention-plugin</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
||||
+4
-21
@@ -65,7 +65,6 @@ import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -81,7 +80,6 @@ import java.util.regex.Pattern;
|
||||
public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(PackageBasedActionConfigBuilder.class);
|
||||
private static final boolean EXTRACT_BASE_INTERFACES = true;
|
||||
|
||||
private final Configuration configuration;
|
||||
private final ActionNameBuilder actionNameBuilder;
|
||||
@@ -386,8 +384,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
// only considers classes that match the action packages
|
||||
// specified by the user
|
||||
Test<String> classPackageTest = getClassPackageTest();
|
||||
List<URL> urls = readUrls();
|
||||
ClassFinder finder = new ClassFinder(getClassLoaderInterface(), urls, EXTRACT_BASE_INTERFACES, fileProtocols, classPackageTest);
|
||||
ClassFinder finder = new ClassFinder(getClassLoaderInterface(), buildUrlSet().getUrls(), true, this.fileProtocols, classPackageTest);
|
||||
|
||||
Test<ClassFinder.ClassInfo> test = getActionClassTest();
|
||||
classes.addAll(finder.findClasses(test));
|
||||
@@ -400,19 +397,9 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
return classes;
|
||||
}
|
||||
|
||||
private List<URL> readUrls() throws IOException {
|
||||
List<URL> list = buildUrlSet().getUrls();
|
||||
// Usually the "classes" dir.
|
||||
ArrayList<URL> classesList = Collections.list(getClassLoaderInterface().getResources(""));
|
||||
for (URL url : classesList) {
|
||||
list.addAll(fileManager.getAllPhysicalUrls(url));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private UrlSet buildUrlSet() throws IOException {
|
||||
ClassLoaderInterface classLoaderInterface = getClassLoaderInterface();
|
||||
UrlSet urlSet = new UrlSet(classLoaderInterface, this.fileProtocols);
|
||||
UrlSet urlSet = new UrlSet(fileManager, classLoaderInterface, this.fileProtocols);
|
||||
|
||||
//excluding the urls found by the parent class loader is desired, but fails in JBoss (all urls are removed)
|
||||
if (excludeParentClassLoader) {
|
||||
@@ -438,11 +425,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
}
|
||||
|
||||
//try to find classes dirs inside war files
|
||||
urlSet = urlSet.includeClassesUrl(classLoaderInterface, new UrlSet.FileProtocolNormalizer() {
|
||||
public URL normalizeToFileProtocol(URL url) {
|
||||
return fileManager.normalizeToFileProtocol(url);
|
||||
}
|
||||
});
|
||||
urlSet = urlSet.includeClassesUrl(classLoaderInterface);
|
||||
|
||||
|
||||
urlSet = urlSet.excludeJavaExtDirs();
|
||||
@@ -489,7 +472,7 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
}
|
||||
}
|
||||
}
|
||||
return new UrlSet(includeUrls);
|
||||
return new UrlSet(fileManager, includeUrls);
|
||||
}
|
||||
|
||||
return urlSet;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<parent>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/dojo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/dojo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/dojo</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/dojo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/dojo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/dojo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/dwr</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/dwr</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/dwr</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/dwr</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/dwr</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/dwr</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/embeddedjsp</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/embeddedjsp</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/embeddedjsp</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/embeddedjsp</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/embeddedjsp</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/embeddedjsp</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -184,7 +184,7 @@ public class JSPLoader {
|
||||
|
||||
//find available jars
|
||||
ClassLoaderInterface classLoaderInterface = getClassLoaderInterface();
|
||||
UrlSet urlSet = new UrlSet(classLoaderInterface);
|
||||
UrlSet urlSet = new UrlSet(fileManager, classLoaderInterface);
|
||||
|
||||
//find jars
|
||||
List<URL> urls = urlSet.getUrls();
|
||||
|
||||
@@ -270,7 +270,7 @@ public class EmbeddedJSPResultTest extends TestCase {
|
||||
XWorkConverter converter = new DummyConverter();
|
||||
|
||||
DefaultFileManager fileManager = new DefaultFileManager();
|
||||
fileManager.setReloadingConfigs(false);
|
||||
fileManager.setReloadingConfigs("false");
|
||||
|
||||
//mock container
|
||||
Container container = EasyMock.createNiceMock(Container.class);
|
||||
@@ -299,9 +299,6 @@ class DummyConverter extends XWorkConverter {
|
||||
|
||||
class DummyFileManagerFactory implements FileManagerFactory {
|
||||
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
}
|
||||
|
||||
public FileManager getFileManager() {
|
||||
return new DefaultFileManager();
|
||||
}
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/trunk/struts2-gxp-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_8/trunk/struts2-gxp-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_8/trunk/struts2-gxp-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_6/trunk/struts2-gxp-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_6/trunk/struts2-gxp-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_6/trunk/struts2-gxp-plugin</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -40,11 +40,11 @@ public class GxpInstance extends Gxp {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(GxpInstance.class.getCanonicalName());
|
||||
|
||||
private Class gxpInterface;
|
||||
private Class gxpInstance;
|
||||
private Class<?> gxpInterface;
|
||||
private Class<?> gxpInstance;
|
||||
private ObjectFactory objectFactory;
|
||||
|
||||
GxpInstance(Class gxpClass) {
|
||||
GxpInstance(Class<?> gxpClass) {
|
||||
super(gxpClass,
|
||||
lookupMethodByName(getNestedClass(gxpClass, "Interface"), "write"),
|
||||
lookupMethodByName(getNestedClass(gxpClass, "Interface"), "getGxpClosure"));
|
||||
@@ -52,8 +52,8 @@ public class GxpInstance extends Gxp {
|
||||
this.gxpInstance = getNestedClass(gxpClass, "Instance");
|
||||
}
|
||||
|
||||
private static Class getNestedClass(Class clazz, String nestedClassName) {
|
||||
for (Class nested : clazz.getDeclaredClasses()) {
|
||||
private static Class<?> getNestedClass(Class<?> clazz, String nestedClassName) {
|
||||
for (Class<?> nested : clazz.getDeclaredClasses()) {
|
||||
if (nestedClassName.equals(nested.getSimpleName())) {
|
||||
return nested;
|
||||
}
|
||||
@@ -92,9 +92,9 @@ public class GxpInstance extends Gxp {
|
||||
return this.gxpInterface;
|
||||
}
|
||||
|
||||
private static final Map<Class, GxpInstance> classToGxpInstance = new MapMaker().weakKeys().softValues()
|
||||
.makeComputingMap(new Function<Class, GxpInstance>() {
|
||||
public GxpInstance apply(Class from) {
|
||||
private static final Map<Class<?>, GxpInstance> classToGxpInstance = new MapMaker().weakKeys().softValues()
|
||||
.makeComputingMap(new Function<Class<?>, GxpInstance>() {
|
||||
public GxpInstance apply(Class<?> from) {
|
||||
return classToGxpInstance.containsKey(from) ? classToGxpInstance.get(from) : new GxpInstance(from);
|
||||
}
|
||||
});
|
||||
@@ -126,7 +126,7 @@ public class GxpInstance extends Gxp {
|
||||
/**
|
||||
* Looks up {@code GxpInstance} instance for the given GXP class.
|
||||
*/
|
||||
public static GxpInstance getInstance(Class gxpClass) {
|
||||
public static GxpInstance getInstance(Class<?> gxpClass) {
|
||||
return classToGxpInstance.get(gxpClass);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/jasperreports</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/jasperreports</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/jasperreports</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/jasperreports</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/jasperreports</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/jasperreports</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/javatemplates</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/javatemplates</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/javatemplates</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/javatemplates</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/javatemplates</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/javatemplates</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/jfreechart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/jfreechart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/jfreechart</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/jfreechart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/jfreechart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/jfreechart</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/jsf</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/jsf</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/jsf</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/jsf</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/jsf</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/jsf</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/json</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/json</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/json</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/json</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/json</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/json</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -65,7 +65,6 @@ public class JSONResult implements Result {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JSONResult.class);
|
||||
|
||||
private String encoding;
|
||||
private String defaultEncoding = "ISO-8859-1";
|
||||
private List<Pattern> includeProperties;
|
||||
private List<Pattern> excludeProperties;
|
||||
@@ -218,14 +217,10 @@ public class JSONResult implements Result {
|
||||
* Retrieve the encoding <p/>
|
||||
*
|
||||
* @return The encoding associated with this template (defaults to the value
|
||||
* of param 'encoding', if empty default to 'struts.i18n.encoding' property)
|
||||
* of 'struts.i18n.encoding' property)
|
||||
*/
|
||||
protected String getEncoding() {
|
||||
String encoding = this.encoding;
|
||||
|
||||
if (encoding == null) {
|
||||
encoding = this.defaultEncoding;
|
||||
}
|
||||
String encoding = this.defaultEncoding;
|
||||
|
||||
if (encoding == null) {
|
||||
encoding = System.getProperty("file.encoding");
|
||||
@@ -426,16 +421,4 @@ public class JSONResult implements Result {
|
||||
public void setWrapSuffix(String wrapSuffix) {
|
||||
this.wrapSuffix = wrapSuffix;
|
||||
}
|
||||
|
||||
/**
|
||||
* If defined will be used instead of {@link #defaultEncoding}, you can define it with result
|
||||
* <result name="success" type="json">
|
||||
* <param name="encoding">UTF-8</param>
|
||||
* </result>
|
||||
*
|
||||
* @param encoding valid encoding string
|
||||
*/
|
||||
public void setEncoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,16 +20,6 @@
|
||||
*/
|
||||
package org.apache.struts2.json;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.mock.MockActionInvocation;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import org.apache.struts2.StrutsStatics;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.springframework.mock.web.MockServletContext;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
@@ -44,6 +34,18 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.struts2.StrutsStatics;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.springframework.mock.web.MockServletContext;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.mock.MockActionInvocation;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
|
||||
/**
|
||||
* JSONResultTest
|
||||
*/
|
||||
@@ -571,31 +573,6 @@ public class JSONResultTest extends StrutsTestCase {
|
||||
assertEquals("application/json;charset=ISO-8859-1", response.getContentType());
|
||||
}
|
||||
|
||||
public void testDefaultEncoding() throws Exception {
|
||||
// given
|
||||
JSONResult json = new JSONResult();
|
||||
json.setDefaultEncoding("UTF-16");
|
||||
|
||||
// when
|
||||
String encoding = json.getEncoding();
|
||||
|
||||
// thn
|
||||
assertEquals("UTF-16", encoding);
|
||||
}
|
||||
|
||||
public void testEncoding() throws Exception {
|
||||
// given
|
||||
JSONResult json = new JSONResult();
|
||||
json.setEncoding("UTF-8");
|
||||
json.setDefaultEncoding("UTF-8");
|
||||
|
||||
// when
|
||||
String encoding = json.getEncoding();
|
||||
|
||||
// thn
|
||||
assertEquals("UTF-8", encoding);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/junit</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/junit</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/junit</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/junit</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/junit</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/junit</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -21,16 +21,10 @@
|
||||
package org.apache.struts2;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
public class JUnitTestAction extends ActionSupport {
|
||||
private static final long serialVersionUID = 1629266238339053546L;
|
||||
|
||||
private String name;
|
||||
|
||||
@Autowired
|
||||
private MySessionBean mySessionBean;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* $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;
|
||||
|
||||
public class MySessionBean {
|
||||
|
||||
public void doSomething() {
|
||||
// do Something
|
||||
}
|
||||
}
|
||||
@@ -1,38 +1,6 @@
|
||||
<?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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
|
||||
<property name="scopes">
|
||||
<map>
|
||||
<entry key="session">
|
||||
<bean class="org.springframework.context.support.SimpleThreadScope"/>
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="testAction" class="org.apache.struts2.JUnitTestAction"/>
|
||||
<bean id="mySessionBean" class="org.apache.struts2.MySessionBean" scope="session" />
|
||||
</beans>
|
||||
@@ -1,24 +1,5 @@
|
||||
<?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">
|
||||
|
||||
@@ -1,21 +1 @@
|
||||
<#--
|
||||
~ $Id:$
|
||||
~
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
Hello
|
||||
@@ -1,21 +1 @@
|
||||
<#--
|
||||
~ $Id:$
|
||||
~
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
Test-2
|
||||
@@ -1,21 +1 @@
|
||||
<#--
|
||||
~ $Id:$
|
||||
~
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
Test2
|
||||
+18
-4
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/osgi</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/osgi</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/osgi</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/osgi</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/osgi</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/osgi</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -32,6 +32,20 @@
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>struts</groupId>
|
||||
<artifactId>struts</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/oval</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/oval</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/oval</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/oval</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/oval</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/oval</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+1
-8
@@ -10,7 +10,6 @@ import net.sf.oval.configuration.Configurer;
|
||||
import net.sf.oval.configuration.annotation.AnnotationsConfigurer;
|
||||
import net.sf.oval.configuration.annotation.JPAAnnotationsConfigurer;
|
||||
import net.sf.oval.configuration.xml.XMLConfigurer;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
@@ -30,14 +29,8 @@ public class DefaultOValValidationManager implements OValValidationManager {
|
||||
|
||||
protected boolean validateJPAAnnotations;
|
||||
|
||||
private boolean reloadConfigs;
|
||||
private FileManager fileManager;
|
||||
|
||||
@Inject(value = StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, required = false)
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
this.reloadConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setFileManagerFactory(FileManagerFactory fileManagerFactory) {
|
||||
this.fileManager = fileManagerFactory.getFileManager();
|
||||
@@ -48,7 +41,7 @@ public class DefaultOValValidationManager implements OValValidationManager {
|
||||
final String validatorKey = buildValidatorKey(clazz, context);
|
||||
|
||||
if (validatorCache.containsKey(validatorKey)) {
|
||||
if (reloadConfigs) {
|
||||
if (fileManager.isReloadingConfigs()) {
|
||||
List<Configurer> configurers = buildXMLConfigurers(clazz, context, true, null);
|
||||
|
||||
//add an annotation configurer
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/pell-multipart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/pell-multipart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/pell-multipart</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/pell-multipart</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/pell-multipart</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/pell-multipart</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/plexus</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/plexus</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/plexus</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/plexus</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/plexus</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/plexus</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/portlet-tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/portlet-tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/portlet-tiles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/portlet-tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/portlet-tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/portlet-tiles</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/portlet</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-plugin</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
<name>Struts 2 REST Plugin</name>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/sitegraph</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/sitegraph</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/sitegraph</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/sitegraph</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/sitegraph</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/sitegraph</url>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -24,8 +24,7 @@ package org.apache.struts2.sitegraph.entities;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class Target implements Comparable<Target> {
|
||||
|
||||
public class Target {
|
||||
private String target;
|
||||
private int type;
|
||||
|
||||
@@ -60,13 +59,4 @@ public class Target implements Comparable<Target> {
|
||||
result = 29 * result + type;
|
||||
return result;
|
||||
}
|
||||
|
||||
public int compareTo(Target o) {
|
||||
if (o.target != null && target != null) {
|
||||
return o.target.compareTo(target);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/sitemesh</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/sitemesh</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/sitemesh</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/sitemesh</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/sitemesh</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/sitemesh</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -49,14 +49,27 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>1.6.3</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<version>1.3</version>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>struts</groupId>
|
||||
<artifactId>struts</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/spring</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/spring</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/spring</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/spring</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/spring</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/spring</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/struts1</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/struts1</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/struts1</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/struts1</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/struts1</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/struts1</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/testng</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/testng</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/testng</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/testng</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/testng</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/testng</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plugins</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/plugins/tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/tiles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/tiles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/plugins/tiles</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6/plugins/tiles</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -77,7 +77,7 @@ public class StrutsTilesRequestContext extends TilesRequestContextWrapper {
|
||||
}
|
||||
|
||||
public void dispatch(String include) throws IOException {
|
||||
if (include.endsWith(mask)) {
|
||||
if (include.endsWith(mask) || include.endsWith(".jsp")) {
|
||||
// FIXME This way FreeMarker results still don't have a content-type!
|
||||
include(include);
|
||||
} else {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Struts 2</name>
|
||||
<url>http://struts.apache.org/2.x/</url>
|
||||
@@ -29,9 +29,9 @@
|
||||
-->
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_6</url>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
@@ -55,7 +55,7 @@
|
||||
<distributionManagement>
|
||||
<site>
|
||||
<id>apache-site</id>
|
||||
<url>scp://people.apache.org/www/struts.apache.org/2.3.8/</url>
|
||||
<url>scp://people.apache.org/www/struts.apache.org/2.3.6/</url>
|
||||
</site>
|
||||
</distributionManagement>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<properties>
|
||||
<currentVersion>${project.version}</currentVersion>
|
||||
<struts2.springPlatformVersion>3.0.5.RELEASE</struts2.springPlatformVersion>
|
||||
<ognl.version>3.0.6</ognl.version>
|
||||
<ognl.version>3.0.5</ognl.version>
|
||||
<asm.version>3.3</asm.version>
|
||||
<tiles.version>2.0.6</tiles.version>
|
||||
</properties>
|
||||
@@ -379,7 +379,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>1.6.4</version>
|
||||
<version>1.6.3</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -388,10 +388,6 @@
|
||||
<artifactId>velocity-tools</artifactId>
|
||||
<version>1.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>struts</groupId>
|
||||
<artifactId>struts</artifactId>
|
||||
|
||||
@@ -7,42 +7,42 @@
|
||||
<archetype>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetype-blank</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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.8</version>
|
||||
<version>2.3.6</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.8</version>
|
||||
<version>2.3.6</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.8</version>
|
||||
<version>2.3.6</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.8</version>
|
||||
<version>2.3.6</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.8</version>
|
||||
<version>2.3.6</version>
|
||||
<repository>http://repo1.maven.org/maven2/</repository>
|
||||
<description>Struts 2 Archetypes - Starter</description>
|
||||
</archetype>
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.8</version>
|
||||
<version>2.3.6</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_8/xwork-core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/xwork-core</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/xwork-core</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/xwork-core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/xwork-core</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_6/xwork-core</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -10,15 +10,12 @@ import java.util.Collection;
|
||||
*/
|
||||
public interface FileManager {
|
||||
|
||||
/**
|
||||
* Enables configs reloading when config file changed
|
||||
*
|
||||
* @param reloadingConfigs {@link XWorkConstants#RELOAD_XML_CONFIGURATION}
|
||||
*/
|
||||
void setReloadingConfigs(boolean reloadingConfigs);
|
||||
void setReloadingConfigs(String reloadingConfigs);
|
||||
|
||||
boolean isReloadingConfigs();
|
||||
|
||||
/**
|
||||
* Checks if given file changed and must be reloaded if {@link #setReloadingConfigs(boolean)} is true
|
||||
* Checks if given file changed and must be reloaded if {@link #isReloadingConfigs()} is true
|
||||
*
|
||||
* @param fileName to check
|
||||
* @return true if file changed
|
||||
@@ -43,7 +40,7 @@ public interface FileManager {
|
||||
InputStream loadFile(URL fileUrl);
|
||||
|
||||
/**
|
||||
* Adds file to list of monitored files if {@link #setReloadingConfigs(boolean)} is true
|
||||
* Adds file to list of monitored files if {@link #isReloadingConfigs()} is true
|
||||
*
|
||||
* @param fileUrl {@link URL} to file to be monitored
|
||||
*/
|
||||
|
||||
@@ -5,8 +5,6 @@ package com.opensymphony.xwork2;
|
||||
*/
|
||||
public interface FileManagerFactory {
|
||||
|
||||
void setReloadingConfigs(String reloadingConfigs);
|
||||
|
||||
FileManager getFileManager();
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
*/
|
||||
package com.opensymphony.xwork2.config;
|
||||
|
||||
import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
|
||||
import com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider;
|
||||
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
|
||||
@@ -172,8 +173,8 @@ public class ConfigurationManager {
|
||||
* @param container current container used to obtain instance of {@link com.opensymphony.xwork2.util.fs.DefaultFileManager}
|
||||
*/
|
||||
public synchronized void conditionalReload(Container container) {
|
||||
boolean reloadConfigs = Boolean.parseBoolean(container.getInstance(String.class, XWorkConstants.RELOAD_XML_CONFIGURATION));
|
||||
if (reloadConfigs || providersChanged) {
|
||||
FileManager fileManager = container.getInstance(FileManagerFactory.class).getFileManager();
|
||||
if (fileManager.isReloadingConfigs() || providersChanged) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Checking ConfigurationProviders for reload.");
|
||||
}
|
||||
|
||||
+1
-8
@@ -19,7 +19,6 @@ import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.ObjectFactory;
|
||||
import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.XWorkMessages;
|
||||
import com.opensymphony.xwork2.XWorkException;
|
||||
import com.opensymphony.xwork2.conversion.TypeConverter;
|
||||
@@ -185,7 +184,6 @@ public class XWorkConverter extends DefaultTypeConverter {
|
||||
private TypeConverter defaultTypeConverter;
|
||||
private ObjectFactory objectFactory;
|
||||
private FileManager fileManager;
|
||||
private boolean reloadingConfigs;
|
||||
|
||||
protected XWorkConverter() {
|
||||
}
|
||||
@@ -209,11 +207,6 @@ public class XWorkConverter extends DefaultTypeConverter {
|
||||
this.fileManager = fileManagerFactory.getFileManager();
|
||||
}
|
||||
|
||||
@Inject(value = XWorkConstants.RELOAD_XML_CONFIGURATION, required = false)
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
this.reloadingConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
public static String getConversionErrorMessage(String propertyName, ValueStack stack) {
|
||||
String defaultMessage = LocalizedTextUtil.findDefaultText(XWorkMessages.DEFAULT_INVALID_FIELDVALUE,
|
||||
ActionContext.getContext().getLocale(),
|
||||
@@ -751,7 +744,7 @@ public class XWorkConverter extends DefaultTypeConverter {
|
||||
private Map<String, Object> conditionalReload(Class clazz, Map<String, Object> oldValues) throws Exception {
|
||||
Map<String, Object> mapping = oldValues;
|
||||
|
||||
if (reloadingConfigs) {
|
||||
if (fileManager.isReloadingConfigs()) {
|
||||
URL fileUrl = ClassLoaderUtil.getResource(buildConverterFilename(clazz), clazz);
|
||||
if (fileManager.fileNeedsReloading(fileUrl.toString())) {
|
||||
mapping = buildConverterMapping(clazz);
|
||||
|
||||
+1
-2
@@ -411,12 +411,11 @@ public class ParametersInterceptor extends MethodFilterInterceptor {
|
||||
for (Pattern pattern : excludeParams) {
|
||||
Matcher matcher = pattern.matcher(paramName);
|
||||
if (matcher.matches()) {
|
||||
notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
notifyDeveloper("Parameter [#0] is not on the excludeParams list of patterns and will be appended to action!", paramName);
|
||||
notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.opensymphony.xwork2.util.finder;
|
||||
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@@ -25,7 +26,6 @@ import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
@@ -50,41 +50,40 @@ import java.util.Set;
|
||||
* @version $Rev$ $Date$
|
||||
*/
|
||||
public class UrlSet {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(UrlSet.class);
|
||||
|
||||
private final Map<String,URL> urls;
|
||||
private Set<String> protocols;
|
||||
private FileManager fileManager;
|
||||
|
||||
private UrlSet() {
|
||||
this.urls = new HashMap<String,URL>();
|
||||
}
|
||||
|
||||
public UrlSet(ClassLoaderInterface classLoader) throws IOException {
|
||||
this();
|
||||
public UrlSet(FileManager fileManager, ClassLoaderInterface classLoader) throws IOException {
|
||||
this(fileManager);
|
||||
load(getUrls(classLoader));
|
||||
}
|
||||
|
||||
public UrlSet(ClassLoaderInterface classLoader, Set<String> protocols) throws IOException {
|
||||
this();
|
||||
public UrlSet(FileManager fileManager, ClassLoaderInterface classLoader, Set<String> protocols) throws IOException {
|
||||
this(fileManager);
|
||||
this.protocols = protocols;
|
||||
this.fileManager = fileManager;
|
||||
load(getUrls(classLoader, protocols));
|
||||
}
|
||||
|
||||
public UrlSet(URL... urls){
|
||||
this(Arrays.asList(urls));
|
||||
}
|
||||
/**
|
||||
* Ignores all URLs that are not "jar" or "file"
|
||||
* @param urls
|
||||
*/
|
||||
public UrlSet(Collection<URL> urls){
|
||||
this();
|
||||
public UrlSet(FileManager fileManager, Collection<URL> urls){
|
||||
this(fileManager);
|
||||
load(urls);
|
||||
}
|
||||
|
||||
private UrlSet(Map<String, URL> urls) {
|
||||
private UrlSet(FileManager fileManager) {
|
||||
this.urls = new HashMap<String,URL>();
|
||||
this.fileManager = fileManager;
|
||||
}
|
||||
|
||||
private UrlSet(FileManager fileManager, Map<String, URL> urls) {
|
||||
this.urls = urls;
|
||||
this.fileManager = fileManager;
|
||||
}
|
||||
|
||||
private void load(Collection<URL> urls){
|
||||
@@ -92,9 +91,7 @@ public class UrlSet {
|
||||
try {
|
||||
this.urls.put(location.toExternalForm(), location);
|
||||
} catch (Exception e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Cannot translate url to external form!", e);
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,7 +99,7 @@ public class UrlSet {
|
||||
public UrlSet include(UrlSet urlSet){
|
||||
Map<String, URL> urls = new HashMap<String, URL>(this.urls);
|
||||
urls.putAll(urlSet.urls);
|
||||
return new UrlSet(urls);
|
||||
return new UrlSet(fileManager, urls);
|
||||
}
|
||||
|
||||
public UrlSet exclude(UrlSet urlSet) {
|
||||
@@ -111,11 +108,11 @@ public class UrlSet {
|
||||
for (String url : parentUrls.keySet()) {
|
||||
urls.remove(url);
|
||||
}
|
||||
return new UrlSet(urls);
|
||||
return new UrlSet(fileManager, urls);
|
||||
}
|
||||
|
||||
public UrlSet exclude(ClassLoaderInterface parent) throws IOException {
|
||||
return exclude(new UrlSet(parent, this.protocols));
|
||||
return exclude(new UrlSet(fileManager, parent, this.protocols));
|
||||
}
|
||||
|
||||
public UrlSet exclude(File file) throws MalformedURLException {
|
||||
@@ -180,13 +177,13 @@ public class UrlSet {
|
||||
urls.put(url, entry.getValue());
|
||||
}
|
||||
}
|
||||
return new UrlSet(urls);
|
||||
return new UrlSet(fileManager, urls);
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to find a classes directory inside a war file add its normalized url to this set
|
||||
*/
|
||||
public UrlSet includeClassesUrl(ClassLoaderInterface classLoaderInterface, FileProtocolNormalizer normalizer) throws IOException {
|
||||
public UrlSet includeClassesUrl(ClassLoaderInterface classLoaderInterface) throws IOException {
|
||||
Enumeration<URL> rootUrlEnumeration = classLoaderInterface.getResources("");
|
||||
while (rootUrlEnumeration.hasMoreElements()) {
|
||||
URL url = rootUrlEnumeration.nextElement();
|
||||
@@ -195,14 +192,14 @@ public class UrlSet {
|
||||
//if it is inside a war file, get the url to the file
|
||||
externalForm = StringUtils.substringBefore(externalForm, "/WEB-INF/classes");
|
||||
URL warUrl = new URL(externalForm);
|
||||
URL normalizedUrl = normalizer.normalizeToFileProtocol(warUrl);
|
||||
URL normalizedUrl = fileManager.normalizeToFileProtocol(warUrl);
|
||||
URL finalUrl = ObjectUtils.defaultIfNull(normalizedUrl, warUrl);
|
||||
|
||||
Map<String, URL> newUrls = new HashMap<String, URL>(this.urls);
|
||||
if ("jar".equals(finalUrl.getProtocol()) || "file".equals(finalUrl.getProtocol())) {
|
||||
newUrls.put(finalUrl.toExternalForm(), finalUrl);
|
||||
}
|
||||
return new UrlSet(newUrls);
|
||||
return new UrlSet(fileManager, newUrls);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +207,7 @@ public class UrlSet {
|
||||
}
|
||||
|
||||
public UrlSet relative(File file) throws MalformedURLException {
|
||||
String urlPath = file.toURI().toURL().toExternalForm();
|
||||
String urlPath = file.toURL().toExternalForm();
|
||||
Map<String, URL> urls = new HashMap<String, URL>();
|
||||
for (Map.Entry<String, URL> entry : this.urls.entrySet()) {
|
||||
String url = entry.getKey();
|
||||
@@ -218,7 +215,7 @@ public class UrlSet {
|
||||
urls.put(url, entry.getValue());
|
||||
}
|
||||
}
|
||||
return new UrlSet(urls);
|
||||
return new UrlSet(fileManager, urls);
|
||||
}
|
||||
|
||||
public List<URL> getUrls() {
|
||||
@@ -268,13 +265,14 @@ public class UrlSet {
|
||||
LOG.debug("Ignoring URL [#0] because it is not a valid protocol", url.toExternalForm());
|
||||
|
||||
}
|
||||
|
||||
// Usually the "classes" dir.
|
||||
ArrayList<URL> classesList = Collections.list(classLoader.getResources(""));
|
||||
for (URL url : classesList) {
|
||||
list.addAll(fileManager.getAllPhysicalUrls(url));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static interface FileProtocolNormalizer {
|
||||
|
||||
URL normalizeToFileProtocol(URL url);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.opensymphony.xwork2.util.fs;
|
||||
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
@@ -48,8 +49,13 @@ public class DefaultFileManager implements FileManager {
|
||||
public DefaultFileManager() {
|
||||
}
|
||||
|
||||
public void setReloadingConfigs(boolean reloadingConfigs) {
|
||||
this.reloadingConfigs = reloadingConfigs;
|
||||
@Inject(value = "reloadXmlConfiguration", required = false)
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
this.reloadingConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
public boolean isReloadingConfigs() {
|
||||
return reloadingConfigs;
|
||||
}
|
||||
|
||||
public boolean fileNeedsReloading(URL fileUrl) {
|
||||
@@ -88,20 +94,22 @@ public class DefaultFileManager implements FileManager {
|
||||
}
|
||||
|
||||
public void monitorFile(URL fileUrl) {
|
||||
String fileName = fileUrl.toString();
|
||||
Revision revision;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Creating revision for URL: " + fileName);
|
||||
}
|
||||
if (isJarURL(fileUrl)) {
|
||||
revision = JarEntryRevision.build(fileUrl, this);
|
||||
} else {
|
||||
revision = FileRevision.build(fileUrl);
|
||||
}
|
||||
if (revision == null) {
|
||||
files.put(fileName, Revision.build(fileUrl));
|
||||
} else {
|
||||
files.put(fileName, revision);
|
||||
if (isReloadingConfigs()) {
|
||||
String fileName = fileUrl.toString();
|
||||
Revision revision;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Creating revision for URL: " + fileName);
|
||||
}
|
||||
if (isJarURL(fileUrl)) {
|
||||
revision = JarEntryRevision.build(fileUrl, this);
|
||||
} else {
|
||||
revision = FileRevision.build(fileUrl);
|
||||
}
|
||||
if (revision == null) {
|
||||
files.put(fileName, Revision.build(fileUrl));
|
||||
} else {
|
||||
files.put(fileName, revision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,9 +135,10 @@ public class DefaultFileManager implements FileManager {
|
||||
return null; //it is not a jar or zip file
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Error opening url [#0]", e, url.toString());
|
||||
}
|
||||
//can this ever happen?
|
||||
return null;
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Error opening JBoss vfs file", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-29
@@ -2,7 +2,6 @@ package com.opensymphony.xwork2.util.fs;
|
||||
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
@@ -18,13 +17,12 @@ public class DefaultFileManagerFactory implements FileManagerFactory {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DefaultFileManagerFactory.class);
|
||||
|
||||
private boolean reloadingConfigs;
|
||||
private FileManager systemFileManager;
|
||||
private FileManager fileManager;
|
||||
private Container container;
|
||||
|
||||
@Inject(value = "system")
|
||||
public void setFileManager(FileManager fileManager) {
|
||||
this.systemFileManager = fileManager;
|
||||
this.fileManager = fileManager;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@@ -32,28 +30,7 @@ public class DefaultFileManagerFactory implements FileManagerFactory {
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
@Inject(value = XWorkConstants.RELOAD_XML_CONFIGURATION, required = false)
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
this.reloadingConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
public FileManager getFileManager() {
|
||||
FileManager fileManager = lookupFileManager();
|
||||
if (fileManager != null) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Using FileManager implementation [#0]", fileManager.getClass().getSimpleName());
|
||||
}
|
||||
fileManager.setReloadingConfigs(reloadingConfigs);
|
||||
return fileManager;
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Using default implementation of FileManager provided under name [system]: #0", systemFileManager.getClass().getSimpleName());
|
||||
}
|
||||
systemFileManager.setReloadingConfigs(reloadingConfigs);
|
||||
return systemFileManager;
|
||||
}
|
||||
|
||||
private FileManager lookupFileManager() {
|
||||
Set<String> names = container.getInstanceNames(FileManager.class);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Found following implementations of FileManager interface: #0", names.toString());
|
||||
@@ -79,12 +56,17 @@ public class DefaultFileManagerFactory implements FileManagerFactory {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("No user defined FileManager, looking up for internal implementations!");
|
||||
}
|
||||
for (FileManager fm : internals) {
|
||||
if (fm.support()) {
|
||||
return fm;
|
||||
if (fileManager == null) {
|
||||
for (FileManager fm : internals) {
|
||||
if (fm.support()) {
|
||||
return fm;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Using default implementation of FileManager provided under name [system]: #0", fileManager.getClass().getSimpleName());
|
||||
}
|
||||
return fileManager;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-8
@@ -21,7 +21,6 @@ import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.ActionProxy;
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.config.entities.ActionConfig;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.ClassLoaderUtil;
|
||||
@@ -64,7 +63,6 @@ public class AnnotationActionValidatorManager implements ActionValidatorManager
|
||||
private ValidatorFactory validatorFactory;
|
||||
private ValidatorFileParser validatorFileParser;
|
||||
private FileManager fileManager;
|
||||
private boolean reloadingConfigs;
|
||||
|
||||
@Inject
|
||||
public void setValidatorFactory(ValidatorFactory fac) {
|
||||
@@ -81,11 +79,6 @@ public class AnnotationActionValidatorManager implements ActionValidatorManager
|
||||
this.fileManager = fileManagerFactory.getFileManager();
|
||||
}
|
||||
|
||||
@Inject(value = XWorkConstants.RELOAD_XML_CONFIGURATION, required = false)
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
this.reloadingConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
public List<Validator> getValidators(Class clazz, String context) {
|
||||
return getValidators(clazz, context, null);
|
||||
}
|
||||
@@ -95,7 +88,7 @@ public class AnnotationActionValidatorManager implements ActionValidatorManager
|
||||
final List<ValidatorConfig> cfgs;
|
||||
|
||||
if (validatorCache.containsKey(validatorKey)) {
|
||||
if (reloadingConfigs) {
|
||||
if (fileManager.isReloadingConfigs()) {
|
||||
validatorCache.put(validatorKey, buildValidatorConfigs(clazz, context, true, null));
|
||||
}
|
||||
} else {
|
||||
|
||||
+1
-8
@@ -18,7 +18,6 @@ package com.opensymphony.xwork2.validator;
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.FileManager;
|
||||
import com.opensymphony.xwork2.FileManagerFactory;
|
||||
import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.ClassLoaderUtil;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
@@ -56,7 +55,6 @@ public class DefaultActionValidatorManager implements ActionValidatorManager {
|
||||
private ValidatorFactory validatorFactory;
|
||||
private ValidatorFileParser validatorFileParser;
|
||||
private FileManager fileManager;
|
||||
private boolean reloadingConfigs;
|
||||
|
||||
@Inject
|
||||
public void setValidatorFileParser(ValidatorFileParser parser) {
|
||||
@@ -73,11 +71,6 @@ public class DefaultActionValidatorManager implements ActionValidatorManager {
|
||||
this.fileManager = fileManagerFactory.getFileManager();
|
||||
}
|
||||
|
||||
@Inject(value = XWorkConstants.RELOAD_XML_CONFIGURATION, required = false)
|
||||
public void setReloadingConfigs(String reloadingConfigs) {
|
||||
this.reloadingConfigs = Boolean.parseBoolean(reloadingConfigs);
|
||||
}
|
||||
|
||||
public synchronized List<Validator> getValidators(Class clazz, String context) {
|
||||
return getValidators(clazz, context, null);
|
||||
}
|
||||
@@ -86,7 +79,7 @@ public class DefaultActionValidatorManager implements ActionValidatorManager {
|
||||
final String validatorKey = buildValidatorKey(clazz, context);
|
||||
|
||||
if (validatorCache.containsKey(validatorKey)) {
|
||||
if (reloadingConfigs) {
|
||||
if (fileManager.isReloadingConfigs()) {
|
||||
validatorCache.put(validatorKey, buildValidatorConfigs(clazz, context, true, null));
|
||||
}
|
||||
} else {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user