mirror of
https://github.com/apache/struts.git
synced 2026-08-08 08:07:17 +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.9</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_9/apps/blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</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_9/apps/jboss-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
|
||||
+6
-30
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</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_9/apps/mailreader</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
@@ -68,35 +68,11 @@
|
||||
<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>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-mailreader</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
|
||||
#
|
||||
# The five logging levels used by Log are (in order):
|
||||
#
|
||||
# 1. DEBUG (the least serious)
|
||||
# 2. INFO
|
||||
# 3. WARN
|
||||
# 4. ERROR
|
||||
# 5. FATAL (the most serious)
|
||||
|
||||
|
||||
# Set root logger level to WARN and append to stdout
|
||||
log4j.rootLogger=INFO, stdout
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
|
||||
|
||||
# Print only messages of level ERROR or above in the package noModule.
|
||||
log4j.logger.noModule=FATAL
|
||||
|
||||
# OpenSymphony Stuff
|
||||
log4j.logger.freemarker=INFO
|
||||
log4j.logger.com.opensymphony=INFO
|
||||
log4j.logger.com.opensymphony.xwork2.ognl=ERROR
|
||||
log4j.logger.org.apache.struts2=WARN
|
||||
log4j.logger.org.apache.struts2.components=WARN
|
||||
log4j.logger.org.apache.struts2.dispatcher=WARN
|
||||
log4j.logger.org.apache.struts2.convention=INFO
|
||||
|
||||
# Spring Stuff
|
||||
log4j.logger.org.springframework=WARN
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<?xml version='1.0'?>
|
||||
<database>
|
||||
<user username="user" fromAddress="John.User@somewhere.com" fullName="John Q. User" password="pass">
|
||||
<subscription host="mail.yahoo.com" autoConnect="false" password="foo" type="imap" username="jquser">
|
||||
</subscription>
|
||||
<subscription host="mail.hotmail.com" autoConnect="false" password="bar" type="pop3" username="user1234">
|
||||
</subscription>
|
||||
</user>
|
||||
<user username="user" fromAddress="John.User@somewhere.com"
|
||||
fullName="John Q. User" password="pass">
|
||||
<subscription host="mail.hotmail.com" autoConnect="false"
|
||||
password="bar" type="pop3" username="user1234">
|
||||
</subscription>
|
||||
<subscription host="mail.yahoo.com" autoConnect="false" password="foo"
|
||||
type="imap" username="jquser">
|
||||
</subscription>
|
||||
</user>
|
||||
</database>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</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_9/apps</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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
-11
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</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_9/apps/portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
@@ -179,12 +193,6 @@
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>
|
||||
<validator name="requiredstring" class="com.opensymphony.xwork2.validator.validators.RequiredStringValidator"/>
|
||||
<validator name="int" class="com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator"/>
|
||||
<validator name="short" class="com.opensymphony.xwork2.validator.validators.ShortRangeFieldValidator"/>
|
||||
<validator name="double" class="com.opensymphony.xwork2.validator.validators.DoubleRangeFieldValidator"/>
|
||||
<validator name="date" class="com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator"/>
|
||||
<validator name="expression" class="com.opensymphony.xwork2.validator.validators.ExpressionValidator"/>
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.3.9</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>
|
||||
@@ -101,10 +96,8 @@
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<version>8.0.0.M2</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
@@ -126,7 +119,7 @@
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<version>1.2.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
+22
-8
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>2.3.9</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_9/apps/showcase</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
@@ -149,6 +164,7 @@
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
@@ -203,10 +219,8 @@
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<version>8.0.0.M2</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
@@ -228,7 +242,7 @@
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<version>1.2.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</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_9/archetypes</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-blank</artifactId>
|
||||
<version>2.3.9</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_9/archetypes/struts2-archetype-blank</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
|
||||
@@ -66,35 +66,17 @@
|
||||
<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.1.21</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-blank</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
<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>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
#
|
||||
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
|
||||
#
|
||||
# The five logging levels used by Log are (in order):
|
||||
#
|
||||
# 1. DEBUG (the least serious)
|
||||
# 2. INFO
|
||||
# 3. WARN
|
||||
# 4. ERROR
|
||||
# 5. FATAL (the most serious)
|
||||
|
||||
|
||||
# Set root logger level to WARN and append to stdout
|
||||
log4j.rootLogger=WARN, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
|
||||
|
||||
# Print only messages of level ERROR or above in the package noModule.
|
||||
log4j.logger.noModule=ERROR
|
||||
|
||||
# OpenSymphony Stuff
|
||||
log4j.logger.com.opensymphony=INFO
|
||||
|
||||
# Struts2 Stuff
|
||||
log4j.logger.org.apache.struts2=INFO
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-convention</artifactId>
|
||||
<version>2.3.9</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_9/archetypes/struts2-archetype-convention</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
|
||||
+7
-26
@@ -80,35 +80,16 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.21</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
<scanTargets>
|
||||
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
|
||||
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
|
||||
<scanTarget>src/main/resources/struts.xml</scanTarget>
|
||||
</scanTargets>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
#
|
||||
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
|
||||
#
|
||||
# The five logging levels used by Log are (in order):
|
||||
#
|
||||
# 1. DEBUG (the least serious)
|
||||
# 2. INFO
|
||||
# 3. WARN
|
||||
# 4. ERROR
|
||||
# 5. FATAL (the most serious)
|
||||
|
||||
|
||||
# Set root logger level to WARN and append to stdout
|
||||
log4j.rootLogger=WARN, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
|
||||
|
||||
# Print only messages of level ERROR or above in the package noModule.
|
||||
log4j.logger.noModule=ERROR
|
||||
|
||||
# OpenSymphony Stuff
|
||||
log4j.logger.com.opensymphony=INFO
|
||||
|
||||
# Struts2 Stuff
|
||||
log4j.logger.org.apache.struts2=INFO
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-dbportlet</artifactId>
|
||||
<version>2.3.9</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_9/archetypes/struts2-archetype-dbportlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</developerConnection>
|
||||
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-plugin</artifactId>
|
||||
<version>2.3.9</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_9/archetypes/struts2-archetype-plugin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
|
||||
@@ -1,38 +1,42 @@
|
||||
INFORMATION
|
||||
===========
|
||||
- This is Struts 2's "Portlet" Maven Archetype
|
||||
- To be used to create a simple portlet that can be deployed as JSR286 portlet.
|
||||
- There is a maven profile in order to test this portlet on Pluto Portal.
|
||||
- To be used to create a simple portlet that can be deployed as a webapp or JSR168 portlet.
|
||||
|
||||
|
||||
USAGE
|
||||
=====
|
||||
|
||||
1- Generate your archetype
|
||||
- mvn archetype:generate -DartifactId=struts2-portlet-helloworld -DgroupId=com.mycompany.struts2.portlet -Dversion=1.0.0-SNAPSHOT -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-portlet -DarchetypeVersion=2.3.8
|
||||
- change directory to where the portlet template is to be created,
|
||||
for example, a 'projects' directory (which you may need to create):
|
||||
|
||||
cd /home/tmjee/projects
|
||||
|
||||
- run the following command to generate the sample portlet template, assuming :-
|
||||
- root java package -> com.myCompany.myPortlet
|
||||
|
||||
2- Build your portlet project for Pluto Portal
|
||||
- cd struts2-portlet-helloworld
|
||||
- mvn clean package -Ppluto-embedded
|
||||
|
||||
3- Download and install Pluto Portal
|
||||
- cd ..
|
||||
- curl -v -H "Accept-Encoding: gzip" "http://apache.opensourcemirror.com/portals/pluto/pluto-2.0.3-bundle.zip" > pluto-2.0.3.zip
|
||||
- unzip pluto-2.0.3.zip -d .
|
||||
|
||||
4- Deploy your portlet app
|
||||
- cp struts2-portlet-helloworld/target/struts2-portlet-helloworld-1.0.0-SNAPSHOT.war pluto-2.0.3/webapps
|
||||
|
||||
5- Start Pluto Portal and create a page for your portlet
|
||||
- ./pluto-2.0.3/bin/startup.sh
|
||||
- Go to http://localhost:8080/pluto/portal (login: pluto / pwd: pluto)
|
||||
- Click on "Pluto Admin" (http://localhost:8080/pluto/portal/Pluto%20Admin)
|
||||
- On "Portal Pages" section : Add page "Struts2"
|
||||
- On "Portlet Applications" section : select "/struts2-portlet-helloworld" and "HelloPortlet" then click "Add Portlet"
|
||||
|
||||
6- Test your portlet app
|
||||
- Go to your Struts2 page http://localhost:8080/pluto/portal/Struts2 and play with your portlet !!
|
||||
- the portlet war name -> myWebApp
|
||||
|
||||
|
||||
mvn archetype:create -DgroupId=com.myCompany.myPortlet \
|
||||
-DartifactId=myWebApp \
|
||||
-DarchetypeGroupId=org.apache.struts \
|
||||
-DarchetypeArtifactId=struts2-archetype-portlet \
|
||||
-DarchetypeVersion=2.0.9-SNAPSHOT \
|
||||
-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
|
||||
|
||||
- to compile, execute
|
||||
mvn compile
|
||||
|
||||
- to run test cases execute
|
||||
mvn test
|
||||
|
||||
- to clean execute
|
||||
mvn clean
|
||||
|
||||
- to package execute
|
||||
mvn package
|
||||
|
||||
- to start it with jetty execute as a servlet
|
||||
mvn jetty:run
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-portlet</artifactId>
|
||||
<version>2.3.9</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_9/archetypes/struts2-archetype-portlet</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
@@ -25,6 +25,13 @@
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/archetype-resources/src</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet filtered="true" packaged="false">
|
||||
<fileSet filtered="false" packaged="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
|
||||
+90
-49
@@ -3,20 +3,14 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
<groupId>\${groupId}</groupId>
|
||||
<artifactId>\${artifactId}</artifactId>
|
||||
<version>\${version}</version>
|
||||
<packaging>war</packaging>
|
||||
<name>${artifactId}</name>
|
||||
<name>\${artifactId}</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<struts2.version>${project.version}</struts2.version>
|
||||
<portlet.api.version>2.0</portlet.api.version>
|
||||
<!-- plugins -->
|
||||
<plugin.compiler.version>3.0</plugin.compiler.version>
|
||||
<plugin.war.version>2.3</plugin.war.version>
|
||||
<plugin.pluto.version>2.0.3</plugin.pluto.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -25,67 +19,114 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
<version>${struts2.version}</version>
|
||||
<version>\${struts2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-plugin</artifactId>
|
||||
<version>${struts2.version}</version>
|
||||
<version>\${struts2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
<version>\${struts2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.portlet</groupId>
|
||||
<artifactId>portlet-api</artifactId>
|
||||
<version>${portlet.api.version}</version>
|
||||
<version>2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bekk.boss</groupId>
|
||||
<artifactId>maven-jetty-pluto-embedded</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>6.1.21</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1</artifactId>
|
||||
<version>6.1.14</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${plugin.compiler.version}</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>pluto-embedded</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- configure maven-war-plugin to use updated web.xml -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${plugin.war.version}</version>
|
||||
<configuration>
|
||||
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- bind 'pluto2:assemble' goal to 'generate-resources' lifecycle -->
|
||||
<plugin>
|
||||
<groupId>org.apache.portals.pluto</groupId>
|
||||
<artifactId>maven-pluto-plugin</artifactId>
|
||||
<version>${plugin.pluto.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>assemble</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>pluto-embedded</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.pluto</groupId>
|
||||
<artifactId>maven-pluto-plugin</artifactId>
|
||||
<version>1.1.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>assemble</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.21</version>
|
||||
<configuration>
|
||||
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
|
||||
<webAppConfig>
|
||||
<contextPath>/${project.artifactId}</contextPath>
|
||||
<defaultsDescriptor>/WEB-INF/jetty-pluto-web-default.xml</defaultsDescriptor>
|
||||
</webAppConfig>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>org.apache.pluto.embedded.portletIds</name>
|
||||
<value>HelloPortlet</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<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>
|
||||
</scanTargets>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.bekk.boss</groupId>
|
||||
<artifactId>maven-jetty-pluto-embedded</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
+3
-1
@@ -1,10 +1,12 @@
|
||||
package ${package};
|
||||
package ${packageName};
|
||||
|
||||
import javax.portlet.PortletPreferences;
|
||||
|
||||
import org.apache.struts2.dispatcher.DefaultActionSupport;
|
||||
import org.apache.struts2.portlet.interceptor.PortletPreferencesAware;
|
||||
|
||||
import com.opensymphony.xwork2.Preparable;
|
||||
|
||||
public class HelloAction extends DefaultActionSupport implements PortletPreferencesAware {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package ${package};
|
||||
package ${packageName};
|
||||
|
||||
import javax.portlet.PortletPreferences;
|
||||
|
||||
|
||||
+2
-2
@@ -5,14 +5,14 @@
|
||||
|
||||
<struts>
|
||||
<package name="default" extends="struts-portlet-default" namespace="/view">
|
||||
<action name="index" class="${package}.HelloAction">
|
||||
<action name="index" class="${packageName}.HelloAction">
|
||||
<result>/WEB-INF/jsp/view/index.jsp</result>
|
||||
</action>
|
||||
</package>
|
||||
|
||||
<package name="edit" extends="struts-portlet-default" namespace="/edit">
|
||||
|
||||
<action name="index" class="${package}.UpdateNameAction">
|
||||
<action name="index" class="${packageName}.UpdateNameAction">
|
||||
<result type="redirectAction">
|
||||
<param name="actionName">index</param>
|
||||
<param name="portletMode">view</param>
|
||||
|
||||
+7
-11
@@ -1,23 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
|
||||
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
|
||||
id="\${artifactId}">
|
||||
<portlet-app
|
||||
version="1.0"
|
||||
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
|
||||
id="${artifactId}">
|
||||
|
||||
<portlet id="HelloPortlet">
|
||||
<description xml:lang="EN">Simple hello world portlet</description>
|
||||
<portlet-name>HelloPortlet</portlet-name>
|
||||
<display-name xml:lang="EN">\${artifactId}</display-name>
|
||||
<display-name xml:lang="EN">${artifactId}</display-name>
|
||||
|
||||
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
|
||||
|
||||
<init-param>
|
||||
<name>actionPackages</name>
|
||||
<value>${package}</value>
|
||||
</init-param>
|
||||
|
||||
<!-- The namespace for the actions configured for view mode -->
|
||||
<init-param>
|
||||
<name>viewNamespace</name>
|
||||
|
||||
+2
-18
@@ -1,21 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
<web-app id="\${artifactId}">
|
||||
<display-name>Struts2 Hello World Portlet</display-name>
|
||||
|
||||
<filter>
|
||||
<filter-name>struts2</filter-name>
|
||||
<filter-class>
|
||||
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
|
||||
</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>struts2</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
<web-app id="${artifactId}">
|
||||
<!-- Empty -->
|
||||
</web-app>
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package ${packageName};
|
||||
|
||||
import org.apache.pluto.core.PortletServlet;
|
||||
import org.mortbay.jetty.Server;
|
||||
import org.mortbay.jetty.servlet.ServletHolder;
|
||||
import org.mortbay.jetty.webapp.WebAppContext;
|
||||
|
||||
public class JettyPlutoLauncher {
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.setProperty("org.apache.pluto.embedded.portletIds", "HelloPortlet");
|
||||
Server server = new Server(8080);
|
||||
WebAppContext webapp = new WebAppContext("src/main/webapp", "/${artifactId}");
|
||||
webapp.setDefaultsDescriptor("/WEB-INF/jetty-pluto-web-default.xml");
|
||||
ServletHolder portletServlet = new ServletHolder(new PortletServlet());
|
||||
portletServlet.setInitParameter("portlet-name", "HelloPortlet");
|
||||
portletServlet.setInitOrder(1);
|
||||
webapp.addServlet(portletServlet, "/PlutoInvoker/HelloPortlet");
|
||||
server.addHandler(webapp);
|
||||
server.start();
|
||||
}
|
||||
}
|
||||
@@ -4,19 +4,19 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-archetypes</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>struts2-archetype-starter</artifactId>
|
||||
<version>2.3.9</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_9/archetypes/struts2-archetype-starter</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
|
||||
+10
-28
@@ -88,37 +88,19 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>8.1.7.v20120910</version>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.21</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>log4j.configuration</name>
|
||||
<value>file:${basedir}/src/main/resources/log4j.properties</value>
|
||||
</systemProperty>
|
||||
<systemProperty>
|
||||
<name>slf4j</name>
|
||||
<value>false</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
<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/applicationContext.xml</scanTarget>
|
||||
</scanTargets>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
+4
-4
@@ -11,13 +11,13 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>2.3.9</version>
|
||||
<version>2.3.6</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/assembly</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/assembly</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/assembly</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</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_9/bundles/admin</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</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_9/bundles/demo</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</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_9/bundles</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</developerConnection>
|
||||
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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.9</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_9/core</connection>
|
||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/core</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/core</url>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_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>
|
||||
|
||||
@@ -125,6 +125,11 @@ public final class StrutsConstants {
|
||||
/** The directory to use for storing uploaded files */
|
||||
public static final String STRUTS_MULTIPART_SAVEDIR = "struts.multipart.saveDir";
|
||||
|
||||
/**
|
||||
* The name of the bean that will handle multipart requests
|
||||
*/
|
||||
public static final String STRUTS_MULTIPART_HANDLER = "struts.multipart.handler";
|
||||
|
||||
/**
|
||||
* The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser implementation
|
||||
* for a multipart request (file upload)
|
||||
@@ -241,10 +246,4 @@ public final class StrutsConstants {
|
||||
/** Enable handling exceptions by Dispatcher - true by default **/
|
||||
public static final String STRUTS_HANDLE_EXCEPTION = "struts.handle.exception";
|
||||
|
||||
public static final String STRUTS_CONVERTER_PROPERTIES_PROCESSOR = "struts.converter.properties.processor";
|
||||
public static final String STRUTS_CONVERTER_FILE_PROCESSOR = "struts.converter.file.processor";
|
||||
public static final String STRUTS_CONVERTER_ANNOTATION_PROCESSOR = "struts.converter.annotation.processor";
|
||||
public static final String STRUTS_CONVERTER_CREATOR = "struts.converter.creator";
|
||||
public static final String STRUTS_CONVERTER_HOLDER = "struts..converter.holder";
|
||||
|
||||
}
|
||||
|
||||
@@ -21,14 +21,16 @@
|
||||
|
||||
package org.apache.struts2.components;
|
||||
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||
import java.io.Writer;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.Writer;
|
||||
|
||||
import org.apache.struts2.views.annotations.StrutsTagAttribute;
|
||||
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
/**
|
||||
* ClosingUIBean is the standard superclass for UI components such as div etc.
|
||||
@@ -57,6 +59,7 @@ public abstract class ClosingUIBean extends UIBean {
|
||||
mergeTemplate(writer, buildTemplateName(openTemplate, getDefaultOpenTemplate()));
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not open template", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -275,19 +275,21 @@ public class Date extends ContextBean {
|
||||
}
|
||||
|
||||
public boolean end(Writer writer, String body) {
|
||||
String msg;
|
||||
String msg = null;
|
||||
java.util.Date date = null;
|
||||
// find the name on the valueStack
|
||||
try {
|
||||
//suport Calendar also
|
||||
Object dateObject = findValue(name);
|
||||
if (dateObject instanceof java.util.Date) {
|
||||
if (dateObject instanceof java.util.Date)
|
||||
date = (java.util.Date) dateObject;
|
||||
} else if(dateObject instanceof Calendar){
|
||||
else if(dateObject instanceof Calendar)
|
||||
date = ((Calendar) dateObject).getTime();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not convert object with key '#0' to a java.util.Date instance", name);
|
||||
LOG.error("Could not convert object with key '" + name
|
||||
+ "' to a java.util.Date instance");
|
||||
// bad date, return a blank instead ?
|
||||
msg = "";
|
||||
}
|
||||
|
||||
//try to find the format on the stack
|
||||
|
||||
@@ -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>
|
||||
*
|
||||
|
||||
@@ -49,10 +49,9 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
/**
|
||||
* UIBean is the standard superclass of all Struts UI components.
|
||||
* UIBean is the standard superclass of all Struts UI componentns.
|
||||
* It defines common Struts and html properties all UI components should present for usage.
|
||||
*
|
||||
* <!-- START SNIPPET: templateRelatedAttributes -->
|
||||
@@ -157,12 +156,6 @@ import java.util.concurrent.ConcurrentMap;
|
||||
* <td>xhtml</td>
|
||||
* <td>String</td>
|
||||
* <td>define required label position of form element (left/right), default to right</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>errorPosition</td>
|
||||
* <td>xhtml</td>
|
||||
* <td>String</td>
|
||||
* <td>define error position of form element (top|bottom), default to top</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>name</td>
|
||||
@@ -460,10 +453,9 @@ public abstract class UIBean extends Component {
|
||||
protected String label;
|
||||
protected String labelPosition;
|
||||
protected String labelSeparator;
|
||||
protected String requiredPosition;
|
||||
protected String errorPosition;
|
||||
protected String requiredposition;
|
||||
protected String name;
|
||||
protected String requiredLabel;
|
||||
protected String required;
|
||||
protected String tabindex;
|
||||
protected String value;
|
||||
protected String title;
|
||||
@@ -503,7 +495,7 @@ public abstract class UIBean extends Component {
|
||||
protected TemplateEngineManager templateEngineManager;
|
||||
|
||||
// dynamic attributes support for tags used with FreeMarker templates
|
||||
protected static ConcurrentMap<Class, Set<String>> standardAttributesMap = new ConcurrentHashMap<Class, Set<String>>();
|
||||
protected static Map<Class, Set<String>> standardAttributesMap = new ConcurrentHashMap<Class, Set<String>>();
|
||||
|
||||
@Inject(StrutsConstants.STRUTS_UI_TEMPLATEDIR)
|
||||
public void setDefaultTemplateDir(String dir) {
|
||||
@@ -670,16 +662,12 @@ public abstract class UIBean extends Component {
|
||||
addParameter("labelposition", findString(labelPosition));
|
||||
}
|
||||
|
||||
if (requiredPosition != null) {
|
||||
addParameter("requiredposition", findString(requiredPosition));
|
||||
if (requiredposition != null) {
|
||||
addParameter("requiredposition", findString(requiredposition));
|
||||
}
|
||||
|
||||
if (errorPosition != null) {
|
||||
addParameter("errorposition", findString(errorPosition));
|
||||
}
|
||||
|
||||
if (requiredLabel != null) {
|
||||
addParameter("required", findValue(requiredLabel, Boolean.class));
|
||||
if (required != null) {
|
||||
addParameter("required", findValue(required, Boolean.class));
|
||||
}
|
||||
|
||||
if (disabled != null) {
|
||||
@@ -1078,23 +1066,18 @@ public abstract class UIBean extends Component {
|
||||
}
|
||||
|
||||
@StrutsTagAttribute(description="Define required position of required form element (left|right)")
|
||||
public void setRequiredPosition(String requiredPosition) {
|
||||
this.requiredPosition = requiredPosition;
|
||||
public void setRequiredposition(String requiredposition) {
|
||||
this.requiredposition = requiredposition;
|
||||
}
|
||||
|
||||
@StrutsTagAttribute(description="Define error position of form element (top|bottom)")
|
||||
public void setErrorPosition(String errorPosition) {
|
||||
this.errorPosition = errorPosition;
|
||||
}
|
||||
|
||||
@StrutsTagAttribute(description="The name to set for element")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@StrutsTagAttribute(description="If set to true, the rendered element will indicate that input is required", type="Boolean", defaultValue="false")
|
||||
public void setRequiredLabel(String requiredLabel) {
|
||||
this.requiredLabel = requiredLabel;
|
||||
public void setRequired(String required) {
|
||||
this.required = required;
|
||||
}
|
||||
|
||||
@StrutsTagAttribute(description="Set the html tabindex attribute on rendered html element")
|
||||
@@ -1244,6 +1227,7 @@ public abstract class UIBean extends Component {
|
||||
Set<String> standardAttributes = standardAttributesMap.get(clz);
|
||||
if (standardAttributes == null) {
|
||||
standardAttributes = new HashSet<String>();
|
||||
standardAttributesMap.put(clz, standardAttributes);
|
||||
while (clz != null) {
|
||||
for (Field f : clz.getDeclaredFields()) {
|
||||
if (Modifier.isProtected(f.getModifiers())
|
||||
@@ -1257,9 +1241,8 @@ public abstract class UIBean extends Component {
|
||||
clz = clz.getSuperclass();
|
||||
}
|
||||
}
|
||||
standardAttributesMap.putIfAbsent(clz, standardAttributes);
|
||||
}
|
||||
return standardAttributes;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -32,12 +32,7 @@ import com.opensymphony.xwork2.XWorkConstants;
|
||||
import com.opensymphony.xwork2.config.Configuration;
|
||||
import com.opensymphony.xwork2.config.ConfigurationException;
|
||||
import com.opensymphony.xwork2.config.ConfigurationProvider;
|
||||
import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor;
|
||||
import com.opensymphony.xwork2.conversion.ConversionFileProcessor;
|
||||
import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor;
|
||||
import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
|
||||
import com.opensymphony.xwork2.conversion.TypeConverterCreator;
|
||||
import com.opensymphony.xwork2.conversion.TypeConverterHolder;
|
||||
import com.opensymphony.xwork2.conversion.impl.ArrayConverter;
|
||||
import com.opensymphony.xwork2.conversion.impl.CollectionConverter;
|
||||
import com.opensymphony.xwork2.conversion.impl.DateConverter;
|
||||
@@ -246,36 +241,6 @@ import java.util.StringTokenizer;
|
||||
* <td>singleton</td>
|
||||
* <td>Converter used to convert any object to String and back</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor</td>
|
||||
* <td>struts.conversion.properties.processor</td>
|
||||
* <td>singleton</td>
|
||||
* <td>Process Properties to create converters</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor</td>
|
||||
* <td>struts.converter.file.processor</td>
|
||||
* <td>singleton</td>
|
||||
* <td>Process <class>-conversion.properties file create converters</class></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor</td>
|
||||
* <td>struts.converter.annotation.processor</td>
|
||||
* <td>singleton</td>
|
||||
* <td>Process TypeConversion annotation to create converters</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>com.opensymphony.xwork2.conversion.TypeConverterCreator</td>
|
||||
* <td>struts.converter.creator</td>
|
||||
* <td>singleton</td>
|
||||
* <td>Creates user converters</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>com.opensymphony.xwork2.conversion.TypeConverterHolder</td>
|
||||
* <td>struts.converter.holder</td>
|
||||
* <td>singleton</td>
|
||||
* <td>Holds user converters' instances</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* <!-- END SNIPPET: extensionPoints -->
|
||||
@@ -321,23 +286,9 @@ 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(CollectionConverter.class, StrutsConstants.STRUTS_CONVERTER_COLLECTION, builder, props);
|
||||
alias(ArrayConverter.class, StrutsConstants.STRUTS_CONVERTER_ARRAY, builder, props);
|
||||
alias(DateConverter.class, StrutsConstants.STRUTS_CONVERTER_DATE, builder, props);
|
||||
alias(NumberConverter.class, StrutsConstants.STRUTS_CONVERTER_NUMBER, builder, props);
|
||||
alias(StringConverter.class, StrutsConstants.STRUTS_CONVERTER_STRING, builder, props);
|
||||
|
||||
alias(ConversionPropertiesProcessor.class, StrutsConstants.STRUTS_CONVERTER_PROPERTIES_PROCESSOR, builder, props);
|
||||
alias(ConversionFileProcessor.class, StrutsConstants.STRUTS_CONVERTER_FILE_PROCESSOR, builder, props);
|
||||
alias(ConversionAnnotationProcessor.class, StrutsConstants.STRUTS_CONVERTER_ANNOTATION_PROCESSOR, builder, props);
|
||||
alias(TypeConverterCreator.class, StrutsConstants.STRUTS_CONVERTER_CREATOR, builder, props);
|
||||
alias(TypeConverterHolder.class, StrutsConstants.STRUTS_CONVERTER_HOLDER, builder, props);
|
||||
|
||||
alias(TextProvider.class, StrutsConstants.STRUTS_XWORKTEXTPROVIDER, builder, props, Scope.DEFAULT);
|
||||
|
||||
alias(LocaleProvider.class, StrutsConstants.STRUTS_LOCALE_PROVIDER, builder, props);
|
||||
alias(ActionProxyFactory.class, StrutsConstants.STRUTS_ACTIONPROXYFACTORY, builder, props);
|
||||
alias(ObjectTypeDeterminer.class, StrutsConstants.STRUTS_OBJECTTYPEDETERMINER, builder, props);
|
||||
@@ -355,6 +306,12 @@ public class BeanSelectionProvider implements ConfigurationProvider {
|
||||
alias(UnknownHandlerManager.class, StrutsConstants.STRUTS_UNKNOWN_HANDLER_MANAGER, builder, props);
|
||||
alias(UrlHelper.class, StrutsConstants.STRUTS_URL_HELPER, builder, props);
|
||||
|
||||
alias(CollectionConverter.class, StrutsConstants.STRUTS_CONVERTER_COLLECTION, builder, props);
|
||||
alias(ArrayConverter.class, StrutsConstants.STRUTS_CONVERTER_ARRAY, builder, props);
|
||||
alias(DateConverter.class, StrutsConstants.STRUTS_CONVERTER_DATE, builder, props);
|
||||
alias(NumberConverter.class, StrutsConstants.STRUTS_CONVERTER_NUMBER, builder, props);
|
||||
alias(StringConverter.class, StrutsConstants.STRUTS_CONVERTER_STRING, builder, props);
|
||||
|
||||
if ("true".equalsIgnoreCase(props.getProperty(StrutsConstants.STRUTS_DEVMODE))) {
|
||||
props.setProperty(StrutsConstants.STRUTS_I18N_RELOAD, "true");
|
||||
props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true");
|
||||
@@ -391,11 +348,11 @@ public class BeanSelectionProvider implements ConfigurationProvider {
|
||||
String name = customBundles.nextToken();
|
||||
try {
|
||||
if (LOG.isInfoEnabled()) {
|
||||
LOG.info("Loading global messages from [#0]", name);
|
||||
LOG.info("Loading global messages from " + name);
|
||||
}
|
||||
LocalizedTextUtil.addDefaultResourceBundle(name);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not find messages file #0.properties. Skipping", name);
|
||||
LOG.error("Could not find messages file " + name + ".properties. Skipping");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
package org.apache.struts2.dispatcher;
|
||||
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
/**
|
||||
* Simple class to hold Container instance per thread to minimise number of attempts
|
||||
* to read configuration and build each time a new configuration.
|
||||
*
|
||||
* Thus depends on {@link StrutsConstants#STRUTS_CONFIGURATION_XML_RELOAD} flag,
|
||||
* if set to false just use stored container, configuration will do not change.
|
||||
*/
|
||||
class ContainerHolder {
|
||||
|
||||
private static ThreadLocal<Container> instance = new ThreadLocal<Container>();
|
||||
|
||||
public static void store(Container instance) {
|
||||
boolean reloadConfigs = Boolean.valueOf(instance.getInstance(String.class, StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD));
|
||||
if (!reloadConfigs) {
|
||||
// reloadConfigs is false, configuration will do not change, just keep it
|
||||
ContainerHolder.instance.set(instance);
|
||||
}
|
||||
}
|
||||
|
||||
public static Container get() {
|
||||
return ContainerHolder.instance.get();
|
||||
}
|
||||
|
||||
public static void clear() {
|
||||
ContainerHolder.instance.set(null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -37,41 +37,19 @@ 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.
|
||||
*/
|
||||
private Logger LOG = LoggerFactory.getLogger(DefaultStaticContentLoader.class);
|
||||
private Logger log;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@@ -138,6 +116,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
packages = param + " " + packages;
|
||||
}
|
||||
this.pathPrefixes = parse(packages);
|
||||
initLogging(filterConfig);
|
||||
}
|
||||
|
||||
protected String getAdditionalPackages() {
|
||||
@@ -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()]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -213,9 +192,8 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
try {
|
||||
ifModifiedSince = request.getDateHeader("If-Modified-Since");
|
||||
} catch (Exception e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Invalid If-Modified-Since header value: '#0', ignoring", request.getHeader("If-Modified-Since"));
|
||||
}
|
||||
log.warn("Invalid If-Modified-Since header value: '"
|
||||
+ request.getHeader("If-Modified-Since") + "', ignoring");
|
||||
}
|
||||
long lastModifiedMillis = lastModifiedCal.getTimeInMillis();
|
||||
long now = cal.getTimeInMillis();
|
||||
@@ -255,9 +233,33 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
|
||||
} finally {
|
||||
is.close();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void initLogging(HostConfig filterConfig) {
|
||||
String factoryName = filterConfig.getInitParameter("loggerFactory");
|
||||
if (factoryName != null) {
|
||||
try {
|
||||
Class cls = ClassLoaderUtil.loadClass(factoryName, this.getClass());
|
||||
LoggerFactory fac = (LoggerFactory)cls.newInstance();
|
||||
LoggerFactory.setLoggerFactory(fac);
|
||||
} catch (InstantiationException e) {
|
||||
System.err.println("Unable to instantiate logger factory: "+factoryName+", using default");
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
System.err.println("Unable to access logger factory: "+factoryName+", using default");
|
||||
e.printStackTrace();
|
||||
} catch (ClassNotFoundException e) {
|
||||
System.err.println("Unable to locate logger factory class: "+factoryName+", using default");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
log = LoggerFactory.getLogger(FilterDispatcher.class);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for a static resource in the classpath.
|
||||
*
|
||||
@@ -274,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;
|
||||
|
||||
@@ -139,9 +139,9 @@ public class Dispatcher {
|
||||
private String multipartSaveDir;
|
||||
|
||||
/**
|
||||
* Stores reference to instance of {@link MultiPartRequest} implementation defined by {@link StrutsConstants#STRUTS_MULTIPART_PARSER}
|
||||
* Stores the value of StrutsConstants.STRUTS_MULTIPART_HANDLER setting
|
||||
*/
|
||||
private MultiPartRequest multipartHandler;
|
||||
private String multipartHandlerName;
|
||||
|
||||
/**
|
||||
* Provide list of default configuration files.
|
||||
@@ -252,9 +252,9 @@ public class Dispatcher {
|
||||
multipartSaveDir = val;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setMultipartHandler(MultiPartRequest multiPartRequest) {
|
||||
this.multipartHandler = multiPartRequest;
|
||||
@Inject(StrutsConstants.STRUTS_MULTIPART_HANDLER)
|
||||
public void setMultipartHandler(String val) {
|
||||
multipartHandlerName = val;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@@ -285,7 +285,7 @@ public class Dispatcher {
|
||||
}
|
||||
catch(Exception e) {
|
||||
// catch any exception that may occurred during destroy() and log it
|
||||
LOG.error("exception occurred while destroying ObjectFactory [#0]", e, objectFactory.toString());
|
||||
LOG.error("exception occurred while destroying ObjectFactory ["+objectFactory+"]", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,8 +432,6 @@ public class Dispatcher {
|
||||
boolean reloadi18n = Boolean.valueOf(container.getInstance(String.class, StrutsConstants.STRUTS_I18N_RELOAD));
|
||||
LocalizedTextUtil.setReloadBundles(reloadi18n);
|
||||
|
||||
ContainerHolder.store(container);
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
@@ -681,20 +679,21 @@ public class Dispatcher {
|
||||
File multipartSaveDir = new File(saveDir);
|
||||
|
||||
if (!multipartSaveDir.exists()) {
|
||||
if (!multipartSaveDir.mkdirs()) {
|
||||
if (!multipartSaveDir.mkdir()) {
|
||||
String logMessage;
|
||||
try {
|
||||
logMessage = "Could not find create multipart save directory '" + multipartSaveDir.getCanonicalPath() + "'.";
|
||||
} catch (IOException e) {
|
||||
logMessage = "Could not find create multipart save directory '" + multipartSaveDir.toString() + "'.";
|
||||
}
|
||||
if (devMode) {
|
||||
try {
|
||||
logMessage = "Could not find create multipart save directory '"+multipartSaveDir.getCanonicalPath()+"'.";
|
||||
} catch (IOException e) {
|
||||
logMessage = "Could not find create multipart save directory '"+multipartSaveDir.toString()+"'.";
|
||||
}
|
||||
if(devMode) {
|
||||
LOG.error(logMessage);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn(logMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -774,8 +773,19 @@ public class Dispatcher {
|
||||
|
||||
String content_type = request.getContentType();
|
||||
if (content_type != null && content_type.contains("multipart/form-data")) {
|
||||
MultiPartRequest mpr = null;
|
||||
//check for alternate implementations of MultiPartRequest
|
||||
Set<String> multiNames = getContainer().getInstanceNames(MultiPartRequest.class);
|
||||
for (String multiName : multiNames) {
|
||||
if (multiName.equals(multipartHandlerName)) {
|
||||
mpr = getContainer().getInstance(MultiPartRequest.class, multiName);
|
||||
}
|
||||
}
|
||||
if (mpr == null ) {
|
||||
mpr = getContainer().getInstance(MultiPartRequest.class);
|
||||
}
|
||||
LocaleProvider provider = getContainer().getInstance(LocaleProvider.class);
|
||||
request = new MultiPartRequestWrapper(multipartHandler, request, getSaveDir(servletContext), provider);
|
||||
request = new MultiPartRequestWrapper(mpr, request, getSaveDir(servletContext), provider);
|
||||
} else {
|
||||
request = new StrutsRequestWrapper(request);
|
||||
}
|
||||
@@ -898,10 +908,8 @@ public class Dispatcher {
|
||||
* Modify the ConfigurationManager instance
|
||||
*
|
||||
* @param mgr The configuration manager
|
||||
* @deprecated should be removed as is used only in tests
|
||||
*/
|
||||
public void setConfigurationManager(ConfigurationManager mgr) {
|
||||
ContainerHolder.clear();
|
||||
this.configurationManager = mgr;
|
||||
}
|
||||
|
||||
@@ -910,9 +918,6 @@ public class Dispatcher {
|
||||
* @return Our dependency injection container
|
||||
*/
|
||||
public Container getContainer() {
|
||||
if (ContainerHolder.get() != null) {
|
||||
return ContainerHolder.get();
|
||||
}
|
||||
ConfigurationManager mgr = getConfigurationManager();
|
||||
if (mgr == null) {
|
||||
throw new IllegalStateException("The configuration manager shouldn't be null");
|
||||
@@ -921,11 +926,8 @@ public class Dispatcher {
|
||||
if (config == null) {
|
||||
throw new IllegalStateException("Unable to load configuration");
|
||||
} else {
|
||||
Container container = config.getContainer();
|
||||
ContainerHolder.store(container);
|
||||
return container;
|
||||
return config.getContainer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@ import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.Result;
|
||||
import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -37,60 +35,64 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* <!-- START SNIPPET: description -->
|
||||
* <p/>
|
||||
*
|
||||
* A custom Result type for setting HTTP headers and status by optionally evaluating against the ValueStack.
|
||||
* This result can also be used to send and error to the client. All the parameters can be evaluated against the ValueStack.
|
||||
* <p/>
|
||||
* This result can also be used to send and error to the client.
|
||||
*
|
||||
* <!-- END SNIPPET: description -->
|
||||
* <p/>
|
||||
* <b>This result type takes the following parameters:</b>
|
||||
* <p/>
|
||||
*
|
||||
* <!-- START SNIPPET: params -->
|
||||
* <p/>
|
||||
*
|
||||
* <ul>
|
||||
* <p/>
|
||||
*
|
||||
* <li><b>status</b> - the http servlet response status code that should be set on a response.</li>
|
||||
* <p/>
|
||||
*
|
||||
* <li><b>parse</b> - true by default. If set to false, the headers param will not be parsed for Ognl expressions.</li>
|
||||
* <p/>
|
||||
*
|
||||
* <li><b>headers</b> - header values.</li>
|
||||
* <p/>
|
||||
*
|
||||
* <li><b>error</b> - the http servlet response error code that should be set on a response.</li>
|
||||
* <p/>
|
||||
*
|
||||
* <li><b>errorMessage</b> - error message to be set on response if 'error' is set.</li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
*
|
||||
* <!-- END SNIPPET: params -->
|
||||
* <p/>
|
||||
*
|
||||
* <b>Example:</b>
|
||||
* <p/>
|
||||
*
|
||||
* <pre><!-- START SNIPPET: example -->
|
||||
* <result name="success" type="httpheader">
|
||||
* <param name="status">204</param>
|
||||
* <param name="headers.a">a custom header value</param>
|
||||
* <param name="headers.b">another custom header value</param>
|
||||
* </result>
|
||||
* <p/>
|
||||
*
|
||||
* <result name="proxyRequired" type="httpheader">
|
||||
* <param name="error">305</param>
|
||||
* <param name="errorMessage">this action must be accessed through a prozy</param>
|
||||
* </result>
|
||||
* <!-- END SNIPPET: example --></pre>
|
||||
*
|
||||
*/
|
||||
public class HttpHeaderResult implements Result {
|
||||
|
||||
private static final long serialVersionUID = 195648957144219214L;
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpHeaderResult.class);
|
||||
|
||||
/** The default parameter */
|
||||
public static final String DEFAULT_PARAM = "status";
|
||||
|
||||
|
||||
private boolean parse = true;
|
||||
private Map<String, String> headers;
|
||||
private Map<String,String> headers;
|
||||
private int status = -1;
|
||||
private String error = null;
|
||||
private int error = -1;
|
||||
private String errorMessage;
|
||||
|
||||
|
||||
public HttpHeaderResult() {
|
||||
super();
|
||||
headers = new HashMap<String, String>();
|
||||
headers = new HashMap<String,String>();
|
||||
}
|
||||
|
||||
public HttpHeaderResult(int status) {
|
||||
@@ -99,19 +101,20 @@ public class HttpHeaderResult implements Result {
|
||||
this.parse = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the http servlet error code that should be set on the response
|
||||
*
|
||||
* Sets the http servlet error code that should be set on the reponse
|
||||
*
|
||||
* @param error the Http error code
|
||||
* @see javax.servlet.http.HttpServletResponse#sendError(int)
|
||||
*/
|
||||
public void setError(String error) {
|
||||
public void setError(int error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the error message that should be set on the reponse
|
||||
*
|
||||
*
|
||||
* @param errorMessage error message send to the client
|
||||
* @see javax.servlet.http.HttpServletResponse#sendError(int, String)
|
||||
*/
|
||||
@@ -131,7 +134,7 @@ public class HttpHeaderResult implements Result {
|
||||
/**
|
||||
* Sets whether or not the HTTP header values should be evaluated against the ValueStack (by default they are).
|
||||
*
|
||||
* @param parse <tt>true</tt> if HTTP header values should be evaluated against the ValueStack, <tt>false</tt>
|
||||
* @param parse <tt>true</tt> if HTTP header values should be evaluated agains the ValueStack, <tt>false</tt>
|
||||
* otherwise.
|
||||
*/
|
||||
public void setParse(boolean parse) {
|
||||
@@ -154,8 +157,7 @@ public class HttpHeaderResult implements Result {
|
||||
|
||||
/**
|
||||
* Adds an HTTP header to the response
|
||||
*
|
||||
* @param name header name
|
||||
* @param name header name
|
||||
* @param value header value
|
||||
*/
|
||||
public void addHeader(String name, String value) {
|
||||
@@ -172,35 +174,24 @@ public class HttpHeaderResult implements Result {
|
||||
public void execute(ActionInvocation invocation) throws Exception {
|
||||
HttpServletResponse response = ServletActionContext.getResponse();
|
||||
ValueStack stack = ActionContext.getContext().getValueStack();
|
||||
|
||||
|
||||
if (status != -1) {
|
||||
response.setStatus(status);
|
||||
} else if (error != -1) {
|
||||
if (errorMessage != null) {
|
||||
String finalMessage = parse ? TextParseUtil.translateVariables(
|
||||
errorMessage, stack) : errorMessage;
|
||||
response.sendError(error, finalMessage);
|
||||
} else
|
||||
response.sendError(error);
|
||||
}
|
||||
|
||||
if (headers != null) {
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
String value = entry.getValue();
|
||||
for (Map.Entry<String, String> stringStringEntry : headers.entrySet()) {
|
||||
Map.Entry entry = (Map.Entry) stringStringEntry;
|
||||
String value = (String) entry.getValue();
|
||||
String finalValue = parse ? TextParseUtil.translateVariables(value, stack) : value;
|
||||
response.addHeader(entry.getKey(), finalValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (status == -1 && error != null) {
|
||||
int errorCode = -1;
|
||||
try {
|
||||
errorCode = Integer.parseInt(parse ? TextParseUtil.translateVariables(error, stack) : error);
|
||||
} catch (Exception e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Cannot parse errorCode [#0] value as Integer!", e, error);
|
||||
}
|
||||
}
|
||||
if (errorCode != -1) {
|
||||
if (errorMessage != null) {
|
||||
String finalMessage = parse ? TextParseUtil.translateVariables(errorMessage, stack) : errorMessage;
|
||||
response.sendError(errorCode, finalMessage);
|
||||
} else {
|
||||
response.sendError(errorCode);
|
||||
}
|
||||
response.addHeader((String) entry.getKey(), finalValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -159,15 +159,15 @@ public class VelocityResult extends StrutsResultSupport {
|
||||
// to do it all the time (WW-829). Since Velocity support is being deprecated, we'll oblige :)
|
||||
writer.flush();
|
||||
} catch (Exception e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Unable to render Velocity Template, '#0'", e, finalLocation);
|
||||
}
|
||||
LOG.error("Unable to render Velocity Template, '" + finalLocation + "'", e);
|
||||
throw e;
|
||||
} finally {
|
||||
if (usedJspFactory) {
|
||||
jspFactory.releasePageContext(pageContext);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.config.entities.PackageConfig;
|
||||
import com.opensymphony.xwork2.inject.Container;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.struts2.RequestUtils;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
@@ -38,6 +37,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -163,13 +163,19 @@ import java.util.Set;
|
||||
public class DefaultActionMapper implements ActionMapper {
|
||||
|
||||
protected static final String METHOD_PREFIX = "method:";
|
||||
|
||||
protected static final String ACTION_PREFIX = "action:";
|
||||
|
||||
protected static final String REDIRECT_PREFIX = "redirect:";
|
||||
|
||||
protected static final String REDIRECT_ACTION_PREFIX = "redirectAction:";
|
||||
|
||||
protected boolean allowDynamicMethodCalls = true;
|
||||
|
||||
protected boolean allowSlashesInActionNames = false;
|
||||
|
||||
protected boolean alwaysSelectFullNamespace = false;
|
||||
|
||||
protected PrefixTrie prefixTrie = null;
|
||||
|
||||
protected List<String> extensions = new ArrayList<String>() {{
|
||||
@@ -286,15 +292,12 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
return parseActionName(mapping);
|
||||
}
|
||||
|
||||
public boolean isSlashesInActionNames() {
|
||||
return allowSlashesInActionNames;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getMapping(javax.servlet.http.HttpServletRequest)
|
||||
*/
|
||||
|
||||
public ActionMapping getMapping(HttpServletRequest request,
|
||||
ConfigurationManager configManager) {
|
||||
ActionMapping mapping = new ActionMapping();
|
||||
@@ -312,8 +315,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
|
||||
handleSpecialParameters(request, mapping);
|
||||
|
||||
// if Action name is empty it can be a request to static resource, return null to handle that case
|
||||
if (StringUtils.isEmpty(mapping.getName())) {
|
||||
if (mapping.getName() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -351,8 +353,9 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
// handle special parameter prefixes.
|
||||
Set<String> uniqueParameters = new HashSet<String>();
|
||||
Map parameterMap = request.getParameterMap();
|
||||
for (Object o : parameterMap.keySet()) {
|
||||
String key = (String) o;
|
||||
for (Iterator iterator = parameterMap.keySet().iterator(); iterator
|
||||
.hasNext();) {
|
||||
String key = (String) iterator.next();
|
||||
|
||||
// Strip off the image button location info, if found
|
||||
if (key.endsWith(".x") || key.endsWith(".y")) {
|
||||
@@ -361,7 +364,8 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
|
||||
// Ensure a parameter doesn't get processed twice
|
||||
if (!uniqueParameters.contains(key)) {
|
||||
ParameterAction parameterAction = (ParameterAction) prefixTrie.get(key);
|
||||
ParameterAction parameterAction = (ParameterAction) prefixTrie
|
||||
.get(key);
|
||||
if (parameterAction != null) {
|
||||
parameterAction.execute(key, mapping);
|
||||
uniqueParameters.add(key);
|
||||
@@ -437,7 +441,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
*
|
||||
* @param name The action name
|
||||
* @return The action name without its extension
|
||||
* @deprecated Since 2.1, use {@link #dropExtension(java.lang.String, org.apache.struts2.dispatcher.mapper.ActionMapping)} instead
|
||||
* @deprecated Since 2.1, use {@link #dropExtension(java.lang.String,org.apache.struts2.dispatcher.mapper.ActionMapping)} instead
|
||||
*/
|
||||
protected String dropExtension(String name) {
|
||||
return dropExtension(name, new ActionMapping());
|
||||
@@ -482,7 +486,7 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
if (extensions == null) {
|
||||
return null;
|
||||
} else {
|
||||
return extensions.get(0);
|
||||
return (String) extensions.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,64 +518,29 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
*
|
||||
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getUriFromActionMapping(org.apache.struts2.dispatcher.mapper.ActionMapping)
|
||||
*/
|
||||
|
||||
public String getUriFromActionMapping(ActionMapping mapping) {
|
||||
StringBuilder uri = new StringBuilder();
|
||||
|
||||
handleNamespace(mapping, uri);
|
||||
handleName(mapping, uri);
|
||||
handleDynamicMethod(mapping, uri);
|
||||
handleExtension(mapping, uri);
|
||||
handleParams(mapping, uri);
|
||||
|
||||
return uri.toString();
|
||||
}
|
||||
|
||||
protected void handleNamespace(ActionMapping mapping, StringBuilder uri) {
|
||||
if (mapping.getNamespace() != null) {
|
||||
uri.append(mapping.getNamespace());
|
||||
if (!"/".equals(mapping.getNamespace())) {
|
||||
uri.append("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleName(ActionMapping mapping, StringBuilder uri) {
|
||||
String name = mapping.getName();
|
||||
String params = "";
|
||||
if (name.indexOf('?') != -1) {
|
||||
params = name.substring(name.indexOf('?'));
|
||||
name = name.substring(0, name.indexOf('?'));
|
||||
}
|
||||
uri.append(name);
|
||||
}
|
||||
|
||||
protected void handleDynamicMethod(ActionMapping mapping, StringBuilder uri) {
|
||||
// See WW-3965
|
||||
if (StringUtils.isNotEmpty(mapping.getMethod())) {
|
||||
if (allowDynamicMethodCalls) {
|
||||
// handle "name!method" convention.
|
||||
String name = mapping.getName();
|
||||
if (!name.contains("!")) {
|
||||
// Append the method as no bang found
|
||||
uri.append("!").append(mapping.getMethod());
|
||||
}
|
||||
} else {
|
||||
uri.append("!").append(mapping.getMethod());
|
||||
}
|
||||
if (null != mapping.getMethod() && !"".equals(mapping.getMethod())) {
|
||||
uri.append("!").append(mapping.getMethod());
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleExtension(ActionMapping mapping, StringBuilder uri) {
|
||||
String extension = lookupExtension(mapping.getExtension());
|
||||
|
||||
if (extension != null) {
|
||||
if (extension.length() == 0 || (extension.length() > 0 && uri.indexOf('.' + extension) == -1)) {
|
||||
if (extension.length() > 0) {
|
||||
uri.append(".").append(extension);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected String lookupExtension(String extension) {
|
||||
String extension = mapping.getExtension();
|
||||
if (extension == null) {
|
||||
// Look for the current extension, if available
|
||||
ActionContext context = ActionContext.getContext();
|
||||
@@ -585,18 +554,24 @@ public class DefaultActionMapper implements ActionMapper {
|
||||
extension = getDefaultExtension();
|
||||
}
|
||||
}
|
||||
return extension;
|
||||
}
|
||||
|
||||
protected void handleParams(ActionMapping mapping, StringBuilder uri) {
|
||||
String name = mapping.getName();
|
||||
String params = "";
|
||||
if (name.indexOf('?') != -1) {
|
||||
params = name.substring(name.indexOf('?'));
|
||||
if (extension != null) {
|
||||
if (extension.length() == 0 || (extension.length() > 0 && uri.indexOf('.' + extension) == -1)) {
|
||||
if (extension.length() > 0) {
|
||||
uri.append(".").append(extension);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (params.length() > 0) {
|
||||
uri.append(params);
|
||||
}
|
||||
|
||||
return uri.toString();
|
||||
}
|
||||
|
||||
|
||||
public boolean isSlashesInActionNames() {
|
||||
return allowSlashesInActionNames;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,20 +21,77 @@
|
||||
|
||||
package org.apache.struts2.dispatcher.mapper;
|
||||
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Extended version of {@link RestfulActionMapper}, see documentation for more details
|
||||
* http://struts.apache.org/2.x/docs/restfulactionmapper.html
|
||||
* <!-- START SNIPPET: description -->
|
||||
*
|
||||
* Improved restful action mapper that adds several ReST-style improvements to
|
||||
* action mapping, but supports fully-customized URL's via XML. The two primary
|
||||
* ReST enhancements are:
|
||||
* <ul>
|
||||
* <li>If the method is not specified (via '!' or 'method:' prefix), the method is
|
||||
* "guessed" at using ReST-style conventions that examine the URL and the HTTP
|
||||
* method.</li>
|
||||
* <li>Parameters are extracted from the action name, if parameter name/value pairs
|
||||
* are specified using PARAM_NAME/PARAM_VALUE syntax.
|
||||
* </ul>
|
||||
* <p>
|
||||
* These two improvements allow a GET request for 'category/action/movie/Thrillers' to
|
||||
* be mapped to the action name 'movie' with an id of 'Thrillers' with an extra parameter
|
||||
* named 'category' with a value of 'action'. A single action mapping can then handle
|
||||
* all CRUD operations using wildcards, e.g.
|
||||
* </p>
|
||||
* <pre>
|
||||
* <action name="movie/*" className="app.MovieAction">
|
||||
* <param name="id">{0}</param>
|
||||
* ...
|
||||
* </action>
|
||||
* </pre>
|
||||
* <p>
|
||||
* This mapper supports the following parameters:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li><code>struts.mapper.idParameterName</code> - If set, this value will be the name
|
||||
* of the parameter under which the id is stored. The id will then be removed
|
||||
* from the action name. This allows restful actions to not require wildcards.
|
||||
* </li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* The following URL's will invoke its methods:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li><code>GET: /movie/ => method="index"</code></li>
|
||||
* <li><code>GET: /movie/Thrillers => method="view", id="Thrillers"</code></li>
|
||||
* <li><code>GET: /movie/Thrillers!edit => method="edit", id="Thrillers"</code></li>
|
||||
* <li><code>GET: /movie/new => method="editNew"</code></li>
|
||||
* <li><code>POST: /movie/ => method="create"</code></li>
|
||||
* <li><code>PUT: /movie/Thrillers => method="update", id="Thrillers"</code></li>
|
||||
* <li><code>DELETE: /movie/Thrillers => method="remove", id="Thrillers"</code></li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* To simulate the HTTP methods PUT and DELETE, since they aren't supported by HTML,
|
||||
* the HTTP parameter "__http_method" will be used.
|
||||
* </p>
|
||||
* <p>
|
||||
* The syntax and design for this feature was inspired by the ReST support in Ruby on Rails.
|
||||
* See <a href="http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it">
|
||||
* http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it
|
||||
* </a>
|
||||
* </p>
|
||||
*
|
||||
* <!-- END SNIPPET: description -->
|
||||
*/
|
||||
public class Restful2ActionMapper extends DefaultActionMapper {
|
||||
|
||||
@@ -45,6 +102,7 @@ public class Restful2ActionMapper extends DefaultActionMapper {
|
||||
public Restful2ActionMapper() {
|
||||
setSlashesInActionNames("true");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -21,21 +21,47 @@
|
||||
|
||||
package org.apache.struts2.dispatcher.mapper;
|
||||
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.RequestUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.struts2.RequestUtils;
|
||||
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
* Simple Restfull Action Mapper to support REST application
|
||||
* See docs for more information
|
||||
* http://struts.apache.org/2.x/docs/restfulactionmapper.html
|
||||
* <!-- START SNIPPET: description -->
|
||||
*
|
||||
* A custom action mapper using the following format:
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <ul><tt>http://HOST/ACTION_NAME/PARAM_NAME1/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2</tt></ul>
|
||||
* <p/>
|
||||
* You can have as many parameters you'd like to use. Alternatively the URL can be shortened to the following:
|
||||
* <p/>
|
||||
* <ul><tt>http://HOST/ACTION_NAME/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2</tt></ul>
|
||||
* <p/>
|
||||
* This is the same as:
|
||||
* <p/>
|
||||
* <ul><tt>http://HOST/ACTION_NAME/ACTION_NAME + "Id"/PARAM_VALUE1/PARAM_NAME2/PARAM_VALUE2</tt></ul>
|
||||
* <p/>
|
||||
* Suppose for example we would like to display some articles by id at using the following URL sheme:
|
||||
* <p/>
|
||||
* <ul><tt>http://HOST/article/Id</tt></ul>
|
||||
* <p/>
|
||||
* <p/>
|
||||
* Your action just needs a setArticleId() method, and requests such as /article/1, /article/2, etc will all map
|
||||
* to that URL pattern.
|
||||
*
|
||||
* <!-- END SNIPPET: description -->
|
||||
*
|
||||
*/
|
||||
public class RestfulActionMapper implements ActionMapper {
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(RestfulActionMapper.class);
|
||||
|
||||
@@ -133,7 +133,8 @@ public class PrepareOperations {
|
||||
// parameters might not be accessible through before encoding (ww-1278)
|
||||
request = dispatcher.wrapRequest(request, servletContext);
|
||||
} catch (IOException e) {
|
||||
throw new ServletException("Could not wrap servlet request with MultipartRequestWrapper!", e);
|
||||
String message = "Could not wrap servlet request with MultipartRequestWrapper!";
|
||||
throw new ServletException(message, e);
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -117,9 +117,7 @@ public class StrutsUtil {
|
||||
return responseWrapper.getData();
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Cannot include #0", e, aName.toString());
|
||||
}
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -128,9 +126,6 @@ public class StrutsUtil {
|
||||
try {
|
||||
return URLEncoder.encode(s, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Cannot encode URL [#0]", e, s);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
|
||||
package org.apache.struts2.util;
|
||||
|
||||
import com.opensymphony.xwork2.Action;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import com.opensymphony.xwork2.Action;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
* A bean that takes an iterator and outputs a subset of it.
|
||||
@@ -168,8 +168,7 @@ public class SubsetIteratorFilter extends IteratorFilterSupport implements Itera
|
||||
}
|
||||
catch(Exception e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Decider [#0] encountered an error while decide adding element [#1], element will be ignored, it will not appeared in subseted iterator",
|
||||
e, decider.toString(), element.toString());
|
||||
LOG.warn("decider ["+decider+"] encountered an error while decide adding element ["+element+"], element will be ignored, it will not appeared in subseted iterator", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
|
||||
package org.apache.struts2.util;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.util.LocalizedTextUtil;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* TokenHelper
|
||||
*
|
||||
@@ -90,10 +90,8 @@ public class TokenHelper {
|
||||
session.put(buildTokenSessionAttributeName(tokenName), token);
|
||||
} catch ( IllegalStateException e ) {
|
||||
// WW-1182 explain to user what the problem is
|
||||
String msg = "Error creating HttpSession due response is commited to client. You can use the CreateSessionInterceptor or create the HttpSession from your action before the result is rendered to the client: " + e.getMessage();
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error(msg, e);
|
||||
}
|
||||
String msg = "Error creating HttpSession due response is commited to client. You can use the CreateSessionInterceptor or create the HttpSession from your action before the result is rendered to the client: " + e.getMessage();
|
||||
LOG.error(msg, e);
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -44,9 +44,7 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
Class.forName(VFS_JBOSS5);
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Cannot load [#0] class, not a JBoss 5!", VFS_JBOSS7);
|
||||
}
|
||||
LOG.debug("Cannot load [#0] class, not a JBoss 5!", VFS_JBOSS7);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -56,24 +54,20 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
Class.forName(VFS_JBOSS7);
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Cannot load [#0] class, not a JBoss 7!", VFS_JBOSS7);
|
||||
}
|
||||
LOG.debug("Cannot load [#0] class, not a JBoss 7!", VFS_JBOSS7);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +77,7 @@ public class JBossFileManager extends DefaultFileManager {
|
||||
try {
|
||||
return getJBossPhysicalUrl(url);
|
||||
} catch (IOException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error(e.getMessage(), e);
|
||||
}
|
||||
LOG.error(e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
@@ -154,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()) {
|
||||
|
||||
@@ -253,9 +253,7 @@ public class FreemarkerManager {
|
||||
try {
|
||||
init(servletContext);
|
||||
} catch (TemplateException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Cannot load freemarker configuration: ",e);
|
||||
}
|
||||
LOG.error("Cannot load freemarker configuration: ",e);
|
||||
}
|
||||
// config = createConfiguration(servletContext);
|
||||
|
||||
@@ -411,9 +409,7 @@ public class FreemarkerManager {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Invalid template path specified: #0", e, e.getMessage());
|
||||
}
|
||||
LOG.error("Invalid template path specified: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
// presume that most apps will require the class and webapp template loader
|
||||
@@ -463,13 +459,9 @@ public class FreemarkerManager {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Error while loading freemarker settings from /freemarker.properties", e);
|
||||
}
|
||||
LOG.error("Error while loading freemarker settings from /freemarker.properties", e);
|
||||
} catch (TemplateException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Error while loading freemarker settings from /freemarker.properties", e);
|
||||
}
|
||||
LOG.error("Error while loading freemarker settings from /freemarker.properties", e);
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
|
||||
@@ -81,11 +81,11 @@ public abstract class TagModel implements TemplateTransformModel {
|
||||
// the value should ALWAYS be a decendant of TemplateModel
|
||||
if (value instanceof TemplateModel) {
|
||||
try {
|
||||
map.put(entry.getKey(), objectWrapper.unwrap((TemplateModel) value));
|
||||
map.put(entry.getKey(), objectWrapper
|
||||
.unwrap((TemplateModel) value));
|
||||
} catch (TemplateModelException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("failed to unwrap [#0] it will be ignored", e, value.toString());
|
||||
}
|
||||
LOG.error("failed to unwrap [" + value
|
||||
+ "] it will be ignored", e);
|
||||
}
|
||||
}
|
||||
// if it doesn't, we'll do it the old way by just returning the toString() representation
|
||||
@@ -123,9 +123,7 @@ public abstract class TagModel implements TemplateTransformModel {
|
||||
try {
|
||||
map.put(entry.getKey(), ((SimpleSequence) value).toList());
|
||||
} catch (TemplateModelException e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("There was a problem converting a SimpleSequence to a list", e);
|
||||
}
|
||||
LOG.error("There was a problem converting a SimpleSequence to a list", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,14 +21,15 @@
|
||||
|
||||
package org.apache.struts2.views.jsp;
|
||||
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import org.apache.struts2.components.Component;
|
||||
import org.apache.struts2.components.IteratorComponent;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.jsp.JspException;
|
||||
|
||||
import org.apache.struts2.components.Component;
|
||||
import org.apache.struts2.components.IteratorComponent;
|
||||
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
|
||||
/**
|
||||
* @see IteratorComponent
|
||||
*/
|
||||
@@ -92,7 +93,7 @@ public class IteratorTag extends ContextBeanTag {
|
||||
try {
|
||||
bodyContent.writeOut(bodyContent.getEnclosingWriter());
|
||||
} catch (Exception e) {
|
||||
throw new JspException(e);
|
||||
throw new JspException(e.getMessage());
|
||||
}
|
||||
}
|
||||
return SKIP_BODY;
|
||||
|
||||
@@ -46,7 +46,6 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
protected String labelSeparator;
|
||||
protected String labelPosition;
|
||||
protected String requiredposition;
|
||||
protected String errorPosition;
|
||||
protected String name;
|
||||
protected String required;
|
||||
protected String tabindex;
|
||||
@@ -97,10 +96,9 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
uiBean.setLabel(label);
|
||||
uiBean.setLabelSeparator(labelSeparator);
|
||||
uiBean.setLabelposition(labelPosition);
|
||||
uiBean.setRequiredPosition(requiredposition);
|
||||
uiBean.setErrorPosition(errorPosition);
|
||||
uiBean.setRequiredposition(requiredposition);
|
||||
uiBean.setName(name);
|
||||
uiBean.setRequiredLabel(required);
|
||||
uiBean.setRequired(required);
|
||||
uiBean.setTabindex(tabindex);
|
||||
uiBean.setValue(value);
|
||||
uiBean.setTemplate(template);
|
||||
@@ -173,10 +171,6 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
this.requiredposition = requiredPosition;
|
||||
}
|
||||
|
||||
public void setErrorPosition(String errorPosition) {
|
||||
this.errorPosition = errorPosition;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -183,9 +183,8 @@ public class DefaultUrlHelper implements UrlHelper {
|
||||
try {
|
||||
result = encodeResult ? response.encodeURL(result) : result;
|
||||
} catch (Exception ex) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Could not encode the URL for some reason, use it unchanged", ex);
|
||||
}
|
||||
// Could not encode the URL for some reason
|
||||
// Use it unchanged
|
||||
result = link.toString();
|
||||
}
|
||||
|
||||
@@ -260,7 +259,7 @@ public class DefaultUrlHelper implements UrlHelper {
|
||||
return URLEncoder.encode(translatedInput, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Could not encode URL parameter '#0', returning value un-encoded", input);
|
||||
LOG.warn("Could not encode URL parameter '" + input + "', returning value un-encoded");
|
||||
}
|
||||
return translatedInput;
|
||||
}
|
||||
@@ -272,7 +271,7 @@ public class DefaultUrlHelper implements UrlHelper {
|
||||
return URLDecoder.decode(translatedInput, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn("Could not encode URL parameter '#0', returning value un-encoded", input);
|
||||
LOG.warn("Could not encode URL parameter '" + input + "', returning value un-encoded");
|
||||
}
|
||||
return translatedInput;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class StrutsResourceLoader extends ClasspathResourceLoader {
|
||||
try {
|
||||
return ClassLoaderUtil.getResourceAsStream(name, StrutsResourceLoader.class);
|
||||
} catch (Exception e) {
|
||||
throw new ResourceNotFoundException(e);
|
||||
throw new ResourceNotFoundException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,9 +156,7 @@ public class VelocityManager {
|
||||
ctx = ServletActionContext.getServletContext();
|
||||
} catch (NullPointerException npe) {
|
||||
// in case this was used outside the lifecycle of struts servlet
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("internal toolbox context ignored");
|
||||
}
|
||||
LOG.debug("internal toolbox context ignored");
|
||||
}
|
||||
|
||||
if (toolboxManager != null && ctx != null) {
|
||||
@@ -456,7 +454,8 @@ public class VelocityManager {
|
||||
try {
|
||||
velocityEngine.init(p);
|
||||
} catch (Exception e) {
|
||||
throw new StrutsException("Unable to instantiate VelocityEngine!", e);
|
||||
String gripe = "Unable to instantiate VelocityEngine!";
|
||||
throw new StrutsException(gripe, e);
|
||||
}
|
||||
|
||||
return velocityEngine;
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
|
||||
package org.apache.struts2.views.xslt;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts2.StrutsException;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -29,10 +33,6 @@ import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.Text;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* AdapterFactory produces Node adapters for Java object types.
|
||||
* Adapter classes are generally instantiated dynamically via a no-args constructor
|
||||
@@ -215,9 +215,11 @@ public class AdapterFactory {
|
||||
return adapterNode;
|
||||
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new StrutsException("Cannot adapt " + propertyValue + " (" + propertyName + ") :" + e.getMessage(), e);
|
||||
e.printStackTrace();
|
||||
throw new StrutsException("Cannot adapt " + propertyValue + " (" + propertyName + ") :" + e.getMessage());
|
||||
} catch (InstantiationException e) {
|
||||
throw new StrutsException("Cannot adapt " + propertyValue + " (" + propertyName + ") :" + e.getMessage(), e);
|
||||
e.printStackTrace();
|
||||
throw new StrutsException("Cannot adapt " + propertyValue + " (" + propertyName + ") :" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,12 +21,6 @@
|
||||
|
||||
package org.apache.struts2.views.xslt;
|
||||
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.StrutsException;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
@@ -37,6 +31,13 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts2.StrutsException;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
* This class is the most general type of adapter, utilizing reflective introspection to present a DOM view of all of
|
||||
@@ -122,9 +123,7 @@ public class BeanAdapter extends AbstractAdapterElement {
|
||||
} catch (Exception e) {
|
||||
if (e instanceof InvocationTargetException)
|
||||
e = (Exception) ((InvocationTargetException) e).getTargetException();
|
||||
if (log.isErrorEnabled()) {
|
||||
log.error("Cannot access bean property: #0", e, propertyName);
|
||||
}
|
||||
log.error("Cannot access bean property: "+propertyName, e);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,17 +21,12 @@
|
||||
|
||||
package org.apache.struts2.views.xslt;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.Result;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.struts2.StrutsException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Writer;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.transform.ErrorListener;
|
||||
@@ -45,11 +40,19 @@ import javax.xml.transform.URIResolver;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsConstants;
|
||||
import org.apache.struts2.StrutsException;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.Result;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.logging.Logger;
|
||||
import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
@@ -395,9 +398,7 @@ public class XSLTResult implements Result {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
if (LOG.isErrorEnabled()) {
|
||||
LOG.error("Unable to render XSLT Template, '#0'", e, location);
|
||||
}
|
||||
LOG.error("Unable to render XSLT Template, '" + location + "'", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"/>
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="struts" class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default"/>
|
||||
<bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="jakarta" class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default" />
|
||||
<constant name="struts.multipart.parser" value="jakarta" />
|
||||
<constant name="struts.multipart.handler" value="jakarta" />
|
||||
|
||||
<bean type="org.apache.struts2.views.TagLibrary" name="s" class="org.apache.struts2.views.DefaultTagLibrary" />
|
||||
|
||||
@@ -65,12 +65,6 @@
|
||||
<bean type="org.apache.struts2.components.template.TemplateEngine" name="jsp" class="org.apache.struts2.components.template.JspTemplateEngine" />
|
||||
|
||||
<bean type="com.opensymphony.xwork2.conversion.impl.XWorkConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.XWorkConverter" />
|
||||
<bean type="com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor" />
|
||||
<bean type="com.opensymphony.xwork2.conversion.ConversionFileProcessor" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor" />
|
||||
<bean type="com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor" />
|
||||
<bean type="com.opensymphony.xwork2.conversion.TypeConverterCreator" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterCreator" />
|
||||
<bean type="com.opensymphony.xwork2.conversion.TypeConverterHolder" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterHolder" />
|
||||
|
||||
<bean class="com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter" />
|
||||
|
||||
<bean type="com.opensymphony.xwork2.conversion.impl.CollectionConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.CollectionConverter" scope="singleton"/>
|
||||
|
||||
@@ -27,20 +27,4 @@ ${parameters.after?if_exists}<#t/>
|
||||
<#else>
|
||||
</span> <#rt/>
|
||||
</#if>
|
||||
<#if parameters.errorposition?default("top") == 'bottom'>
|
||||
<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
|
||||
<#if hasFieldErrors>
|
||||
<div <#rt/><#if parameters.id??>id="wwerr_${parameters.id}"<#rt/></#if> class="wwerr">
|
||||
<#list fieldErrors[parameters.name] as error>
|
||||
<div<#rt/>
|
||||
<#if parameters.id??>
|
||||
errorFor="${parameters.id}"<#rt/>
|
||||
</#if>
|
||||
class="errorMessage">
|
||||
${error?html}
|
||||
</div><#t/>
|
||||
</#list>
|
||||
</div><#t/>
|
||||
</#if>
|
||||
</#if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
|
||||
<div <#rt/><#if parameters.id??>id="wwgrp_${parameters.id}"<#rt/></#if> class="wwgrp">
|
||||
|
||||
<#if parameters.errorposition?default("top") == 'top'>
|
||||
<#if hasFieldErrors>
|
||||
<div <#rt/><#if parameters.id??>id="wwerr_${parameters.id}"<#rt/></#if> class="wwerr">
|
||||
<#list fieldErrors[parameters.name] as error>
|
||||
@@ -41,7 +40,6 @@
|
||||
</#list>
|
||||
</div><#t/>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#if parameters.label??>
|
||||
<#if parameters.labelposition?default("top") == 'top'>
|
||||
|
||||
@@ -23,16 +23,3 @@
|
||||
${parameters.after?if_exists}<#t/>
|
||||
</td><#lt/>
|
||||
</tr>
|
||||
<#if parameters.errorposition?default("top") == 'bottom'>
|
||||
<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
|
||||
<#if hasFieldErrors>
|
||||
<#list fieldErrors[parameters.name] as error>
|
||||
<tr errorFor="${parameters.id}">
|
||||
<td align="center" valign="top" colspan="2"><#rt/>
|
||||
<span class="errorMessage">${error?html}</span><#t/>
|
||||
</td><#lt/>
|
||||
</tr>
|
||||
</#list>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
|
||||
@@ -25,17 +25,19 @@
|
||||
This will be done if ActionSupport is used.
|
||||
-->
|
||||
<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
|
||||
<#if parameters.errorposition?default("top") == 'top'>
|
||||
<#if hasFieldErrors>
|
||||
<#list fieldErrors[parameters.name] as error>
|
||||
<tr errorFor="${parameters.id}">
|
||||
<#if parameters.labelposition?default("") == 'top'>
|
||||
<td align="left" valign="top" colspan="2"><#rt/>
|
||||
<#else>
|
||||
<td align="center" valign="top" colspan="2"><#rt/>
|
||||
</#if>
|
||||
<span class="errorMessage">${error?html}</span><#t/>
|
||||
</td><#lt/>
|
||||
</tr>
|
||||
</#list>
|
||||
</#if>
|
||||
</#if>
|
||||
<#--
|
||||
if the label position is top,
|
||||
then give the label it's own row in the table
|
||||
|
||||
@@ -85,7 +85,7 @@ END SNIPPET: supported-validators
|
||||
<#if validator.shortCircuit>continueValidation = false;</#if>
|
||||
}
|
||||
<#elseif validator.validatorType = "email">
|
||||
if (continueValidation && field.value != null && field.value.length > 0 && field.value.match("${validator.expression?js_string}")==null) {
|
||||
if (continueValidation && field.value != null && field.value.length > 0 && field.value.match(/\b^['_a-z0-9-\+]+(\.['_a-z0-9-\+]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\b/gi)==null) {
|
||||
addError(field, error);
|
||||
errors = true;
|
||||
<#if validator.shortCircuit>continueValidation = false;</#if>
|
||||
@@ -99,9 +99,9 @@ END SNIPPET: supported-validators
|
||||
<#elseif validator.validatorType = "int">
|
||||
if (continueValidation && field.value != null) {
|
||||
if (<#if validator.min??>parseInt(field.value) <
|
||||
${validator.min?c}<#else>false</#if> ||
|
||||
${validator.min}<#else>false</#if> ||
|
||||
<#if validator.max??>parseInt(field.value) >
|
||||
${validator.max?c}<#else>false</#if>) {
|
||||
${validator.max}<#else>false</#if>) {
|
||||
addError(field, error);
|
||||
errors = true;
|
||||
<#if validator.shortCircuit>continueValidation = false;</#if>
|
||||
@@ -110,10 +110,10 @@ END SNIPPET: supported-validators
|
||||
<#elseif validator.validatorType = "double">
|
||||
if (continueValidation && field.value != null) {
|
||||
var value = parseFloat(field.value);
|
||||
if (<#if validator.minInclusive??>value < ${validator.minInclusive?c}<#else>false</#if> ||
|
||||
<#if validator.maxInclusive??>value > ${validator.maxInclusive?c}<#else>false</#if> ||
|
||||
<#if validator.minExclusive??>value <= ${validator.minExclusive?c}<#else>false</#if> ||
|
||||
<#if validator.maxExclusive??>value >= ${validator.maxExclusive?c}<#else>false</#if>) {
|
||||
if (<#if validator.minInclusive??>value < ${validator.minInclusive}<#else>false</#if> ||
|
||||
<#if validator.maxInclusive??>value > ${validator.maxInclusive}<#else>false</#if> ||
|
||||
<#if validator.minExclusive??>value <= ${validator.minExclusive}<#else>false</#if> ||
|
||||
<#if validator.maxExclusive??>value >= ${validator.maxExclusive}<#else>false</#if>) {
|
||||
addError(field, error);
|
||||
errors = true;
|
||||
<#if validator.shortCircuit>continueValidation = false;</#if>
|
||||
|
||||
@@ -105,14 +105,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Boolean</td>
|
||||
<td align="left" valign="top">Whether to encode parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">escapeAmp</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -362,7 +354,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Specifies if this should be a portlet render or action URL. Default is "render". To create an action URL, use "action".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -370,7 +362,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">escape</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">escape</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -113,14 +113,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request fails)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorText</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -402,7 +394,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Parse returned HTML for Dojo widgets</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -410,7 +402,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -153,14 +153,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request fails)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">forceValidOption</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -498,7 +490,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Whether the input is readonly</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -506,7 +498,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -121,14 +121,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Date</td>
|
||||
<td align="left" valign="top">Last available date in the calendar set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">formatLength</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -322,7 +314,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -330,7 +322,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -129,14 +129,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request fails)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorText</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -434,7 +426,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Content will be loaded when div becomes visible, used only inside the tabbedpanel tag</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -442,7 +434,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -121,14 +121,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request fails)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorText</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -418,7 +410,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Parse returned HTML for Dojo widgets</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -426,7 +418,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -121,14 +121,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Boolean</td>
|
||||
<td align="left" valign="top">If doLayout is false, the tab container's height equals the height of the currently selected tab</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top"><strong>true</strong></td>
|
||||
@@ -306,7 +298,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set template to use for opening the rendered html.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -314,7 +306,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -89,14 +89,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Whether the textarea is readonly</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -282,7 +274,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -113,14 +113,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Comma delimmited list of topics that will published after the request(if the request fails).Only valid if 'href' is set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">expandIconSrcMinus</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -410,7 +402,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set template to use for opening the rendered html.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -418,7 +410,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set template to use for opening the rendered html.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">fieldValue</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -306,7 +298,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -314,7 +306,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -89,14 +89,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Decide if an empty option is to be inserted. Default false.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">headerKey</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -330,7 +322,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Whether the input is readonly</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -338,7 +330,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -258,7 +250,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -258,7 +250,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">id</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -266,7 +258,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set template to use for opening the rendered html.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -345,14 +345,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Boolean</td>
|
||||
<td align="left" valign="top">Decides of an empty option is to be inserted in the second list</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">formName</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -602,7 +594,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -610,7 +602,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
@@ -81,14 +81,6 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">errorPosition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<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">Define error position of form element (top|bottom)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">escape</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -274,7 +266,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredLabel</td>
|
||||
<td align="left" valign="top">required</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
@@ -282,7 +274,7 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top">requiredPosition</td>
|
||||
<td align="left" valign="top">requiredposition</td>
|
||||
<td align="left" valign="top">false</td>
|
||||
<td align="left" valign="top"></td>
|
||||
<td align="left" valign="top">false</td>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user