Compare commits

..

1 Commits

Author SHA1 Message Date
Ted Nathan Husted 591347a498 Tag r491439 as Struts 2.0.2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_2@491440 13f79535-47bb-0310-9956-ffa450edef68
2006-12-31 16:12:20 +00:00
404 changed files with 44112 additions and 31721 deletions
+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-all</artifactId>
<packaging>jar</packaging>
<name>Combined Struts 2 Jar</name>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dependency-maven-plugin</artifactId>
<executions>
<execution>
<id>unjar-deps</id>
<phase>compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-api</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-config-browser-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-jasperreports-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-jfreechart-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-jsf-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-pell-multipart-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-plexus-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-sitegraph-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-sitemesh-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-struts1-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>
struts2-tiles-plugin
</artifactId>
<version>${version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-api</artifactId>
-174
View File
@@ -1,174 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
-5
View File
@@ -1,5 +0,0 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
-174
View File
@@ -1,174 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
-5
View File
@@ -1,5 +0,0 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
@@ -1,174 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -1,5 +0,0 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+32 -32
View File
@@ -15,12 +15,12 @@
<p>
<i>
This article is meant to introduce a new user to Apache Struts 2 by
This article is meant to introduce a new user to Apache Struts 2 by
"walking through" a simple, but functional, application.
The article includes code snippets, but for the best result, you might
want to install the MailReader application on your own development
The article includes code snippets, but for the best result, you might
want to install the MailReader application on your own development
workstation and follow along.
Of course, the full source code to the MailReader is included in the
Of course, the full source code to the MailReader is included in the
distribution.
</i>
</p>
@@ -28,7 +28,7 @@
<p>
<i>
The tour assumes the reader has a basic understanding of the Java
language, JavaBeans, web applications, and JavaServer Pages. For
language, JavaBeans, web applications, and JavaServer Pages. For
background on these technologies, see the
<a href="http://struts.apache.org/primer.html">
Key Technologies Primer</a>.
@@ -215,7 +215,7 @@
<hr/>
<p>
You might note that the web.xml configuration does not specify which file extension
You might note taht the web.xml configuration does not specify which file extension
to use with actions.
The default extension for Struts 2 is ".action",
but the extension can be changed in the struts.properties file.
@@ -255,10 +255,10 @@
<p>
The actions are listed in one or more XML configuration files,
the default configuration file being named "struts.xml".
When the application loads, the struts.xml, and any other files
it includes, are parsed, and the framework creates a set of
configuration objects.
Among other things, the configuration maps a request for a certain
When the application loads, the struts.xml, and any other files
it includes, are parsed, and the framework creates a set of
configuration objects.
Among other things, the configuration maps a request for a certain
page to a certain action mapping.
</p>
@@ -301,7 +301,7 @@
<p>
When the client requests "Welcome.do", the request is passed to the "struts2"
FilterDispatcher (that we registered in the web.xml file).
The FilterDispatcher retrieves the appropriate action mapping from the
The FilterDispatcher retrieves the appropriate action mapping from the
configuration.
If we just wanted to forward to the Welcome page, we could use a simple
configuration element.
@@ -367,8 +367,8 @@
<blockquote>
<p>
The Struts configuration lets us separate concerns and "say it once".
The configuration helps us "normalize" an application,
in much the same way we normalize a database schema.
The configuration helps us "normalize" an application,
in much the same way we normalize a database schema.
</p>
</blockquote>
<hr/>
@@ -429,7 +429,7 @@ public class Welcome extends MailreaderSupport {
<hr/>
<p>
Several common result names are predefined,
Several common result names are predefined,
including ERROR, SUCCESS, LOGIN, NONE, and INPUT,
so that these tokens can be used consistently across Struts 2 applications.
</p>
@@ -541,7 +541,7 @@ public class Welcome extends MailreaderSupport {
<hr/>
<p>
If you change a message in the resource, and then rebuild and reload the
If you change a message in the resource, and then rebuild and reload the
application, the change will appear throughout the application.
If you provide message resources for additional locales, you can
localize your application.
@@ -944,12 +944,12 @@ public class Welcome extends MailreaderSupport {
<hr/>
<p>
You may note that the DTD refers to "XWork".
You may note that the DTD refers to "XWork".
<a href="http://www.opensymphony.com/xwork/">
Open Symphony XWork
</a> is a generic command-pattern framework that can be used outside of a
web environment. Essentially, Struts 2 is a web-based extension of the
XWork framework.
</a> is a generic command-pattern framework that can be used outside of a
web environment. In practice, Struts 2 is a web-based extension of the
XWork framework.
</p>
<p>
@@ -959,7 +959,7 @@ public class Welcome extends MailreaderSupport {
If the username is blank or absent, validation will fail and an error
message is generated.
The messages would be based on the "error.username.required" or
"error.password.required" message templates from the resource bundle.
"error.password.required" message templates, from the resource bundle.
</p>
<!--
@@ -1014,7 +1014,7 @@ public String <strong>execute()</strong> throws ExpiredPasswordException {
<p>
Let's look at the relevant properties and methods from MailreaderSupport
and another base class, <strong>ActionSupport</strong>, namely
and another base class, <strong>ActionSupport</strong>, namely
"getUsername", "getPassword", "findUser", "setUser", and "hasErrors".
</p>
@@ -1101,7 +1101,7 @@ public void setPassword(String password) {
When "findUser" returns,
the Login Action looks to see if a valid (non-null) User object is returned.
A valid User is passed to the <strong>User property</strong>.
Although it is still a JavaBean property,
Although it is still a JavaBean property,
the User property is not implemented in quite the same way as Username and Password.
</p>
@@ -1310,7 +1310,7 @@ public void <strong>setSession(Map value)</strong> {
<p>
Within the Login action element, the first result element is named "input".
If validation or authentification fail,
the Action class will return "input" and the framework will transfer control to the
the Action class will return "input" and the framework will transfer control to the
"Login.jsp" page.
</p>
@@ -1473,7 +1473,7 @@ public class <strong>AuthenticationInterceptor</strong> implements Interceptor {
<hr/>
<p>
The <strong>user</strong> stacks require that the client be authenticated.
The <strong>user</strong> stacks require that the client be authenticated.
In other words, that a User object is present in the session.
The actions using a <strong>guest</strong> stack can be accessed by any client.
The <strong>-submit</strong> versions of each can be used with actions
@@ -1483,7 +1483,7 @@ public class <strong>AuthenticationInterceptor</strong> implements Interceptor {
<h5>Double Submits</h5>
<p>
A common problem with designing web applications is that users are impatient
A common problem with designing web applications is that users are impatient
and response times can vary.
Sometimes, people will press a submit button a second time.
When this happens, the browser submits the request again,
@@ -1518,11 +1518,11 @@ public class <strong>AuthenticationInterceptor</strong> implements Interceptor {
<p>
Because the default interceptor stack will now authenticate the client,
we need to specify the standard "defaultStack" for the three
we need to specify the standard "defaultStack" for the three
"guest actions", Welcome, Login, and Register.
Requiring authentification by default is the better practice, since it
means that we won't forget to enable it when creating new actions.
Meanwhile, those pesky users will ensure that we don't forget to disable
Requiring authentification by default is the better practice, since it
means that we won't forget to enable it when creating new actions.
Meanwhile, those pesky users will ensure that we don't forget to disable
authentification for "guest" services.
</p>
@@ -1654,7 +1654,7 @@ public class <strong>AuthenticationInterceptor</strong> implements Interceptor {
The "test" tag is a convenient way to express presentation
logic within your pages.
Customized pages help to prevent user error,
and dynamic customization reduces the number of server pages your
and dynamic customization reduces the number of server pages your
application needs to maintain, among other benefits.
</font></p>
</blockquote>
@@ -1892,7 +1892,7 @@ public class <strong>AuthenticationInterceptor</strong> implements Interceptor {
the value for the field is pushed onto the value stack.
As a result, if the client enters text into an Integer field,
the framework can still redisplay whatever was entered.
An invalid input value is not stored in the field (even if it could be).
An invalid input value is not stored in the field (even if it could be).
The invalid input is pushed onto the stack for the scope of the request.
</p>
@@ -2076,7 +2076,7 @@ public Subscription findSubscription(String host) {
<p>
By keeping routine safety precautions out of the Action class,
the all-important Action becomes smaller and easier to maintain.
the all-important Actions becomes smaller and easier to maintain.
</p>
<p>
+1 -1
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
+5 -24
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -25,33 +25,14 @@
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<!--
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>velocity-tools</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
-->
<dependency>
<groupId>javax.servlet</groupId>
-174
View File
@@ -1,174 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -1,5 +0,0 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -0,0 +1,2 @@
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog
@@ -11,7 +11,7 @@
<s:textfield name="tt2" label="Test Text2" />
</s:form>
</s:div>
<s:div href="<s:url action="ajaxData"/>" id="ryh1" theme="ajax" label="remote one" />
<s:div href="/view/ajaxData.action" id="ryh1" theme="ajax" label="remote one" />
<s:div id="middle" label="middle" theme="ajax">
middle tab<br/>
<s:form >
@@ -19,7 +19,7 @@
<s:textfield name="tt2" label="Test Text442" />
</s:form>
</s:div>
<s:div href="<s:url action="ajaxData"/>" id="ryh21" theme="ajax" label="remote right" />
<s:div href="/view/ajaxData.action" id="ryh21" theme="ajax" label="remote right" />
</s:tabbedPanel>
<p/>
@@ -28,7 +28,7 @@ A DIV that waits for 5 seconds before loading the contents
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="<s:url action="ajaxData"/>"
href="/view/ajaxData.action"
delay="5000"
loadingText="loading...">
Waiting for data</s:div>
@@ -37,10 +37,10 @@ A DIV that is updated every 2 seconds
<s:div
id="twoseconds"
cssStyle="border: 1px solid yellow;"
href="<s:url action="ajaxData"/>"
href="/view/ajaxData.action"
theme="ajax"
delay="2000"
updateFreq="2000"
updateInterval="2000"
errorText="There was an error"
loadingText="loading...">Initial Content
</s:div>
@@ -1,4 +1 @@
Hello World from velocity!
<p />
#surl ("id=url" "action=index")
<a href="${url}">Back to the front page</a>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
@@ -0,0 +1 @@
struts.date.format=yyyy/MM/dd hh:mm:ss
@@ -23,7 +23,6 @@ package org.apache.struts2.showcase;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.ArrayList;
import com.opensymphony.xwork2.ActionSupport;
@@ -43,11 +42,6 @@ public class LotsOfOptiontransferselectAction extends ActionSupport {
private List _favouriteCountriesKeys;
private List _notFavouriteCountriesKeys;
private List _favouriteSportsKeys;
private List _nonFavouriteSportsKeys;
private List _favouriteCities;
private List _prioritisedFavouriteCartoonCharacters;
private List _prioritisedFavouriteCars;
private List _prioritisedFavouriteCountries;
@@ -194,37 +188,6 @@ public class LotsOfOptiontransferselectAction extends ActionSupport {
_notFavouriteCountriesKeys = notFavouriteCountries;
}
// Sports
public Map getDefaultNonFavoriteSports() {
Map m = new LinkedHashMap();
m.put("basketball", "Basketball");
m.put("football", "Football");
m.put("baseball", "Baseball");
return m;
}
public Map getDefaultFavoriteSports() {
return new LinkedHashMap();
}
public List getFavouriteSports() {
return _favouriteSportsKeys;
}
public void setFavouriteSports(List favouriteSportsKeys) {
this._favouriteSportsKeys = favouriteSportsKeys;
}
public List getNonFavouriteSports() {
return _nonFavouriteSportsKeys;
}
public void setNonFavouriteSports(List notFavouriteSportsKeys) {
this._nonFavouriteSportsKeys = notFavouriteSportsKeys;
}
public List getPrioritisedFavouriteCartoonCharacters() {
return _prioritisedFavouriteCartoonCharacters;
@@ -250,29 +213,6 @@ public class LotsOfOptiontransferselectAction extends ActionSupport {
public Map getAvailableCities() {
Map map = new LinkedHashMap();
map.put("boston", "Boston");
map.put("new york", "New York");
map.put("london", "London");
map.put("rome", "Rome");
return map;
}
public List getDefaultFavouriteCities() {
List list = new ArrayList();
list.add("boston");
list.add("rome");
return list;
}
public List getFavouriteCities() {
return _favouriteCities;
}
public void setFavouriteCities(List favouriteCities) {
this._favouriteCities = favouriteCities;
}
// actions
@@ -0,0 +1,30 @@
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="description1">
<field-validator type="requiredstring">
<message>Description1 Is Required !!!</message>
</field-validator>
</field>
<field name="description2">
<field-validator type="requiredstring">
<message>Description2 Is Required !!!</message>
</field-validator>
</field>
<field name="description3">
<field-validator type="requiredstring">
<message>Description3 Is Required !!!</message>
</field-validator>
</field>
<field name="description4">
<field-validator type="requiredstring">
<message>Description4 Is Required !!!</message>
</field-validator>
</field>
</validators>
@@ -1,135 +0,0 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.showcase;
import com.opensymphony.xwork2.ActionSupport;
import java.util.List;
import java.util.Map;
import java.util.LinkedHashMap;
import java.util.ArrayList;
/**
*/
public class MoreSelectsAction extends ActionSupport {
private List _prioritisedFavouriteCartoonCharacters;
private List _prioritisedFavouriteCars;
private List _prioritisedFavouriteCountries;
private List favouriteNumbers;
// Cartoon Characters
public Map getDefaultFavouriteCartoonCharacters() {
Map m = new LinkedHashMap();
m.put("heMan", "He-Man");
m.put("popeye", "Popeye");
m.put("mockeyMouse", "Mickey Mouse");
return m;
}
// Cars
public Map getDefaultFavouriteCars() {
Map m = new LinkedHashMap();
m.put("alfaRomeo", "Alfa Romeo");
m.put("Toyota", "Toyota");
m.put("Mitsubitshi", "Mitsubitshi");
return m;
}
// Countries
public Map getDefaultFavouriteCountries() {
Map m = new LinkedHashMap();
m.put("england", "England");
m.put("america", "America");
m.put("brazil", "Brazil");
return m;
}
public List getDefaultFavouriteNumbers() {
List list = new ArrayList();
list.add("Three");
list.add("Seven");
return list;
}
public List getPrioritisedFavouriteCartoonCharacters() {
return _prioritisedFavouriteCartoonCharacters;
}
public void setPrioritisedFavouriteCartoonCharacters(List prioritisedFavouriteCartoonCharacters) {
_prioritisedFavouriteCartoonCharacters = prioritisedFavouriteCartoonCharacters;
}
public List getPrioritisedFavouriteCars() {
return _prioritisedFavouriteCars;
}
public void setPrioritisedFavouriteCars(List prioritisedFavouriteCars) {
_prioritisedFavouriteCars = prioritisedFavouriteCars;
}
public List getPrioritisedFavouriteCountries() {
return _prioritisedFavouriteCountries;
}
public void setPrioritisedFavouriteCountries(List prioritisedFavouriteCountries) {
_prioritisedFavouriteCountries = prioritisedFavouriteCountries;
}
public List getFavouriteNumbers() {
return favouriteNumbers;
}
public void setFavouriteNumbers(List favouriteNumbers) {
this.favouriteNumbers = favouriteNumbers;
}
public Map getAvailableCities() {
Map map = new LinkedHashMap();
map.put("boston", "Boston");
map.put("new york", "New York");
map.put("london", "London");
map.put("rome", "Rome");
return map;
}
public List getDefaultFavouriteCities() {
List list = new ArrayList();
list.add("boston");
list.add("rome");
return list;
}
// actions
public String input() throws Exception {
return SUCCESS;
}
public String submit() throws Exception {
return SUCCESS;
}
}
@@ -0,0 +1 @@
Element_friends = java.lang.String
@@ -0,0 +1 @@
Element_selectedSkills=java.lang.String
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<!-- Field-Validator Syntax -->
<field name="currentEmployee.empId">
<field-validator type="required">
<message key="employee.id.required"/>
</field-validator>
</field>
<field name="currentEmployee.lastName">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message key="employee.lastName.required"/>
</field-validator>
</field>
<field name="currentEmployee.birthDate">
<field-validator type="required">
<message key="employee.birthDate.required"/>
</field-validator>
</field>
</validators>
@@ -0,0 +1,9 @@
employee=Employee
employee.firstName=First Name
employee.lastName=Last Name
employee.description=Description
employee.id.required=Id is required
employee.lastName.required=Last Name is required
employee.birthDate.required=Birthdate is required
employee.backtolist=Back to Employee List
@@ -0,0 +1,9 @@
employee=Mitarbeiter
employee.firstName=Vorname
employee.lastName=Nachname
employee.description=Beschreibung
employee.id.required=ID muß angegeben werden
employee.lastName.required=Nachname wird benötigt
employee.birthDate.required=Geburtsdatum wird benötigt
employee.backtolist=Zurück zur Mitarbeiterliste
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<!-- Field-Validator Syntax -->
<field name="currentSkill.name">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message key="skill.name.required"/>
</field-validator>
</field>
</validators>
@@ -0,0 +1,6 @@
skill=Skill
skill.name=Name
skill.description=Description
skill.name.required=Name is required
skill.backtolist=Back to Skill List
@@ -0,0 +1,6 @@
skill=Kenntnis
skill.name=Name
skill.description=Beschreibung
skill.name.required=Name muss angegeben werden
skill.backtolist=Zurück zur Kenntnis Liste
@@ -0,0 +1 @@
Element_persons=org.apache.struts2.showcase.conversion.Person
@@ -27,20 +27,15 @@ import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.Action;
/**
* Demonstrates file resource download.
* Set filePath to the local file resource to download,
* relative to the application root ("/images/struts.gif").
* Action to demonstrate how to use file download.
* <p/>
* This action is used to download a jpeg file from the image folder.
*
*/
public class FileDownloadAction implements Action {
private String inputPath;
public void setInputPath(String value) {
inputPath = value;
}
public InputStream getInputStream() throws Exception {
return ServletActionContext.getServletContext().getResourceAsStream(inputPath);
public InputStream getImageStream() throws Exception {
return ServletActionContext.getServletContext().getResourceAsStream("/images/struts.gif");
}
public String execute() throws Exception {
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="value">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message>Value must not be empty</message>
</field-validator>
</field>
<field name="count">
<field-validator type="int">
<message>Count must be an integer</message>
</field-validator>
</field>
</validators>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: fieldValidatorsExample -->
<validators>
<field name="requiredValidatorField">
<field-validator type="required">
<message><![CDATA[ required ]]></message>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message key="i18n.nothing.here"><![CDATA[ required and must be string ]]></message>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message key="i18n.requiredstring"><![CDATA[ required and must be string ]]></message>
</field-validator>
</field>
<field name="integerValidatorField">
<field-validator type="int">
<param name="min">1</param>
<param name="max">10</param>
<message><![CDATA[ must be integer min 1 max 10 if supplied ]]></message>
</field-validator>
</field>
<field name="dateValidatorField">
<field-validator type="date">
<param name="min">01/01/1990</param>
<param name="max">01/01/2000</param>
<message><![CDATA[ must be a min 01-01-1990 max 01-01-2000 if supplied ]]></message>
</field-validator>
</field>
<field name="emailValidatorField">
<field-validator type="email">
<message><![CDATA[ must be a valid email if supplied ]]></message>
</field-validator>
</field>
<field name="urlValidatorField">
<field-validator type="url">
<message><![CDATA[ must be a valid url if supplied ]]></message>
</field-validator>
</field>
<field name="stringLengthValidatorField">
<field-validator type="stringlength">
<param name="maxLength">4</param>
<param name="minLength">2</param>
<param name="trim">true</param>
<message><![CDATA[ must be a String of a specific greater than 1 less than 5 if specified ]]></message>
</field-validator>
</field>
<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression">.*\.txt</param>
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
</field-validator>
</field>
<field name="fieldExpressionValidatorField">
<field-validator type="fieldexpression">
<param name="expression">(fieldExpressionValidatorField == requiredValidatorField)</param>
<message><![CDATA[ must be the same as the Required Validator Field if specified ]]></message>
</field-validator>
</field>
</validators>
<!-- END SNIPPET: fieldValidatorsExample -->
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: fieldValidatorsExample -->
<validators>
<field name="requiredValidatorField">
<field-validator type="required">
<message><![CDATA[ required ]]></message>
</field-validator>
</field>
<field name="requiredStringValidatorField">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message><![CDATA[ required and must be string ]]></message>
</field-validator>
</field>
<field name="integerValidatorField">
<field-validator type="int">
<param name="min">1</param>
<param name="max">10</param>
<message><![CDATA[ must be integer min 1 max 10 if supplied ]]></message>
</field-validator>
</field>
<field name="dateValidatorField">
<field-validator type="date">
<param name="min">01/01/1990</param>
<param name="max">01/01/2000</param>
<message><![CDATA[ must be a min 01-01-1990 max 01-01-2000 if supplied ]]></message>
</field-validator>
</field>
<field name="emailValidatorField">
<field-validator type="email">
<message><![CDATA[ must be a valid email if supplied ]]></message>
</field-validator>
</field>
<field name="urlValidatorField">
<field-validator type="url">
<message><![CDATA[ must be a valid url if supplied ]]></message>
</field-validator>
</field>
<field name="stringLengthValidatorField">
<field-validator type="stringlength">
<param name="maxLength">4</param>
<param name="minLength">2</param>
<param name="trim">true</param>
<message><![CDATA[ must be a String of a specific greater than 1 less than 5 if specified ]]></message>
</field-validator>
</field>
<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression">.*\.txt</param>
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
</field-validator>
</field>
<field name="fieldExpressionValidatorField">
<field-validator type="fieldexpression">
<param name="expression">(fieldExpressionValidatorField == requiredValidatorField)</param>
<message><![CDATA[ must be the same as the Required Validator Field if specified ]]></message>
</field-validator>
</field>
</validators>
<!-- END SNIPPET: fieldValidatorsExample -->
@@ -0,0 +1 @@
i18n.requiredstring=Test String for required Strings...
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: nonFieldValidatorsExample -->
<validators>
<validator type="expression">
<param name="expression"><![CDATA[ ( (someText == someTextRetype) && (someTextRetype == someTextRetypeAgain) ) ]]></param>
<message><![CDATA[ all three text must be exactly the same ]]></message>
</validator>
</validators>
<!-- END SNIPPET: nonFieldValidatorsExample -->
@@ -0,0 +1,23 @@
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: quizValidators -->
<!--
Add the following DOCTYPE declaration as first line of your XXX-validation.xml file:
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-->
<validators>
<field name="name">
<field-validator type="requiredstring">
<message>You must enter a name</message>
</field-validator>
</field>
<field name="age">
<field-validator type="int">
<param name="min">13</param>
<param name="max">19</param>
<message>Only people ages 13 to 19 may take this quiz</message>
</field-validator>
</field>
</validators>
<!-- END SNIPPET: quizValidators -->
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="name">
<field-validator type="requiredstring">
<message>Name Required</message>
</field-validator>
</field>
<field name="age">
<field-validator type="int">
<param name="min">1</param>
<param name="max">100</param>
<message>Age Required (1-100)</message>
</field-validator>
</field>
<field name="birthday">
<field-validator type="date">
<message>Birthday Required</message>
</field-validator>
</field>
</validators>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<!-- START SNIPPET: visitorValidatorsExample -->
<validators>
<field name="user">
<field-validator type="visitor">
<param name="context">userContext</param>
<param name="appendPrefix">true</param>
<message>User:</message>
</field-validator>
</field>
</validators>
<!-- END SNIPPET: visitorValidatorExample -->
@@ -1,174 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -1,5 +0,0 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -10,24 +10,15 @@
<default-action-ref name="download"/>
<action name="download" class="org.apache.struts2.showcase.filedownload.FileDownloadAction">
<param name="inputPath">\images\struts.gif</param>
<result name="success" type="stream">
<param name="contentType">image/gif</param>
<param name="inputName">inputStream</param>
<param name="contentDisposition">filename="struts.gif"</param>
<param name="bufferSize">4096</param>
</result>
</action>
<action name="download2" class="org.apache.struts2.showcase.filedownload.FileDownloadAction">
<param name="inputPath">\images\struts-gif.zip</param>
<result name="success" type="stream">
<param name="contentType">application/zip</param>
<param name="inputName">inputStream</param>
<param name="contentDisposition">filename="struts-gif.zip"</param>
<param name="contentType">image/jpeg</param>
<param name="inputName">imageStream</param>
<param name="contentDisposition">filename="logo.png"</param>
<param name="bufferSize">4096</param>
</result>
</action>
</package>
</struts>
@@ -22,7 +22,6 @@
<result type="velocity">exampleSubmited.vm</result>
<result name="input" type="velocity">example.vm</result>
</action>
<action name="lotsOfOptiontransferselect" class="org.apache.struts2.showcase.LotsOfOptiontransferselectAction" method="input">
<result>lotsOfOptiontransferselect.jsp</result>
</action>
@@ -30,15 +29,7 @@
<result name="input">lotsOfOptiontransferselect.jsp</result>
<result>lotsOfOptiontransferselectSubmit.jsp</result>
</action>
<action name="moreSelects" class="org.apache.struts2.showcase.MoreSelectsAction" method="input">
<result>moreSelects.jsp</result>
</action>
<action name="moreSelectsSubmit" class="org.apache.struts2.showcase.MoreSelectsAction" method="submit">
<result name="input">moreSelects.jsp</result>
<result>moreSelectsSubmit.jsp</result>
</action>
<!-- START SNIPPET: treeExampleDynamicXWorkXml -->
<action name="showDynamicTreeAction" class="org.apache.struts2.showcase.ShowDynamicTreeAction">
@@ -77,25 +77,24 @@
<div class="wrapper">
<h2 class="accessibility">Navigation</h2>
<ul class="clearfix">
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/ajax/index.jsp"/>">Ajax</a></li>
<li><a href="<s:url value="/chat/index.jsp"/>">Ajax Chat</a></li>
<li><a href="<s:url action="actionChain1!input" namespace="/actionchaining" includeParams="none" />">Action Chaining</a></li>
<li><a href="<s:url action="index" namespace="/config-browser" includeParams="none" />">Config Browser</a></li>
<li><a href="<s:url value="/conversion/index.jsp"/>">Conversion</a></li>
<li><a href="<s:url value="/empmanager/index.jsp"/>">CRUD</a></li>
<li><a href="<s:url value="/wait/index.jsp"/>">Execute & Wait</a></li>
<li><a href="<s:url value="/filedownload/index.jsp"/>">File Download</a></li>
<li><a href="<s:url value="/fileupload" />">File Upload</a></li>
<li><a href="<s:url value="/freemarker/index.jsp"/>">Freemarker</a>
<li><a href="<s:url action="hangmanMenu" namespace="/hangman"/>">Hangman</a></li>
<li><a href="<s:url value="/jsf/index.jsp"/>">JavaServer Faces</a></li>
<li><a href="<s:url value="/person/index.jsp"/>">Person Manager</a></li>
<li><a href="<s:url value="/tags/index.jsp"/>">Tags</a></li>
<li><a href="<s:url value="/tiles/index.action" />">Tiles</a></li>
<li><a href="<s:url value="/token/index.jsp"/>">Token</a></li>
<li><a href="<s:url value="/validation/index.jsp"/>">Validation</a></li>
<li class="last"><a href="<s:url value="/help.jsp"/>">Help</a></li>
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/ajax/index.jsp"/>">AJAX</a></li>
<li><a href="<s:url action="actionChain1!input" namespace="/actionchaining" includeParams="none" />">Action Chaining</a></li>
<li><a href="<s:url action="index" namespace="/config-browser" includeParams="none" />">Config Browser</a></li>
<li><a href="<s:url value="/conversion/index.jsp"/>">Conversion</a></li>
<li><a href="<s:url value="/empmanager/index.jsp"/>">CRUD</a></li>
<li><a href="<s:url value="/wait/index.jsp"/>">Execute & Wait</a></li>
<li><a href="<s:url value="/filedownload/index.jsp"/>">File Download</a></li>
<li><a href="<s:url value="/fileupload" />">File Upload</a></li>
<li><a href="<s:url value="/freemarker/index.jsp"/>">Freemarker</a>
<li><a href="<s:url action="hangmanMenu" namespace="/hangman"/>">Hangman</a></li>
<li><a href="<s:url value="/jsf/index.jsp"/>">JavaServer Faces</a></li>
<li><a href="<s:url value="/person/index.jsp"/>">Person Manager</a></li>
<li><a href="<s:url value="/tags/index.jsp"/>">Tags</a></li>
<li><a href="<s:url value="/tiles/index.action" />">Tiles</a></li>
<li><a href="<s:url value="/token/index.jsp"/>">Token</a></li>
<li><a href="<s:url value="/validation/index.jsp"/>">Validation</a></li>
<li class="last"><a href="<s:url value="/help.jsp"/>">Help</a></li>
</ul>
</div>
<hr/>
@@ -0,0 +1,62 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Ajax Examples</title>
<!--// START SNIPPET: common-include-->
<jsp:include page="/ajax/commonInclude.jsp"/>
<!--// END SNIPPET: common-include-->
</head>
<body>
This should have the month label all on one line (problem in IE) appears fine in FF though.
<s:paneldatepicker id="foo" language="en-us" displayWeeks="1" staticDisplay="true"/>
<p>A calendar in your locale, or the closest thing to it we currently provide</p>
<s:datepicker id="test" cssStyle="border:1px solid red;padding:1px;"/>
<p>Same as above, but Friday is the first day of the week. WOOHOO! value="today"</p>
<s:datepicker value="today" weekStartsOn="5"/>
<p>Same as first, but with only 3 weeks displayed</p>
<s:datepicker displayWeeks="3"/>
<p>Same as first, but with adjustWeeks="true"</p>
<s:datepicker adjustWeeks="true"/>
<p>Same as first, with startDate of 10 September 2006</p>
<s:datepicker startDate="2006-09-10"/>
<p>Same as first, with endDate of 10 September 2006</p>
<s:datepicker endDate="2006-09-10"/>
<p>Same as first, with startDate of 1 January 2006 and endDate of 31 December 2006</p>
<s:datepicker startDate="2006-01-01" endDate="2006-12-31"/>
<p>Same as first, with startDate of 10 September 2006 and endDate of 24 September 2006 (note how the controls<br/>
are disabled). This is considered a static display, because the range of startDate and endDate is less than the displayWeeks.</p>
<s:datepicker startDate="2006-09-10" endDate="2006-09-24"/>
<p>Same as first, with startDate of 23 September 2006 and endDate of 10 October 2006 (note where the calendar<br/>
display starts since the range overlaps the end of a month and the beginning of a month and how the controls are disabled).<br/>
This is considered a static display, because the range of startDate and endDate is less than the displayWeeks.</p>
<s:datepicker startDate="2006-09-23" endDate="2006-10-10"/>
<p>Same as first with staticDisplay=true and an initial of value="2005-12-25" (Sunday, December 25, 2005)</p>
<s:datepicker staticDisplay="true" value="2005-12-25"/>
<p>now on to the locale stuff...</p>
<p>en-us locale</p>
<s:datepicker language="en-us" />
<p>nl-nl locale</p>
<s:datepicker language="nl-nl" />
<s:include value="../footer.jsp"/>
</body>
</html>
@@ -0,0 +1,39 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Ajax Examples</title>
<!--// START SNIPPET: common-include-->
<jsp:include page="/ajax/commonInclude.jsp"/>
<!--// END SNIPPET: common-include-->
</head>
<body>
<p>toggleTye="wipe":</p>
<s:dropdowndatetimepicker value="2006-10-31" toggleType="wipe" toggleDuration="300" name="test"/>
<p>toggleTye="explode":</p>
<s:dropdowndatetimepicker value="2006-07-22" toggleType="explode" toggleDuration="500"/>
<p>toggleTye="fade":</p>
<s:dropdowndatetimepicker value="2006-06-30" toggleType="fade" toggleDuration="500"/>
<p>With value="today"</p>
<s:dropdowndatetimepicker name="dddp1" value="today" />
<p>US format, empty</p>
<s:dropdowndatetimepicker name="dddp2" language="en-us" />
<p>US format with initial date of 2006-06-26</p>
<s:dropdowndatetimepicker name="dddp3" value="2006-06-26" language="en-us" />
<p>With initial date of 1969-04-25 and a custom format dd/MM/yyyy</p>
<s:dropdowndatetimepicker name="dddp5" value="1969-04-25" displayFormat="dd/MM/yyyy" />
<p>In German:</p>
<s:dropdowndatetimepicker name="dddp7" value="2006-06-28" language="de" />
<p>In Dutch:</p>
<s:dropdowndatetimepicker name="dddp8" value="2006-06-28" language="nl" />
<p>US format with initial date of 2006-06-26 and long formatting (parse not supported)</p>
<s:dropdowndatetimepicker name="dddp12" value="2006-06-26" formatLength="long" language="en-us" />
<p>German format with initial date of 2006-06-26 and long formatting (parse not supported)</p>
<s:dropdowndatetimepicker name="dddp13" value="2006-06-26" formatLength="long" language="de" />
<br/>
<s:include value="../footer.jsp"/>
</body>
</html>
@@ -0,0 +1,45 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Ajax Examples</title>
<!--// START SNIPPET: common-include-->
<jsp:include page="/ajax/commonInclude.jsp"/>
<!--// END SNIPPET: common-include-->
</head>
<body>
toggleTye="wipe":
<s:dropdowndatetimepicker type="time" value="10:30" toggleType="wipe" toggleDuration="300"/>
<br/>
toggleTye="explode":
<s:dropdowndatetimepicker type="time" value="13:00" toggleType="explode" toggleDuration="500"/>
<br/>
toggleTye="fade":
<s:dropdowndatetimepicker type="time" value="13:00" toggleType="fade" toggleDuration="500"/>
<br/>
With value="today":
<s:dropdowndatetimepicker type="time" name="dddp1" value="today" />
<br/>
US format, empty
<s:dropdowndatetimepicker type="time" name="dddp2" language="en-us" />
<br/>
In German:
<s:dropdowndatetimepicker type="time" name="dddp7" language="de" />
<br/>
In Dutch:
<s:dropdowndatetimepicker type="time" name="dddp8" language="nl" />
<br/>
<br/>
<s:include value="../footer.jsp"/>
</body>
</html>
+9 -7
View File
@@ -5,19 +5,21 @@
<h1>AJAX Example</h1>
<p>
Note: The Ajax tags are experimental. These examples have only been tested under FireFox 1.5 and IE 6.
</p>
Note: these examples have only been tested under FireFox 1.5 and IE 6.
<ul>
<li><a href="autocompleter">Autocompleter combobox tag</a></li>
<li><a href="remotebutton">Remote button tag</a></li>
<li><a href="remotediv">Remote div tag</a></li>
<li><a href="autocompleter">Autocompleter combobox tag</a></li>
<li><a href="remotelink">Remote link tag</a></li>
<li><a href="remotebutton">Remote button tag</a></li>
<li><a href="tabbedpanel">Tabbed panel</a></li>
<li><a href="widgets">Widgets </a> (may not work in all browsers!)
<li><a href="datepicker">DatePicker</a></li>
<li><a href="dropdowndatepicker">Dropdown DatePicker</a></li>
<li><a href="timepicker">TimePicker</a></li>
<li><a href="dropdowntimepicker">Dropdown TimePicker</a></li>
<li><a href="remoteforms">Remote forms</a></li>
<li><a href="widgets">Widgets </a> (experimental - may not work in all browsers
see the <a href="http://www.dojotoolkit.org">dojo website</a> for more information</li>
<li>(broken) <a href="remoteforms">Remote forms</a></li>
</ul>
</body>
</html>
@@ -30,8 +30,8 @@
<br/><br/>
<input type=button value="refresh" onclick="controller.refresh()">
<input type=button value="stop timer" onclick="controller.stop()">
<input type=button value="start timer" onclick="controller.start()">
<input type=button value="stop timer" onclick="controller.stop()">
<s:url id="ajaxTest" value="/AjaxTest.action" />
@@ -4,7 +4,7 @@
<html>
<head>
<title>Ajax Examples</title>
<s:head theme="ajax"/>
<jsp:include page="/ajax/commonInclude.jsp"/>
<script language="JavaScript" type="text/javascript">
function doSomething() {
@@ -59,7 +59,7 @@ Remote form evaluating suplied JS on completion:<br/>
<input type='text' name='data' value='Struts User'>
<s:submit value="GO4" theme="ajax"/>
<s:submit value="GO4" theme="ajax" afterLoading="alert('form submitted');"/>
</s:form>
@@ -73,7 +73,7 @@ Remote form replacing the forms content after confirming results:<br/>
<input type='text' name='data' value='Struts User'>
<s:submit value="GO3" theme="ajax" targets="theForm5" />
<s:submit value="GO3" theme="ajax" targets="theForm5" beforeLoading="confirm('sure?');"/>
</s:form>
@@ -87,7 +87,7 @@ Remote form replacing the forms content after running a function:<br/>
<input type='text' name='data' value='Struts User'>
<s:submit value="GO3" theme="ajax" targets="theForm6" />
<s:submit value="GO3" theme="ajax" targets="theForm6" beforeLoading="doSomething();"/>
</s:form>
@@ -105,5 +105,7 @@ A form with no remote submit (so should not be ajaxified):<br/>
</s:form>
<s:include value="../footer.jsp"/>
</body>
</html>
@@ -12,10 +12,10 @@
<p>
<ol>
<li><a href="example2.jsp">A local tabbed panel width fixed size (doLayout="true")</a></li>
<li><a href="example3.jsp">A remote (href != "") and local tabbed panel</a></li>
<li><a href="example3.jsp">A remote(href != "") and local tabbed panel</a></li>
<li><a href="example1.jsp">Various remote and local tabbed panels (with enclosed tabbed pannels) with layout (doLayout="false")</a></li>
<li><a href="example4.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on tabs(closeButton="tab"), and tabs on the right (labelposition="right")</a></li>
<li><a href="example5.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on the tab pane (closeButton="pane"), and tabs on the bottom (labelposition="bottom")</a></li>
<li><a href="example4.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on tabs(closeButton="tab"), and tabs on the right (labelposition="righ")</a></li>
<li><a href="example5.jsp">A local tabbed panel width fixed size (doLayout="true") with close button on the tab pane(closeButton="pane"), and tabs on the bottom (labelposition="bottom")</a></li>
</ol>
@@ -0,0 +1,35 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>TimePicker tag</title>
<%@ include file="/ajax/commonInclude.jsp" %>
</head>
<body>
<h2>Examples</h2>
Normal English-US timepicker:
<s:timepicker language="en-us"/>
<br>
Set time to current time (useDefaultTime="true")
<s:timepicker id="tp0" useDefaultTime="true"/>
<br>
Set minutes to current time (useDefaultTime="true" and useDefaultMinutes="true")
<s:timepicker id="tp1" useDefaultTime="true" useDefaultMinutes="true"/>
<br>
Set time to 9:43(value="9:43")
<s:timepicker id="tp2" value="9:43"/>
<br>
Set time to 1:00PM(value="13:00")
<s:timepicker id="tp3" value="13:00"/>
<br>
<s:include value="../footer.jsp"/>
</body>
</html>
@@ -23,7 +23,7 @@
<s:textfield label="Employee Id" name="currentEmployee.empId"/>
<s:textfield label="%{getText('employee.firstName')}" name="currentEmployee.firstName"/>
<s:textfield label="%{getText('employee.lastName')}" name="currentEmployee.lastName"/>
<s:datetimepicker label="Birthdate" name="currentEmployee.birthDate"/>
<s:datepicker label="Birthdate" name="currentEmployee.birthDate"/>
<s:textfield label="Salary" name="currentEmployee.salary"/>
<s:checkbox fieldValue="true" label="Married" name="currentEmployee.married"/>
<s:combobox list="availablePositions" label="Position" name="currentEmployee.position"/>
@@ -1,22 +1,13 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Showcase - Fileupload</title>
<title>Showcase</title>
</head>
<body>
<h1>File Download Example</h1>
<ul>
<li>
<s:url id="url" action="download"/><s:a href="%{url}">Download image file.</s:a>
The browser should display the Struts logo.
</li>
<li>
<s:url id="url" action="download2"/><s:a href="%{url}">Download ZIP file.</s:a>
The browser should prompt for a location to save the ZIP file.
</li>
</ul>
Click this <s:url id="url" action="download"/><s:a href="%{url}">link</s:a> to download Struts logo.
</body>
</html>
@@ -5,14 +5,14 @@
</head>
<body>
<ul>
<li>
<@s.url id="url" action="hangmanAjax" namespace="/hangman" />
<@s.a href="%{#url}">Hangman (Ajax)</@s.a>
</li>
<li>
<@s.url id="url" action="hangmanNonAjax" namespace="/hangman" />
<@s.a href="%{#url}">Hangman (Non Ajax)</@s.a>
</li>
<li>
<@s.url id="url" action="hangmanAjax" namespace="/hangman" />
<@s.a href="%{#url}">Hangman (Ajax - Experimental)</@s.a>
</li>
</ul>
</body>
</html>
Binary file not shown.
+37 -21
View File
@@ -12,36 +12,33 @@
</head>
<body>
<blockquote>
<p>
The Struts Showcase demonstrates a variety of use cases and tag usages.
Essentially, the application exercises various framework features in isolation.
<em>The Showcase is <strong>not</strong> meant as a "best practices" example.</em>
</p>
<ul>
<li>
For more "by example" solutions,
see the <a href="http://struts.apache.org/2.x/docs/cookbook.html">Struts Cookbook</a> pages.
</li>
<li>
For a "best practices" example, see the
<a href="http://planetstruts.org/struts2-mailreader/">MailReader application</a> Tour and source code.
</li>
</ul>
</blockquote>
<p>
The Struts Showcase demonstrates a variety of use cases and tag usages.
Essentially, the application exercises various framework features in isolation.
<em>The Showcase is <strong>not</strong> meant as a "best practices" example.</em>
</p>
<ul>
<li>
For more "by example" solutions,
see the <a href="http://struts.apache.org/2.x/docs/cookbook.html">Struts Cookbook</a> pages.
</li>
<li>
For a "best practices" example, see the
<a href="http://planetstruts.org/struts2-mailreader/">MailReader application</a> Tour and source code.
</li>
</ul>
<p>
<%-- THIS LIST IS MAINTAINED IN WEB-INF/decorators/main.jsp TO CREATE THE MENU BAR -- EDIT THERE AND COPY HERE --%>
<ul>
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/ajax/index.jsp" />">Ajax Theme for Struts Tags</a></li>
<li><a href="<s:url value="/chat/index.jsp"/>">Ajax Chat</a>
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/ajax/index.jsp"/>">AJAX</a></li>
<li><a href="<s:url action="actionChain1!input" namespace="/actionchaining" includeParams="none" />">Action Chaining</a></li>
<li><a href="<s:url action="index" namespace="/config-browser" includeParams="none" />">Config Browser</a></li>
<li><a href="<s:url value="/conversion/index.jsp"/>">Conversion</a></li>
<li><a href="<s:url value="/empmanager/index.jsp"/>">CRUD</a></li>
<li><a href="<s:url value="/wait/index.jsp"/>">Execute & Wait</a></li>
<li><a href="<s:url value="/filedownload/index.jsp"/>">File Download</a></li>
<li><a href="<s:url value="/fileupload/index.jsp" />">File Upload</a></li>
<li><a href="<s:url value="/fileupload" />">File Upload</a></li>
<li><a href="<s:url value="/freemarker/index.jsp"/>">Freemarker</a>
<li><a href="<s:url action="hangmanMenu" namespace="/hangman"/>">Hangman</a></li>
<li><a href="<s:url value="/jsf/index.jsp"/>">JavaServer Faces</a></li>
@@ -58,7 +55,26 @@
These examples are under development and may not be fully operational.
</p>
<ul>
<li>AJAX / Remote Forms</li>
<li><a href="<s:url value="/chat/index.jsp"/>">Chat (AJAX)</a>
<li><a href="<s:url action="guess" namespace="/continuations" />">Continuations</a></li>
<li>Conversion<ul>
<li>Address</li>
<li>Java 5 Enum</li>
</ul>
</li>
<li>Tabs / Non-UI Tags<ul>
<li>
Action Prefix / Redirect Action
</li>
</ul>
</li>
<li>Tags / UI Tags<ul>
<li>UI Example</li>
<li>UI Example (Velocity)</li>
</ul>
</li>
</ul>
</p>
@@ -1,23 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<s:head />
</head>
<body>
<table>
<s:datetimepicker label="toggleType='wipe'" value="2006-10-31" toggleType="wipe" toggleDuration="300" name="test"/>
<s:datetimepicker label="toggleType='explode'" value="2006-07-22" toggleType="explode" toggleDuration="500"/>
<s:datetimepicker label="toggleType='fade'" value="2006-06-30" toggleType="fade" toggleDuration="500"/>
<s:datetimepicker label="With value='today'" name="dddp1" value="today" />
<s:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
<s:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="2006-06-26" language="en-us" />
<s:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="25/04/1969" displayFormat="dd/MM/yyyy" />
<s:datetimepicker label="In German" name="dddp7" value="2006-06-28" language="de" />
<s:datetimepicker label="In Dutch" name="dddp8" value="2006-06-28" language="nl" />
<s:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="2006-06-26" formatLength="long" language="en-us" />
<s:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="2006-06-26" formatLength="long" language="de" />
</table>
</body>
</html>
@@ -19,14 +19,14 @@
name="name"
tooltip="Enter your Name here" />
<s:datetimepicker
<s:datepicker
tooltip="Select Your Birthday"
label="Birthday"
name="birthday" />
<s:textarea
tooltip="Enter your Biography"
label="Biography"
label="Biograph"
name="bio"
cols="20"
rows="3"/>
@@ -12,8 +12,8 @@
#sform ("action=exampleSubmitVelocity" "method=post" "enctype=multipart/form-data")
#stextfield ("label=Name" "name=name")
#sdatetimepicker ("label=Birthday" "name=birthday")
#stextarea ("label=Biography" "name=bio" "cols=20" "rows=3")
#sdatepicker ("label=Birthday" "name=birthday")
#stextarea ("label=Biograph" "name=bio" "cols=20" "rows=3")
#sselect ("label=Favourite Color" "list={'Red', 'Blue', 'Green'}" "name=favouriteColor" "emptyOption=true" "headerKey=None" "headerValue=None")
#sselect ("label=Favourite Language" "list=favouriteLanguages" "name=favouriteLanguage" "listKey=key" "listValue=description" "emptyOption=true" "headerKey=None" "headerValue=None")
#scheckboxlist ("label=Friends" "list={'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" "name=friends")
@@ -11,12 +11,9 @@
<li><s:url id="url" namespace="/tags/ui" action="example" method="input" /><s:a href="%{url}">UI Example</s:a></li>
<li><s:url id="url" namespace="/tags/ui" action="exampleVelocity" method="input" /><s:a href="%{url}">UI Example (Velocity)</s:a></li>
<li><s:url id="url" namespace="/tags/ui" action="lotsOfOptiontransferselect" method="input" /><s:a href="%{url}">Option Transfer Select UI Example</s:a></li>
<li><s:url id="url" namespace="/tags/ui" action="moreSelects" method="input" /><s:a href="%{url}">More Select Box UI Examples</s:a></li>
<li><s:url id="url" namespace="/tags/ui" value="treeExampleStatic.jsp" /><s:a href="%{url}">Tree Example (static)</s:a>
<li><s:url id="url" namespace="/tags/ui" action="showDynamicTreeAction"/><s:a href="%{url}">Tree Example (dynamic)</s:a>
<li><s:url id="url" value="componentTagExample.jsp"/><s:a href="%{#url}">Component Tag Example</s:a>
<li><a href="datepicker">DateTime picker tag - Pick a date</a></li>
<li><a href="timepicker">DateTime picker tag - Pick a time</a></li>
<%--li><s:url id="url" namespace="/tags/ui" action="populateUsingIterator" method="input" /><s:a href="%{url}">UI population using iterator tag</s:a></li--%>
</ul>
</body>
@@ -68,26 +68,42 @@
/>
<br/>
<s:optiontransferselect
tooltip="Pick One at a Time"
label="Favourite Sport"
leftTitle="Non Favourite Sports"
rightTitle="Favourite Sports"
name="nonFavouriteSports"
list="defaultNonFavoriteSports"
doubleName="favouriteSports"
doubleList="defaultFavouriteSports"
size="1" multiple="false"
doubleSize="5" doubleMultiple="true"
allowAddAllToLeft="false"
allowAddAllToRight="false"
allowSelectAll="false"
/>
<s:updownselect
tooltip="Prioritized Your Favourite Cartoon Characters"
label="Prioritised Favourite Cartoon Characters"
list="defaultFavouriteCartoonCharacters"
name="prioritisedFavouriteCartoonCharacters"
headerKey="-1"
headerValue="--- Please Order ---"
emptyOption="true" />
<br/>
<s:updownselect
tooltip="Prioritise Your Favourite Cars"
label="Prioritised Favourite Cars"
list="defaultFavouriteCars"
name="prioritisedFavouriteCars"
headerKey="-10"
headerValue="--- Please Order ---" />
<br/>
<s:updownselect
tooltip="Prioritised Your Favourite Countries"
label="Prioritised Favourite Countries"
list="defaultFavouriteCountries"
name="prioritisedFavouriteCountries"
emptyOption="true"
value="{'england', 'brazil'}" />
<br/>
<s:submit value="Submit It" />
<br/>
</s:form>
</body>
</html>
@@ -71,19 +71,26 @@
</s:iterator>
</td>
</tr>
<tr>
<td>Favourite Sports:</td>
<tr>
<td>Prioritised Favourite Cartoon Characters:</td>
<td>
<s:iterator value="favouriteSports" status="stat">
<s:iterator value="prioritisedFavouriteCartoonCharacters" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
<tr>
<td>Non Favourite Sports:</td>
<tr>
<td>Prioritised Favourite Cars:</td>
<td>
<s:iterator value="nonfavouriteSports" status="stat">
<s:iterator value="prioritisedFavouriteCars" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
<tr>
<td>Prioritised Favourite Countries</td>
<td>
<s:iterator value="prioritisedFavouriteCountries" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
@@ -1,61 +0,0 @@
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Show Case - Tags - UI Tags - Optiontransferselect</title>
<s:head />
</head>
<body>
<s:form action="moreSelectsSubmit" namespace="/tags/ui" method="post">
<s:updownselect
tooltip="Prioritized Your Favourite Cartoon Characters"
label="Prioritised Favourite Cartoon Characters"
list="defaultFavouriteCartoonCharacters"
name="prioritisedFavouriteCartoonCharacters"
headerKey="-1"
headerValue="--- Please Order ---"
emptyOption="true" />
<br/>
<s:updownselect
tooltip="Prioritise Your Favourite Cars"
label="Prioritised Favourite Cars"
list="defaultFavouriteCars"
name="prioritisedFavouriteCars"
headerKey="-10"
headerValue="--- Please Order ---" />
<br/>
<s:updownselect
tooltip="Prioritised Your Favourite Countries"
label="Prioritised Favourite Countries"
list="defaultFavouriteCountries"
name="prioritisedFavouriteCountries"
emptyOption="true"
value="{'england', 'brazil'}" />
<br/>
<s:inputtransferselect
list="defaultFavouriteNumbers"
name="favouriteNumbers"
label="Numbers"/>
<s:select label="Favourite Cities"
list="availableCities"
name="favouriteCities"
value="%{defaultFavouriteCities}"
multiple="true" size="4"/>
<s:submit value="Submit It" />
<br/>
</s:form>
</body>
</html>
@@ -1,53 +0,0 @@
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Showcase - Tags - UI Tags - Select Boxes Result</title>
</head>
<body>
<table>
<tr>
<td>Prioritised Favourite Cartoon Characters:</td>
<td>
<s:iterator value="prioritisedFavouriteCartoonCharacters" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
<tr>
<td>Prioritised Favourite Cars:</td>
<td>
<s:iterator value="prioritisedFavouriteCars" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
<tr>
<td>Prioritised Favourite Countries</td>
<td>
<s:iterator value="prioritisedFavouriteCountries" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
<tr>
<td>Favourite Cities</td>
<td>
<s:iterator value="favouriteCities" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
<tr>
<td>Favourite Numbers</td>
<td>
<s:iterator value="favouriteNumbers" status="stat">
<s:property value="%{#stat.count}" />.<s:property />&nbsp;
</s:iterator>
</td>
</tr>
</table>
</body>
</html>
@@ -1,20 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>UI Tags Example</title>
<s:head />
</head>
<body>
<table>
<s:datetimepicker label="toggleType='wipe'" type="time" value="10:30" toggleType="wipe" toggleDuration="300"/>
<s:datetimepicker label="toggleType='explode'" type="time" value="13:00" toggleType="explode" toggleDuration="500"/>
<s:datetimepicker label="toggleType='fade'" type="time" value="13:00" toggleType="fade" toggleDuration="500"/>
<s:datetimepicker label="With value='today'" name="dddp4" type="time" value="today" />
<s:datetimepicker label="US format, empty" name="dddp5" type="time" language="en-us" />
<s:datetimepicker label="US format, 13:00 hours" name="dddp6" type="time" value="13:00" language="en-us" />
<s:datetimepicker label="In German" name="dddp7" type="time" value="13:00" language="de" />
<s:datetimepicker label="In Dutch" name="dddp8" type="time" value="13:00" language="nl" />
</table>
</body>
</html>
@@ -26,15 +26,15 @@
<s:url id="storeMessageAcrossRequestExample" value="/validation/storeErrorsAcrossRequestExample.jsp" />
<ul>
<li><s:a href="%{fieldValidatorUrl}">Field Validators</s:a></li>
<li><s:a href="%{clientSideValidationUrl}">Field Validators with client-side JavaScript</s:a></li>
<li><s:a href="%{nonFieldValidatorUrl}">Non Field Validator</s:a></li>
<li><s:a href="%{storeMessageAcrossRequestExample}">Store across request using MessageStoreInterceptor (Example)</s:a></li>
<li>(broken) <s:a href="%{quizAjax}">Validation (ajax)</s:a></li>
<li><s:a href="%{quizBasic}">Validation (basic)</s:a></li>
<li><s:a href="%{quizClient}">Validation (client)</s:a></li>
<li><s:a href="%{quizClientCss}">Validation (client using css_xhtml theme)</s:a></li>
<li><s:a href="%{quizAjax}">Validation (ajax)</s:a></li>
<li><s:a href="%{fieldValidatorUrl}">Field Validators</s:a></li>
<li><s:a href="%{nonFieldValidatorUrl}">Non Field Validator</s:a></li>
<li><s:a href="%{visitorValidatorUrl}">Visitor Validator</s:a></li>
<li><s:a href="%{clientSideValidationUrl}">Client side validation using JavaScript</s:a></li>
<li><s:a href="%{storeMessageAcrossRequestExample}">Store across request using MessageStoreInterceptor (Example)</s:a></li>
<li><s:a href="%{backToShowcase}">Back To Showcase</s:a>
</ul>
</body>
+8 -24
View File
@@ -33,7 +33,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<scm>
@@ -103,7 +103,7 @@
<groupId>opensymphony</groupId>
<artifactId>xwork</artifactId>
<classifier>javadoc</classifier>
<version>2.0.0</version>
<version>2.0-RC1</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/xwork-apidocs</outputDirectory>
@@ -111,28 +111,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>cwiki-docs</id>
<phase>process-resources</phase>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/cwiki"/>
<get src="http://struts.apache.org/2.x/docs.zip"
dest="${project.build.directory}/docs.zip"
ignoreerrors="false"/>
<unzip src="${project.build.directory}/docs.zip"
dest="${project.build.directory}/cwiki"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.0.1</version>
@@ -164,6 +142,12 @@
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-all</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
-6
View File
@@ -67,12 +67,6 @@
<outputDirectory>docs/struts2-core</outputDirectory>
</fileSet>
<!-- Include the Confluence docs in the assembly -->
<fileSet>
<directory>target/cwiki</directory>
<outputDirectory>docs</outputDirectory>
</fileSet>
<!-- Plugins -->
<!--
<fileSet>
+1 -1
View File
@@ -1,7 +1,7 @@
Retrotranslator: a Java bytecode transformer that translates Java classes
compiled with JDK 5.0 into classes that can be run on JVM 1.4.
Copyright (c) 2005 - 2007 Taras Puchko
Copyright (c) 2005, 2006 Taras Puchko
All rights reserved.
Redistribution and use in source and binary forms, with or without
+171 -278
View File
@@ -48,7 +48,6 @@ and concurrency utilities
<li>Enhanced for loop (for-each loop)</li>
<li>Varargs (variable arguments)</li>
<li>Covariant return types</li>
<li>Formatted output</li>
<li>Static import</li>
<li>Concurrency utilities</li>
<li>Collections framework enhancements</li>
@@ -64,19 +63,19 @@ and concurrency utilities
Compile your classes with JDK 5.0 and put them into some directory, e.g. <code>myclasses</code>.
</li>
<li>
Go to the unzipped directory and execute:<br>
Go to the unzipped directory <code>Retrotranslator-<i>n.n.n</i>-bin</code> and execute:<br>
<code>java -jar retrotranslator-transformer-<i>n.n.n</i>.jar -srcdir myclasses</code>
</li>
<li>
If you use Java 5 API put <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code> and
<code>backport-util-concurrent-<i>n.n</i>.jar</code> into the classpath of your application.
<code>backport-util-concurrent.jar</code> into the classpath of your application.
</li>
<li>
Run or debug the application as usual on J2SE 1.4.x, preferably 1.4.2.
Run or debug the application as usual on any JVM 1.4, preferably JRE 1.4.2.
</li>
</ol>
<p><a name="syntax">The full command line syntax:</a><br>
<p>The full command line syntax:<br>
<code>java -jar retrotranslator-transformer-<i>n.n.n</i>.jar &lt;options&gt;</code>
<br>or<br>
<code>java -cp retrotranslator-transformer-<i>n.n.n</i>.jar net.sf.retrotranslator.transformer.Retrotranslator &lt;options&gt;</code></p>
@@ -84,74 +83,24 @@ and concurrency utilities
<tr><th>Option</th><th>Description</th><th>Default</th></tr>
<tr>
<td nowrap><code>-srcdir</code></td>
<td>The directory with classes that should be translated (may be specified several times).</td>
<td>Directory with classes compiled using JDK 5.0 (may be specified several times).</td>
<td>-</td>
</tr>
<tr>
<td nowrap><code>-srcjar</code></td>
<td>The directory with classes that should be translated (may be specified several times).</td>
<td>JAR file with classes compiled using JDK 5.0 (may be specified several times).</td>
<td>-</td>
</tr>
<tr>
<td nowrap><code>-destdir</code></td>
<td>The directory to place translated classes.</td>
<td>Directory to place classes compatible with J2SE 1.4.</td>
<td>Location of sources</td>
</tr>
<tr>
<td nowrap><code>-destjar</code></td>
<td>The JAR file to place translated classes.</td>
<td>JAR file to place classes compatible with J2SE 1.4.</td>
<td>Location of sources</td>
</tr>
<tr>
<td nowrap><a name="option_advanced"><code>-advanced</code></a></td>
<td>Whether to use alternative implementations of Java 1.4 classes and methods for better Java 5 compatibility.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-verify</code></td>
<td>Asks the translator to examine translated bytecode for references to classes, methods, or fields
that cannot be found in the provided classpath.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-classpath</code></td>
<td>The classpath for verification including <code>rt.jar</code>, <code>jce.jar</code>,
<code>jsse.jar</code> (from JRE 1.4), <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code>,
and <code>backport-util-concurrent-<i>n.n</i>.jar</code>.</td>
<td>Current classpath</td>
</tr>
<tr>
<td nowrap><code>-srcmask</code></td>
<td>The wildcard pattern specifying files that should be translated (either bytecode or UTF-8 text),
e.g. "<code>*.class;*.tld</code>". There are three special characters: "<code>*?;</code>".
</td>
<td>*.class</td>
</tr>
<tr>
<td nowrap><code>-embed</code></td>
<td>Package name for a private copy of <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code> and
<code>backport-util-concurrent-<i>n.n</i>.jar</code> to be put into <code>-destdir</code> or <code>-destjar</code>.
This makes your application independent of other versions of Retrotranslator present in the classpath.
</td>
<td>-</td>
</tr>
<tr>
<td nowrap><a name="option_backport"><code>-backport</code></a></td>
<td>Informs the translator about <a href="#extension">user-defined</a> backport packages.
Package names should be separated by semicolons.</td>
<td>-</td>
</tr>
<tr>
<td nowrap><code>-target</code></td>
<td>To make Java 6 classes compatible with Java 5 set this option to 1.5 and supply
<a href="#extension">user-defined</a> backport packages via the <code>backport</code> option.</td>
<td>1.4</td>
</tr>
<tr>
<td nowrap><code>-lazy</code></td>
<td>Asks the translator to only transform classes compiled with a <code>target</code> greater than the current one.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-stripsign</code></td>
<td>Asks the translator to strip signature (generics) information.</td>
@@ -162,6 +111,42 @@ and concurrency utilities
<td>Asks the translator for verbose output.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-lazy</code></td>
<td>Asks the translator to transform only Java 5 classes.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-advanced</code></td>
<td>Allows to override Java 1.4 methods for better Java 5 compatibility.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-verify</code></td>
<td>Asks the translator for warnings when references to unknown classes, methods, or fields are found.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-classpath</code></td>
<td>The classpath to use for verification including <code>rt.jar</code>, <code>jce.jar</code>,
<code>jsse.jar</code> (from JRE 1.4), <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code>,
and <code>backport-util-concurrent.jar</code>.</td>
<td>Current classpath</td>
</tr>
<tr>
<td nowrap><code>-srcmask</code></td>
<td>Files to translate (either bytecode or UTF-8 text) , e.g. "<code>*.class;*.tld</code>".
Only three special characters are supported: "<code>*?;</code>".</td>
<td>*.class</td>
</tr>
<tr>
<td nowrap><code>-embed</code></td>
<td>Package name for a private copy of <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code> and
<code>backport-util-concurrent.jar</code> to be put into <code>-destdir</code> or <code>-destjar</code>.
This makes your application independent of other versions of Retrotranslator present in the classpath.
</td>
<td>-</td>
</tr>
<tr>
<td nowrap><code>-retainapi</code></td>
<td>Asks the translator to modify classes for JVM 1.4 compatibility but keep use of Java 5 API.
@@ -170,11 +155,6 @@ and concurrency utilities
or the implicit <code>valueOf</code> method call for autoboxing.</td>
<td>Off</td>
</tr>
<tr>
<td nowrap><code>-retainflags</code></td>
<td>Asks the translator to keep Java 5 specific access modifiers.</td>
<td>Off</td>
</tr>
</table>
<p>
For example, if you have a Java 5 application <code>myapplication5.jar</code> you can use the following command
@@ -194,81 +174,24 @@ and concurrency utilities
<tr><th>Attribute</th><th>Description</th><th>Default</th></tr>
<tr>
<td><code>srcdir</code></td>
<td>The directory with classes that should be translated.</td>
<td>Directory with classes compiled using JDK 5.0.</td>
<td>-</td>
</tr>
<tr>
<td><code>srcjar</code></td>
<td>The directory with classes that should be translated.</td>
<td>JAR file with classes compiled using JDK 5.0.</td>
<td>-</td>
</tr>
<tr>
<td><code>destdir</code></td>
<td>The directory to place translated classes.</td>
<td>Directory to place classes compatible with J2SE 1.4.</td>
<td>Location of sources</td>
</tr>
<tr>
<td><code>destjar</code></td>
<td>The JAR file to place translated classes.</td>
<td>JAR file to place classes compatible with J2SE 1.4.</td>
<td>Location of sources</td>
</tr>
<tr>
<td><code>advanced</code></td>
<td>Whether to use alternative implementations of Java 1.4 classes and methods for better Java 5 compatibility.</td>
<td>Off</td>
</tr>
<tr>
<td><code>verify</code></td>
<td>Asks the translator to examine translated bytecode for references to classes, methods, or fields
that cannot be found in the provided classpath.</td>
<td>Off</td>
</tr>
<tr>
<td><code>classpath</code></td>
<td>The classpath for the verification, including <code>rt.jar</code>, <code>jce.jar</code>,
<code>jsse.jar</code> (from JRE 1.4), <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code>,
and <code>backport-util-concurrent-<i>n.n</i>.jar</code>.
</td>
<td>Current classpath</td>
</tr>
<tr>
<td><code>classpathref</code></td>
<td>The classpath for the verification, given as a reference to a path defined elsewhere.
</td>
<td>Current classpath</td>
</tr>
<tr>
<td><code>srcmask</code></td>
<td>The wildcard pattern specifying files that should be translated (either bytecode or UTF-8 text),
e.g. "<code>*.class;*.tld</code>". There are three special characters: "<code>*?;</code>".
</td>
<td>*.class</td>
</tr>
<tr>
<td><code>embed</code></td>
<td>Package name for a private copy of <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code> and
<code>backport-util-concurrent-<i>n.n</i>.jar</code> to be put into <code>-destdir</code> or <code>-destjar</code>.
This makes your application independent of other versions of Retrotranslator present in the classpath.
</td>
<td>-</td>
</tr>
<tr>
<td><code>backport</code></td>
<td>Informs the translator about <a href="#extension">user-defined</a> backport packages.
Package names should be separated by semicolons.</td>
<td>-</td>
</tr>
<tr>
<td><code>target</code></td>
<td>Set this option to 1.5 and supply <a href="#extension">user-defined</a> backport packages via
the <code>backport</code> option to make Java 6 classes compatible with Java 5.</td>
<td>1.4</td>
</tr>
<tr>
<td><code>lazy</code></td>
<td>Asks the translator to only transform classes compiled with a <code>target</code> greater than the current one.</td>
<td>Off</td>
</tr>
<tr>
<td><code>stripsign</code></td>
<td>Asks the translator to strip signature (generics) information.</td>
@@ -279,6 +202,43 @@ and concurrency utilities
<td>Asks the translator for verbose output.</td>
<td>Off</td>
</tr>
<tr>
<td><code>lazy</code></td>
<td>Asks the translator to transform only Java 5 classes.</td>
<td>Off</td>
</tr>
<tr>
<td><code>advanced</code></td>
<td>Allows to override Java 1.4 methods for better Java 5 compatibility.</td>
<td>Off</td>
</tr>
<tr>
<td><code>verify</code></td>
<td>Asks the translator for warnings when references to unknown classes, methods, or fields are found.</td>
<td>Off</td>
</tr>
<tr>
<td><code>classpath</code></td>
<td>The classpath to use for verification including <code>rt.jar</code>, <code>jce.jar</code>,
<code>jsse.jar</code> (from JRE 1.4), <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code>,
and <code>backport-util-concurrent.jar</code>.
</td>
<td>Current classpath</td>
</tr>
<tr>
<td><code>srcmask</code></td>
<td>Files to translate (either bytecode or UTF-8 text) , e.g. "<code>*.class;*.tld</code>".
Only three special characters are supported: "<code>*?;</code>".</td>
<td>*.class</td>
</tr>
<tr>
<td><code>embed</code></td>
<td>Package name for a private copy of <code>retrotranslator-runtime-<i>n.n.n</i>.jar</code> and
<code>backport-util-concurrent.jar</code> to be put into <code>-destdir</code> or <code>-destjar</code>.
This makes your application independent of other versions of Retrotranslator present in the classpath.
</td>
<td>-</td>
</tr>
<tr>
<td><code>retainapi</code></td>
<td>Asks the translator to modify classes for JVM 1.4 compatibility but keep use of Java 5 API.
@@ -287,11 +247,6 @@ and concurrency utilities
or the implicit <code>valueOf</code> method call for autoboxing.</td>
<td>Off</td>
</tr>
<tr>
<td><code>retainflags</code></td>
<td>Asks the translator to keep Java 5 specific access modifiers.</td>
<td>Off</td>
</tr>
<tr>
<td><code>failonwarning</code></td>
<td>Indicates whether the build will fail when there are verification warnings.</td>
@@ -299,8 +254,8 @@ and concurrency utilities
</tr>
</table>
<p>
You may use nested <code>fileset</code>, <code>jarfileset</code>, and <code>dirset</code> elements to specify
source files and <code>classpath</code> elements to specify classpath. For example:
You may use nested <code>src</code> elements to specify source directories or JAR files, and nested
<code>classpath</code> elements to specify classpath for verification. For example:
</p>
<pre>
&lt;path id="classpath"&gt;
@@ -309,8 +264,7 @@ and concurrency utilities
&lt;taskdef name="retrotranslator" classpathref="classpath"
classname="net.sf.retrotranslator.transformer.RetrotranslatorTask" /&gt;
&lt;retrotranslator destdir="build/classes14" verify="true"&gt;
&lt;fileset dir="build/classes15" includes="**/*.class"&gt;
&lt;jarfileset dir="build/lib15" includes="**/*.jar"&gt;
&lt;src path="build/classes15"/&gt;
&lt;classpath location="${java14_home}/jre/lib/rt.jar"/&gt;
&lt;classpath refid="classpath"/&gt;
&lt;/retrotranslator&gt;
@@ -322,16 +276,16 @@ and concurrency utilities
</p>
<h4><a name="idea">How to use Retrotranslator from IntelliJ IDEA?</a></h4>
<p>
There is a <a href="http://plugins.intellij.net/plugin/?id=145">plugin</a> to automatically translate and verify
classes compiled by <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>, so you can develop in Java 5 but
run and debug on JRE 1.4.
To automatically translate and verify classes compiled by <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>
you may <a href="http://plugins.intellij.net/plugin/?id=145">download a plugin</a>
that generates classes compatible with 1.4 virtual machines from your Java 5 source code.
</p>
<h4><a name="jit">How to use Just-in-Time Retrotranslator?</a></h4>
<p>
JIT Retrotranslator is able to translate at runtime Java classes loaded with any classloader.
It works on J2SE 1.4 from most JVM vendors like Sun, IBM, BEA, and Apple, but does nothing on J2SE 5.0.
It works on J2SE 1.4 from Sun, IBM, BEA, and Apple, but does nothing on J2SE 5.0 and other platforms.
However translation at runtime consumes additional memory and processing resources and it will not
work if your classes make use of Java 5 API but were compiled with "<code>-target 1.4</code>".
</p>
@@ -339,62 +293,57 @@ and concurrency utilities
<li>
If you want to run a JAR file with the JIT, execute:<br>
<code>java -cp retrotranslator-transformer-<i>n.n.n</i>.jar
net.sf.retrotranslator.transformer.JITRetrotranslator &lt;options&gt; -jar &lt;jarfile&gt; [&lt;args...&gt;]</code>
net.sf.retrotranslator.transformer.JITRetrotranslator -jar &lt;jarfile&gt; [&lt;args...&gt;]</code>
</li>
<li>
When the first option does not work or if you just want to run a class from your classpath, execute:<br>
<code>java -cp retrotranslator-transformer-<i>n.n.n</i>.jar:&lt;classpath&gt;
net.sf.retrotranslator.transformer.JITRetrotranslator &lt;options&gt; &lt;class&gt; [&lt;args...&gt;]</code>
net.sf.retrotranslator.transformer.JITRetrotranslator &lt;class&gt; [&lt;args...&gt;]</code>
</li>
<li>
Alternatively you may simply call <code>JITRetrotranslator.run()</code> from some JVM 1.4 compatible class
Alternatively you may simply call <code>JITRetrotranslator.install()</code> from some JVM 1.4 compatible class
before Java 5 classes are loaded.
</li>
</ul>
<p>
JIT Retrotranslator can accept the <code><a href="#option_advanced">advanced</a></code>
and <code><a href="#option_backport">backport</a></code> options.
</p>
<h4><a name="supported">What Java 5 classes and methods are supported?</a></h4>
<table border="1" cellspacing="0" cellpadding="5">
<tr><th>Package</th><th>Class</th><th>Methods and fields</th><th>Compatibility notes</th></tr>
<tr><td><code>java.lang.annotation</code></td><td>* (all classes)</td><td>* (all methods)</td><td>&nbsp;</td></tr>
<tr><td><code>java.lang.instrument</code></td><td>* (all classes)</td><td>* (all methods)</td><td>
Bytecode instrumentation is not implemented.</td></tr>
<tr><td><code>java.util.concurrent,<br>java.util.concurrent.atomic,<br>java.util.concurrent.locks</code></td>
<td>almost all classes<sup><a href="#1">1</a></sup></td><td>almost all methods</td>
<td>The <code>LockSupport</code> class may be unusable due to poor efficiency.
The <code>Condition.awaitNanos(long)</code> method has
<td>almost all classes</td><td>almost all methods</td>
<td>
<a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/index.php"> Backport of JSR 166</a><br>
<code>Condition.awaitNanos(long)</code> method is supported but with
<a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/doc/api/edu/emory/mathcs/backport/java/util/concurrent/helpers/Utils.html#awaitNanos(edu.emory.mathcs.backport.java.util.concurrent.locks.Condition, long)">
little</a> accuracy guarantees.</td></tr>
<tr><td rowspan="6"><code>java.io</code></td><td><code>Closeable<sup><a href="#2">2</a></sup></code>
</td><td><code>*</code></td><td>&nbsp;</td></tr>
<tr><td><code>Flushable<sup><a href="#2">2</a></sup></code></td><td><code>*</code></td><td>&nbsp;</td></tr>
very little</a> accuracy guarantees.
</td></tr>
<tr><td rowspan="6"><code>java.io</code></td><td><code>Closeable</code></td><td><code>*</code></td><td>
<code>new Closeable[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>Flushable</code></td><td><code>*</code></td><td>
<code>new Flushable[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>PrintStream</code></td><td>
* (11 new methods and constructors)
<code>append(CharSequence), append(CharSequence, int, int), append(char)</code>
</td><td>&nbsp;</td></tr>
<tr><td><code>PrintWriter</code></td><td>
* (11 new methods and constructors)
</td><td>
The <code>PrintWriter.format</code> and <code>PrintWriter.printf</code> methods always flush the output buffer.
</td></tr>
<code>PrintWriter(File), PrintWriter(File, String), PrintWriter(String), PrintWriter(String, String)</code>
</td><td>&nbsp;</td></tr>
<tr><td><code>Reader</code></td><td><code>read(CharBuffer)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Writer</code></td><td>
<code>append(CharSequence),<br>
append(CharSequence, int, int),<br>
append(char)</code>
<code>append(CharSequence), append(CharSequence, int, int), append(char)</code>
</td><td>&nbsp;</td></tr>
<tr><td rowspan="26"><code>java.lang</code></td><td><code>Appendable<sup><a href="#2">2</a></sup></code></td><td>*
</td><td>&nbsp;</td></tr>
<tr><td><code>Boolean</code></td><td><code>parseBoolean(String),<br>
compareTo(Boolean)</code></td><td>&nbsp;</td></tr>
<tr><td rowspan="24"><code>java.lang</code></td><td><code>Appendable</code></td><td>*
</td><td>
<code>new Appendable[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>Boolean</code></td><td><code>parseBoolean(String), compareTo(Boolean)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Byte</code></td><td><code>valueOf(byte)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Character</code></td><td><code>valueOf(char)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Class</code></td><td>* (21 new methods)</td><td>
<code>Class.getMethod(String, Class...)</code> and <code>Class.getDeclaredMethod(String, Class...)</code>
are intercepted to better support generics and covariant return types
on several platforms<sup><a href="#3">3</a></sup>.
<code>Class.getMethod(String, Class...)</code> and <code>Class.getDeclaredMethod(String, Class...)</code> are
intercepted in advanced mode to better support generics and covariant return types on several JVM implementations.
</td></tr>
<tr><td><code>Deprecated</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Double</code></td><td><code>valueOf(double)</code></td><td>&nbsp;</td></tr>
@@ -404,127 +353,90 @@ and concurrency utilities
IllegalArgumentException(Throwable)</code></td><td>&nbsp;</td></tr>
<tr><td><code>IllegalStateException</code></td><td><code>IllegalStateException(String, Throwable),<br>
IllegalStateException(Throwable)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Integer</code></td><td><code>valueOf(int), signum(int)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Iterable<sup><a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Long</code></td><td><code>valueOf(long), signum(long)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Integer</code></td><td><code>valueOf(int)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Iterable</code></td><td>*</td><td>
<code>new Iterable[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>Long</code></td><td><code>valueOf(long)</code></td><td>&nbsp;</td></tr>
<tr><td><code>Package</code></td><td>* (4 new methods)</td><td>&nbsp;</td></tr>
<tr><td><code>Readable<sup><a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Readable</code></td><td>*</td><td>
<code>new Readable[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>Short</code></td><td><code>valueOf(short)</code></td><td>&nbsp;</td></tr>
<tr><td><code>String</code></td><td><code>contains(CharSequence),<br>
contentEquals(CharSequence),<br>
format(Locale, String, Object...),<br>
format(String, Object...),<br>
replace(CharSequence, CharSequence),<br>
isEmpty()<sup><a href="#4">4</a></sup>
</code></td><td>&nbsp;</td></tr>
<tr><td><code>String</code></td><td><code>contains(CharSequence),<br> contentEquals(CharSequence),<br>
replace(CharSequence, CharSequence)</code></td><td>&nbsp;</td></tr>
<tr><td><code>StringBuffer</code></td><td><code>
StringBuffer(CharSequence),<br>
append(CharSequence),<br>
append(CharSequence, int, int),<br>
insert(int, CharSequence),<br>
insert(int, CharSequence, int, int)
StringBuffer(CharSequence), append(CharSequence), append(CharSequence, int, int),
insert(int, CharSequence), insert(int, CharSequence, int, int)
</code></td><td>&nbsp;</td></tr>
<tr><td><code>StringBuilder</code></td><td>
All methods supported in <code>StringBuffer</code>
</td><td><code>StringBuilder</code> is replaced with <code>StringBuffer</code>.</td></tr>
</td><td><code>StringBuilder</code> is replaced with <code>StringBuffer</code></td></tr>
<tr><td><code>SuppressWarnings</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>System</code></td><td><code>nanoTime()<sup><a href="#1">1</a></sup>,<br> clearProperty(String)</code></td><td>
The <code>System.nanoTime()</code> method precision
<tr><td><code>System</code></td><td><code>nanoTime(), clearProperty(String)</code></td><td>
<a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/index.php"> Backport of JSR 166</a><br>
<code>System.nanoTime()</code> method precision
<a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/doc/api/edu/emory/mathcs/backport/java/util/concurrent/helpers/Utils.html#nanoTime()">
may vary</a> on different platforms.
</td></tr>
<tr><td><code>Thread</code></td><td><code>getStackTrace(),<br> getId()
</code></td><td>The <code>Thread.getStackTrace()</code>
method returns non-empty stack trace only for the current thread.<br>
The <code>Thread.getId()</code> method does not reflect the order in which threads are created.</td></tr>
<tr><td><code>Thread.State</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>ThreadLocal</code></td><td><code>remove()<sup><a href="#3">3</a></sup></code></td>
<td><code>ThreadLocal</code> and <code>InheritableThreadLocal</code>
are replaced by corresponding classes from the runtime library.<sup><a href="#3">3</a></sup>.</td></tr>
<tr><td><code>Thread</code></td><td><code>getStackTrace(), getId()
</code></td><td><code>Thread.getStackTrace()</code> returns non-empty stack trace only for the current thread;<br>
<code>Thread.getId()</code> does not reflect the order in which threads are created.</td></tr>
<tr><td><code>TypeNotPresentException</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td rowspan="2"><code>java.lang.ref</code></td>
<td><code>SoftReference</code></td><td>*</td><td>
<code>SoftReference(Object,ReferenceQueue)</code>
supports <code>null</code> for the second parameter
on all platforms<sup><a href="#3">3</a></sup>.
</td></tr>
<tr><td><code>WeakReference</code></td><td>*</td><td>
<code>WeakReference(Object,ReferenceQueue)</code>
supports <code>null</code> for the second parameter
on all platforms<sup><a href="#3">3</a></sup>.
</td></tr>
<tr><td rowspan="13"><code>java.lang.reflect</code></td>
<td><code>AccessibleObject</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>AnnotatedElement<sup><a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td rowspan="12"><code>java.lang.reflect</code></td><td><code>AnnotatedElement</code></td><td>*</td><td>
<code>new AnnotatedElement[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>Constructor</code></td><td>* (11 new methods)</td><td>&nbsp;</td></tr>
<tr><td><code>Field</code></td><td>* (8 new methods)</td><td>&nbsp;</td></tr>
<tr><td><code>GenericArrayType</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>GenericDeclaration<sup><a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>GenericDeclaration</code></td><td>*</td><td>
<code>new GenericDeclaration[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>GenericSignatureFormatError</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>MalformedParameterizedTypeException</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Method</code></td><td>* (14 new methods)</td><td>&nbsp;</td></tr>
<tr><td><code>ParameterizedType</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Type<sup><a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Type</code></td><td>*</td><td>
<code>new Type[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>TypeVariable</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>WildcardType</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td ><code>java.math</code></td><td><code>BigDecimal</code></td><td>
<code>BigDecimal(int),<br> BigDecimal(long),<br> ZERO, ONE, TEN,<br> divideAndRemainder(BigDecimal),<br>
divideToIntegralValue(BigDecimal),<br> pow(int),<br> remainder(BigDecimal),<br>
toPlainString(),<br> valueOf(double),<br>
valueOf(long)</code></td><td>The <code>BigDecimal.setScale(int, int)</code>
method supports negative scales<sup><a href="#3">3</a></sup>.</td></tr>
<tr><td rowspan="3"><code>java.net</code></td><td><code>URL</code></td>
<td><code>openConnection(Proxy)</code>,<br>
<code>toURI()</code>
</td><td>The <code>Proxy</code> is ignored by the <code>openConnection(Proxy)</code> method.</td></tr>
<tr><td><code>Proxy</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>ProxySelector</code></td><td>*</td><td>&nbsp;</td></tr>
<code>BigDecimal(int), BigDecimal(long), ZERO, ONE, TEN, divideAndRemainder(BigDecimal),
divideToIntegralValue(BigDecimal), pow(int), remainder(BigDecimal), toPlainString(), valueOf(double),
valueOf(long)</code></td><td><code>BigDecimal.setScale(int, int)</code> supports negative scales in advanced mode.</td></tr>
<tr><td ><code>java.rmi.server</code></td><td><code>RemoteObjectInvocationHandler</code></td>
<td>*</td><td>&nbsp;</td></tr>
<tr><td ><code>java.text</code></td><td><code>DecimalFormat</code></td>
<td><code>isParseBigDecimal()<sup><a href="#3">3</a></sup>,<br>
setParseBigDecimal(boolean)<sup><a href="#3">3</a></sup></code></td><td>
<code>BigDecimal</code> parsing and formatting precision is limited by
<code>java.lang.Double</code> or <code>java.lang.Long</code> precision.
</td></tr>
<tr><td><code>java.util.nio</code></td><td><code>CharBuffer</code></td><td>
<code>append(CharSequence),<br> append(CharSequence, int, int),<br> append(char),<br> read(CharBuffer)</code>
<code>append(CharSequence), append(CharSequence, int, int), append(char), read(CharBuffer)</code>
</td><td>&nbsp;</td></tr>
<tr><td rowspan="10"><code>java.util</code></td><td><code>AbstractQueue<sup><a href="#1">1</a></sup></code></td>
<td>*</td><td>&nbsp;</td></tr>
<tr><td rowspan="9"><code>java.util</code></td><td><code>AbstractQueue</code></td><td>*</td><td>
&nbsp;</td></tr>
<tr><td><code>Arrays</code></td><td>* (21 new methods)</td><td>&nbsp;</td></tr>
<tr><td><code>Collections<sup><a href="#1">1</a></sup></code></td><td>* (13 new methods)<br>
newSetFromMap(Map)<sup><a href="#4">4</a></sup>
</td><td>&nbsp;</td></tr>
<tr><td><code>Collections</code></td><td>* (13 new methods)</td><td>
<a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/index.php"> Backport of JSR 166</a>
</td></tr>
<tr><td><code>EnumMap</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>EnumSet</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Formatter</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>LinkedList</code></td><td>* (5 new methods)</td><td>&nbsp;</td></tr>
<tr><td><code>PriorityQueue<sup><a href="#1">1</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Queue<sup><a href="#1">1</a>,<a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>PriorityQueue</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td><code>Queue</code></td><td>*</td><td>
<code>new Queue[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>UUID</code></td><td>*</td><td>&nbsp;</td></tr>
<tr><td rowspan="3"><code>java.util.regex</code></td><td><code>Matcher</code></td><td>
<code>quoteReplacement(String),<br> toMatchResult()</code></td><td>&nbsp;</td></tr>
<tr><td><code>MatchResult<sup><a href="#2">2</a></sup></code></td><td>*</td><td>&nbsp;</td></tr>
<code>quoteReplacement(String), toMatchResult()</code></td><td>&nbsp;</td></tr>
<tr><td><code>MatchResult</code></td><td>*</td><td>
<code>new MatchResult[...]</code> is replaced with <code>new Object[...]</code>
</td></tr>
<tr><td><code>Pattern</code></td><td><code>quote(String)</code></td><td>&nbsp;</td></tr>
</table>
<p>
<a name="1"><sup>1</sup></a> Supported via the
<a href="http://dcl.mathcs.emory.edu/util/backport-util-concurrent/index.php"> Backport of JSR 166</a>.<br>
<a name="2"><sup>2</sup></a> In most cases this type is being replaced with it's base type.<br>
<a name="3"><sup>3</sup></a> Supported only in advanced mode, i.e. when
the <code><a href="#option_advanced">advanced</a></code> option is specified.<br>
<a name="4"><sup>4</sup></a> Introduced in Java 6, but available only for 1.4 target.<br>
</p>
<h4><a name="extension">How to write an extension for Retrotranslator?</a></h4>
@@ -534,33 +446,23 @@ and concurrency utilities
For example, all references to
<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/EnumSet.html"><code>java.util.EnumSet</code></a>
are replaced with references to
<a href="http://retrotranslator.cvs.sourceforge.net/retrotranslator/Retrotranslator/src/net/sf/retrotranslator/runtime/java/util/EnumSet_.java?view=markup">
<code>net.sf.retrotranslator.runtime.java.util.EnumSet<b>_</b></code></a> (optional trailing underscore) if the latter can be found.
<a href="http://cvs.sourceforge.net/viewcvs.py/retrotranslator/Retrotranslator/src/net/sf/retrotranslator/runtime/java/util/EnumSet_.java?view=markup">
<code>net.sf.retrotranslator.runtime.java.util.EnumSet<b>_</b></code></a> (trailing underscore) if the latter can be found.
But if you replace a whole class that exists in J2SE 1.4 you may encounter interoperability issues with other libraries.
So, for example, support for Java 5 fields, methods, and constructors of
<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html"><code>java.math.BigDecimal</code></a> is placed into
<a href="http://retrotranslator.cvs.sourceforge.net/retrotranslator/Retrotranslator/src/net/sf/retrotranslator/runtime/java/math/_BigDecimal.java?view=markup">
<a href="http://cvs.sourceforge.net/viewcvs.py/retrotranslator/Retrotranslator/src/net/sf/retrotranslator/runtime/java/math/_BigDecimal.java?view=markup">
<code>net.sf.retrotranslator.runtime.java.math.<b>_</b>BigDecimal</code></a> (leading underscore):
</p>
<ul>
<li>For a static field there is a public static field with the same name and type.</li>
<li>For a static method there is a public static method with the same signature.</li>
<li>For an instance method there is a public static method with the same signature
but with an additional first parameter representing the instance.</li>
but with an additional first parameter representing an instance.</li>
<li>For a constructor there is a public static <code>convertConstructorArguments</code> method that
accepts constructor's arguments an returns an argument for a Java 1.4 constuctor.</li>
</ul>
<p>
Another approach for constructor backporting is used by
<a href="http://retrotranslator.cvs.sourceforge.net/retrotranslator/Retrotranslator/src/net/sf/retrotranslator/runtime/java/io/_PrintStream.java?view=markup">
<code>net.sf.retrotranslator.runtime.java.io.<b>_</b>PrintStream</code></a>. There is a public static
<code>createInstanceBuilder</code> method that accepts constructor's arguments an returns an object with public
<code>argument1</code>...<code>argumentN</code> methods and optional public void <code>initialize</code> method.
All <code>argumentX</code> methods provide arguments for a Java 1.4 constuctor and should not have any parameters.
The <code>initialize</code> method has a single parameter for the created instance and may be used for postprocessing.
</p>
<p>
However, if the backported methods require access
to non-public methods or fields of the instance, they cannot be fully handled by Retrotranslator.
@@ -569,13 +471,6 @@ and concurrency utilities
and <code>setSource()</code> of <code>java.beans.PropertyEditorSupport</code> that will work in any environment.
Also this approach cannot be used to replace instance field references.
</p>
<p>
You can put your extensions into packages other than <code>net.sf.retrotranslator.runtime</code>.
For example, specify the following at the command line to make Retrotranslator use
<code>com.mycompany.internal.java.lang._String</code> and to rewrite all references to
<code>com.sun.org.apache.xerces.internal.*</code> with <code>org.apache.xerces.*</code>:<br>
<code>-backport&nbsp;com.mycompany.internal;com.sun.org.apache.xerces.internal:org.apache.xerces</code>
</p>
<p>
If you have written an extension that does not contain copyrighted code, you may send
a <a href="http://sourceforge.net/tracker/?group_id=153566&atid=788281">patch</a>
@@ -586,16 +481,14 @@ and concurrency utilities
<p>
Basically, only classes, methods, and fields listed <a href="#supported">above</a> should work, and other features,
like formatted input, are not supported. Known issues:
like formatted input/output, are not supported. Known issues:
</p>
<ul>
<li>Reflection-based tools may be unable to discover additional classes and methods introduced in Java 5 when running on JRE 1.4.</li>
<li>Some applications enable all features only if they detect Java 5, so you may need to override system properties:<br>
<code>&nbsp;java -Djava.version=1.5.0 -Djava.specification.version=1.5 -Djava.class.version=49.0 ...</code></li>
<li>Translated code running on JRE 5.0 may be incompatible with other Java 5 code when Java 5 API is used.</li>
<li>Reflection on generics and metadata may return incomplete information for dynamically generated classes.</li>
<li>Constants inlined by a compiler and access modifiers are ignored during the verification.</li>
<li>Inherited methods introduced in Java 5 may not work, however upcasting may help in some cases:<br>
<li>Access modifiers and constants inlined by a compiler are ignored during the verification.</li>
<li>Upcasting may help to translate invocations of inherited methods introduced in Java 5: <br>
<code>&nbsp;((Writer) new FileWriter("file.tmp")).append("Hello").close();</code></li>
<li>Serialized objects produced by translated code may be incompatible with JRE 5.0.</li>
</ul>
@@ -625,7 +518,7 @@ and concurrency utilities
Retrotranslator: a Java bytecode transformer that translates Java classes
compiled with JDK 5.0 into classes that can be run on JVM 1.4.
Copyright (c) 2005 - 2007 Taras Puchko
Copyright (c) 2005, 2006 Taras Puchko
All rights reserved.
Redistribution and use in source and binary forms, with or without
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -1,4 +1,4 @@
java -jar retrotranslator-transformer-1.1.0.jar -srcjar ../lib/struts2-core-2.0.3.jar -destjar struts2-core-j4-2.0.3.jar
java -jar retrotranslator-transformer-1.1.0.jar -srcjar ../lib/struts2-api-2.0.3.jar -destjar struts2-api-j4-2.0.3.jar
java -jar retrotranslator-transformer-1.1.0.jar -srcjar ../lib/struts2-extras-2.0.3.jar -destjar struts2-extras-j4-2.0.3.jar
java -jar retrotranslator-transformer-1.1.0.jar -srcjar ../lib/xwork-2.0.0.jar -destjar xwork-j4-2.0.0-RC1.jar
java -jar retrotranslator-transformer-1.0.8.jar -srcjar ../lib/struts2-core-2.0.0.jar -destjar struts2-core-j4-2.0.0.jar
java -jar retrotranslator-transformer-1.0.8.jar -srcjar ../lib/struts2-api-2.0.0.jar -destjar struts2-api-j4-2.0.0.jar
java -jar retrotranslator-transformer-1.0.8.jar -srcjar ../lib/struts2-extras-2.0.0.jar -destjar struts2-extras-j4-2.0.0.jar
java -jar retrotranslator-transformer-1.0.8.jar -srcjar ../lib/xwork-2.0-SNAPSHOT.jar -destjar xwork-j4-2.0-SNAPSHOT.jar
+39 -156
View File
@@ -5,13 +5,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.0.4</version>
<version>2.0.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<packaging>jar</packaging>
<name>Struts 2 Core</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/core/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/core/</developerConnection>
@@ -20,42 +20,29 @@
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0-alpha-1-SNAPSHOT</version>
<executions>
<execution>
<id>unpack-xwork</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>opensymphony</groupId>
<artifactId>xwork</artifactId>
<version>2.0.0</version>
<classifier>sources</classifier>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/xwork-sources</outputDirectory>
</configuration>
</execution>
</executions>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.0</version>
<configuration>
<sourcepath>src/main/java;../../xwork/src/java</sourcepath>
<groups>
<group>
<title>Struts Packages</title>
<packages>org.apache.struts2*</packages>
</group>
<group>
<title>XWork Packages</title>
<packages>com.opensymphony.xwork2*</packages>
</group>
</groups>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>maven-apt-plugin</artifactId>
<configuration>
<A>uri=/struts-tags,tlibVersion=2.2.3,jspVersion=1.2,shortName=s,displayName="Struts Tags",
outFile=${basedir}/src/main/resources/META-INF/struts-tags.tld,
description="To make it easier to access dynamic data;
the Apache Struts framework includes a library of custom tags.
The tags interact with the framework's validation and internationalization features;
to ensure that input is correct and output is localized.
The Struts Tags can be used with JSP FreeMarker or Velocity.",
outTemplatesDir=${basedir}/src/site/resources/tags
<A>uri=/struts-tags,tlibVersion=2.2.3,jspVersion=1.2,shortName=s,displayName="Struts Tags",outFile=${basedir}/src/main/resources/META-INF/struts-tags.tld, description="To make it easier to access dynamic data; the Apache Struts framework includes a library of custom tags. The tags interact with the framework's validation and internationalization features; to ensure that input is correct and output is localized. The Struts Tags can be used with JSP FreeMarker or Velocity."
</A>
<resourceTargetPath>target</resourceTargetPath>
<fork>false</fork>
@@ -77,48 +64,19 @@
</execution>
</executions>
</plugin>
-->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
<configuration>
<sourcepath>${basedir}/src/main/java;${basedir}/target/xwork-sources</sourcepath>
<encoding>UTF-8</encoding>
<groups>
<group>
<title>Struts Packages</title>
<packages>org.apache.struts2*</packages>
</group>
<group>
<title>XWork Packages</title>
<packages>com.opensymphony.xwork2*</packages>
</group>
</groups>
<show>private</show>
<links>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
<link>http://java.sun.com/javaee/5/docs/api/</link>
<link>http://jakarta.apache.org/commons/logging/apidocs/</link>
<link>http://logging.apache.org/log4j/docs/api/</link>
</links>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<!--
<!--
Run the translator for Java 1.4 compatiblity
Sample:
$ cd struts/struts2/
$ mvn clean install -Papps,j4 -Djava14.jar=$JAVA_HOME/../Classes/classes.jar
-->
<id>j4</id>
<build>
@@ -173,86 +131,15 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>alljars</id>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>attach-source</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<sourcepath>${basedir}/src/main/java;${basedir}/target/xwork-sources</sourcepath>
<encoding>UTF-8</encoding>
<groups>
<group>
<title>Struts Packages</title>
<packages>org.apache.struts2*</packages>
</group>
<group>
<title>XWork Packages</title>
<packages>com.opensymphony.xwork2*</packages>
</group>
</groups>
<show>private</show>
<links>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
<link>http://java.sun.com/javaee/5/docs/api/</link>
<link>http://jakarta.apache.org/commons/logging/apidocs/</link>
<link>http://logging.apache.org/log4j/docs/api/</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-source</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>xwork</artifactId>
<version>2.0.0</version>
<version>2.0-RC1</version>
</dependency>
<dependency>
@@ -260,7 +147,7 @@
<artifactId>struts2-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>freemarker</groupId>
<artifactId>freemarker</artifactId>
@@ -286,13 +173,20 @@
<artifactId>ognl</artifactId>
<version>2.6.9</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.0</version>
<optional>true</optional>
</dependency>
<!-- Ajax -->
<dependency>
<groupId>uk.ltd.getahead</groupId>
@@ -411,7 +305,7 @@
</exclusion>
</exclusions>
</dependency-->
<dependency>
<groupId>jmock</groupId>
<artifactId>jmock-cglib</artifactId>
@@ -461,16 +355,5 @@
<scope>test</scope>
</dependency>
<!-- struts-annotations must be in compile scope for maven-apt-plugin to
function correctly. Marking it optional to exclude it from transitive
dependency resolution -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-annotations</artifactId>
<version>1.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
</dependencies>
</project>
@@ -141,10 +141,12 @@ public final class StrutsConstants {
public static final String STRUTS_ACTIONPROXYFACTORY = "struts.actionProxyFactory";
public static final String STRUTS_TEMPLATE_ENGINES = "struts.templateEngines";
public static final String STRUTS_TAG_LIBRARIES = "struts.tagLibraries";
public static final String STRUTS_FREEMARKER_WRAPPER_ALT_MAP = "struts.freemarker.wrapper.altMap";
/** The name of the xwork converter implementation */
public static final String STRUTS_XWORKCONVERTER = "struts.xworkConverter";
public static final String STRUTS_ALWAYS_SELECT_FULL_NAMESPACE = "struts.mapper.alwaysSelectFullNamespace";
}
@@ -20,8 +20,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -89,18 +87,35 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
}
@StrutsTagAttribute(description="Topic that will trigger the remote call")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setListenTopics(java.lang.String)
*/
public void setListenTopics(String listenTopics) {
this.listenTopics = listenTopics;
}
@StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.")
/**
* The theme to use for the element. <b>This tag will usually use the ajax
* theme.</b>
*
* @s.tagattribute required="false" type="String"
*/
public void setTheme(String theme) {
super.setTheme(theme);
}
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setHref(java.lang.String)
*/
public void setHref(String href) {
this.href = href;
}
@StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setErrorText(java.lang.String)
*/
public void setErrorText(String errorText) {
this.errorText = errorText;
}
@@ -122,45 +137,59 @@ public abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements
}
@StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setExecuteScripts(java.lang.String)
*/
public void setExecuteScripts(String executeScripts) {
this.executeScripts = executeScripts;
}
@StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setLoadingText(java.lang.String)
*/
public void setLoadingText(String loadingText) {
this.loadingText = loadingText;
}
@StrutsTagAttribute(description="Javascript function name that will make the request")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setHandler(java.lang.String)
*/
public void setHandler(String handler) {
this.handler = handler;
}
@StrutsTagAttribute(description="Function name used to filter the fields of the form.")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setFormFilter(java.lang.String)
*/
public void setFormFilter(String formFilter) {
this.formFilter = formFilter;
}
@StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setFormId(java.lang.String)
*/
public void setFormId(String formId) {
this.formId = formId;
}
@StrutsTagAttribute(description="Topics that will published when the remote call completes")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setNotifyTopics(java.lang.String)
*/
public void setNotifyTopics(String notifyTopics) {
this.notifyTopics = notifyTopics;
}
@StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true")
/* (non-Javadoc)
* @see org.apache.struts2.components.RemoteUICallBean#setShowErrorTransportText(java.lang.String)
*/
public void setShowErrorTransportText(String showError) {
this.showErrorTransportText = showError;
}
@StrutsTagAttribute(description="Id of element that will be shown while making request")
public void setIndicator(String indicator) {
this.indicator = indicator;
}
@@ -32,8 +32,6 @@ import javax.servlet.jsp.PageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.Dispatcher;
@@ -112,8 +110,9 @@ import com.opensymphony.xwork2.util.ValueStackFactory;
* <!-- END SNIPPET: example -->
* </pre>
*
* @s.tag name="action" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ActionTag"
* description="Execute an action from within a view"
*/
@StrutsTag(name="action", tldTagClass="org.apache.struts2.views.jsp.ActionTag", description="Execute an action from within a view")
public class ActionComponent extends Component {
private static final Log LOG = LogFactory.getLog(ActionComponent.class);
@@ -133,7 +132,7 @@ public class ActionComponent extends Component {
this.req = req;
this.res = res;
}
/**
* @param actionProxyFactory the actionProxyFactory to set
*/
@@ -245,7 +244,7 @@ public class ActionComponent extends Component {
ValueStack stack = getStack();
// execute at this point, after params have been set
try {
proxy = actionProxyFactory.createActionProxy(namespace, actionName, createExtraContext(), executeResult, true);
if (null != methodName) {
proxy.setMethod(methodName);
@@ -268,27 +267,50 @@ public class ActionComponent extends Component {
}
}
@StrutsTagAttribute(required=true,description="Name of the action to be executed (without the extension suffix eg. .action)")
/**
* the id (if speficied) to put the action under stack's context.
* @s.tagattribute required="false" type="String"
*/
public void setId(String id) {
super.setId(id);
}
/**
* name of the action to be executed (without the extension suffix eg. .action)
* @s.tagattribute required="true" type="String"
*/
public void setName(String name) {
this.name = name;
}
@StrutsTagAttribute(description="Namespace for action to call", defaultValue="namespace from where tag is used")
/**
* namespace for action to call
* @s.tagattribute required="false" type="String" default="namespace from where tag is used"
*/
public void setNamespace(String namespace) {
this.namespace = namespace;
}
@StrutsTagAttribute(description="Whether the result of this action (probably a view) should be executed/rendered", type="Boolean", defaultValue="false")
/**
* whether the result of this action (probably a view) should be executed/rendered
* @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setExecuteResult(boolean executeResult) {
this.executeResult = executeResult;
}
@StrutsTagAttribute(description="Whether the request parameters are to be included when the action is invoked", type="Boolean", defaultValue="false")
/**
* whether the request parameters are to be included when the action is invoked
* @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setIgnoreContextParams(boolean ignoreContextParams) {
this.ignoreContextParams = ignoreContextParams;
}
@StrutsTagAttribute(description="Whether the writer should be flush upon end of action component tag, default to true", type="Boolean", defaultValue="true")
/**
* whether the writer should be flush upon end of action component tag, default to true.
* @s.tagattribute required="false" type="Boolean" default="true"
*/
public void setFlush(boolean flush) {
this.flush = flush;
}
@@ -23,8 +23,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -48,8 +46,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example -->
* </pre>
*
* @s.tag name="actionerror" tld-body-content="empty" tld-tag-class="org.apache.struts2.views.jsp.ui.ActionErrorTag"
* description="Render action errors if they exists"
*/
@StrutsTag(name="actionerror", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.ui.ActionErrorTag", description="Render action errors if they exists")
public class ActionError extends UIBean {
public static final String TEMPLATE = "actionerror";
@@ -23,8 +23,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -46,8 +44,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example -->
* </pre>
*
* @s.tag name="actionmessage" tld-body-content="empty" tld-tag-class="org.apache.struts2.views.jsp.ui.ActionMessageTag"
* description="Render action messages if they exists"
*/
@StrutsTag(name="actionmessage", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.ui.ActionMessageTag", description="Render action messages if they exists")
public class ActionMessage extends UIBean {
private static final String TEMPLATE = "actionmessage";
@@ -23,9 +23,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -76,7 +73,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* <li>data: html or json object when type='load' or type='error'</li>
* <li>type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails</li>
* <li>request: request javascript object, when type='load' or type='error'</li>
* </ul>
* <ul>
* <!-- END SNIPPET: javadoc -->
*
* <p/> <b>Examples</b>
@@ -124,8 +121,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example3 -->
* </pre>
*
*
* @s.tag name="a" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.AnchorTag"
* description="Render a HTML href element that when clicked calls a URL via remote XMLHttpRequest and updates its targets"
*
*/
@StrutsTag(name="a", tldTagClass="org.apache.struts2.views.jsp.ui.AnchorTag", description="Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets")
public class Anchor extends AbstractRemoteCallUIBean {
public static final String OPEN_TEMPLATE = "a";
public static final String TEMPLATE = "a-close";
@@ -152,19 +152,20 @@ public class Anchor extends AbstractRemoteCallUIBean {
addParameter("targets", findString(targets));
}
@StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated")
/**
* The id to assign the component
* @s.tagattribute required="false" type="String"
*/
public void setId(String id) {
super.setId(id);
}
/**
* Comma delimited list of ids of the elements whose content will be updated
* @s.tagattribute required="false" type="String"
*/
public void setTargets(String targets) {
this.targets = targets;
}
@StrutsTagAttribute(name="onLoadJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute after reload")
public void setAfterLoading(String afterLoading) {
this.afterLoading = afterLoading;
}
@StrutsTagAttribute(name="preInvokeJS", description="Deprecated. Use 'notifyTopics'. Javascript code execute before reload")
public void setBeforeLoading(String beforeLoading) {
this.beforeLoading = beforeLoading;
}
}
@@ -27,8 +27,6 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.components.Param.UnnamedParametric;
import org.apache.struts2.util.AppendIteratorFilter;
import org.apache.struts2.util.MakeIterator;
@@ -114,8 +112,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* @see org.apache.struts2.util.AppendIteratorFilter
* @see org.apache.struts2.views.jsp.iterator.AppendIteratorTag
*
* @s.tag name="append" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.iterator.AppendIteratorTag"
* description="Append the values of a list of iterators to one iterator"
*/
@StrutsTag(name="append", tldTagClass="org.apache.struts2.views.jsp.iterator.AppendIteratorTag", description="Append the values of a list of iterators to one iterator")
public class AppendIterator extends Component implements UnnamedParametric {
private static final Log _log = LogFactory.getLog(AppendIterator.class);
@@ -162,7 +161,10 @@ public class AppendIterator extends Component implements UnnamedParametric {
_parameters.add(value);
}
@StrutsTagAttribute(description="The id of which if supplied will have the resultant appended iterator stored under in the stack's context")
/**
* the id of which if supplied will have the resultant appended iterator stored under in the stack's context
* @s.tagattribute required="false"
*/
public void setId(String id) {
super.setId(id);
}
@@ -23,9 +23,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -79,8 +76,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* <li>request: request javascript object, when type='load' or type='error'</li>
* <ul>
*
* @s.tag name="autocompleter" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.AutocompleterTag"
* description="Renders a combobox with autocomplete and AJAX capabilities"
*/
@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
public class Autocompleter extends ComboBox {
public static final String TEMPLATE = "autocompleter";
final private static String COMPONENT_NAME = Autocompleter.class.getName();
@@ -170,90 +168,137 @@ public class Autocompleter extends ComboBox {
return (list != null) ? findValue(list, Object.class) : null;
}
@StrutsTagAttribute(description="Whether autocompleter should make suggestion on the textbox", type="Boolean", defaultValue="false")
/**
* sets if combobox must perform autocomplete
* @s.tagattribute required="false" type="Boolean" default="true"
*/
public void setAutoComplete(String autoComplete) {
this.autoComplete = autoComplete;
}
@StrutsTagAttribute(description="Enable or disable autocompleter", type="Boolean", defaultValue="false")
/**
* sets combobox to enabled or disabled
* @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setDisabled(String disabled) {
this.disabled = disabled;
}
@StrutsTagAttribute(description="Force selection to be one of the options", type="Boolean", defaultValue="false")
/**
* sets if user can enter a value that is not in a list
* @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setForceValidOption(String forceValidOption) {
this.forceValidOption = forceValidOption;
}
@StrutsTagAttribute(description="The URL used to load the options")
/**
* The URL to call to obtain the content
* @s.tagattribute required="false" type="String"
*/
public void setHref(String href) {
this.href = href;
}
@StrutsTagAttribute(description="Delay before making the search", type="Integer", defaultValue="100")
/**
* set delay before making the search
* @s.tagattribute required="false" type="Integer" default="100"
*/
public void setDelay(String searchDelay) {
this.delay = searchDelay;
}
@StrutsTagAttribute(description="how the search must be performed, options are: 'startstring', 'startword' " +
"and 'substring'", defaultValue="stringstart")
/**
* set how the search must be performed, options are: "startstring", "startword" and "substring"
* @s.tagattribute required="false" default="stringstart" type="String"
*/
public void setSearchType(String searchType) {
this.searchType = searchType;
}
@StrutsTagAttribute(description="Dropdown's height in pixels", type="Integer", defaultValue="120")
/**
* set the height of the dropdown in pixels
* @s.tagattribute required="false" default="120" type="Integer"
*/
public void setDropdownHeight(String height) {
this.dropdownHeight = height;
}
@StrutsTagAttribute(description="Dropdown's width", type="Integer", defaultValue="same as textbox")
/**
* set the width of the drodown, by default the same as the combobox
* @s.tagattribute required="false" type="Integer"
*/
public void setDropdownWidth(String width) {
this.dropdownWidth = width;
}
@StrutsTagAttribute(description="Function name used to filter the fields of the form")
/**
* Function name used to filter the fields of the form.
* This function takes as a parameter the element and returns true if the element
* must be included.
* @s.tagattribute required="false" type="String"
*/
public void setFormFilter(String formFilter) {
this.formFilter = formFilter;
}
@StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters")
/**
* Form id whose fields will be serialized and passed as parameters
*
* @s.tagattribute required="false" type="String"
*/
public void setFormId(String formId) {
this.formId = formId;
}
@StrutsTagAttribute(description="Topic that will trigger a reload")
/**
* Topic that will trigger a re-fetch
*
* @s.tagattribute required="false" type="String"
*/
public void setListenTopics(String listenTopics) {
this.listenTopics = listenTopics;
}
@StrutsTagAttribute(description="Topics that will be published when content is reloaded")
/**
* Topic that will be published when content is fetched.
* New Value is passed as parameter.
* @s.tagattribute required="false" type="String"
*/
public void setNotifyTopics(String onValueChangedPublishTopic) {
this.notifyTopics = onValueChangedPublishTopic;
}
@StrutsTagAttribute(description="Id of element that will be shown while request is made")
/**
* Id of element that will be shown while request is made
* @s.tagattribute required="false" type="String"
*/
public void setIndicator(String indicator) {
this.indicator = indicator;
}
@StrutsTagAttribute(description="Minimum number of characters that will force the content to be loaded", type="Integer", defaultValue="3")
/**
* Minimum number of characters that will force the content to be loaded
* @s.tagattribute required="false" type="Integer" default="3"
*/
public void setLoadMinimumCount(String loadMinimumCount) {
this.loadMinimumCount = loadMinimumCount;
}
@StrutsTagAttribute(description="Options will be reloaded everytime a character is typed on the textbox", type="Boolean", defaultValue="true")
/**
* Options will be reloaded everytime a character is typed on the textbox.
* @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setLoadOnTextChange(String loadOnType) {
this.loadOnTextChange = loadOnType;
}
@StrutsTagAttribute(description="Show or hide the down arrow button", type="Boolean", defaultValue="true")
/**
* Show or hide the down arrow button
* @s.tagattribute required="false" type="Boolean" default="true"
*/
public void setShowDownArrow(String showDownArrow) {
this.showDownArrow = showDownArrow;
}
// Override as not required
@StrutsTagAttribute(description="Iteratable source to populate from.")
public void setList(String list) {
super.setList(list);
}
}
@@ -24,10 +24,7 @@ import java.io.Writer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.util.OgnlUtil;
@@ -92,24 +89,19 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: examplesdescription -->
*
* @see Param
*
* @s.tag name="bean" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.BeanTag"
* description="Instantiate a JavaBean and place it in the context."
*/
@StrutsTag(name="bean", tldTagClass="org.apache.struts2.views.jsp.BeanTag",
description="Instantiate a JavaBean and place it in the context")
public class Bean extends Component {
protected static Log log = LogFactory.getLog(Bean.class);
protected Object bean;
protected String name;
protected ObjectFactory objectFactory;
public Bean(ValueStack stack) {
super(stack);
}
@Inject
public void setObjectFactory(ObjectFactory objectFactory) {
this.objectFactory = objectFactory;
}
public boolean start(Writer writer) {
boolean result = super.start(writer);
@@ -118,7 +110,7 @@ public class Bean extends Component {
try {
String beanName = findString(name, "name", "Bean name is required. Example: com.acme.FooBean");
bean = objectFactory.buildBean(ClassLoaderUtil.loadClass(beanName, getClass()), stack.getContext());
bean = ObjectFactory.getObjectFactory().buildBean(ClassLoaderUtil.loadClass(beanName, getClass()), stack.getContext());
} catch (Exception e) {
log.error("Could not instantiate bean", e);
@@ -147,8 +139,10 @@ public class Bean extends Component {
OgnlUtil.setProperty(key, value, bean, getStack().getContext());
}
@StrutsTagAttribute(description="The class name of the bean to be instantiated (must respect JavaBean specification)",
required=true)
/**
* the class name of the bean to be instantiated (must respect JavaBean specification)
* @s.tagattribute required="true" type="String"
*/
public void setName(String name) {
this.name = name;
}
@@ -23,9 +23,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -49,8 +46,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example -->
* </pre>
*
*/
@StrutsTag(name="checkbox", tldTagClass="org.apache.struts2.views.jsp.ui.CheckboxTag", description="Render a checkbox input field")
* @s.tag name="checkbox" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.CheckboxTag"
* description="Render a checkbox input field"
*/
public class Checkbox extends UIBean {
final public static String TEMPLATE = "checkbox";
@@ -76,7 +74,10 @@ public class Checkbox extends UIBean {
return Boolean.class; // for checkboxes, everything needs to end up as a Boolean
}
@StrutsTagAttribute(description="The actual HTML value attribute of the checkbox.", defaultValue="true")
/**
* The actual HTML value attribute of the checkbox.
* @s.tagattribute required="false" default="'true'"
*/
public void setFieldValue(String fieldValue) {
this.fieldValue = fieldValue;
}
@@ -23,8 +23,6 @@ package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import com.opensymphony.xwork2.util.ValueStack;
/**
@@ -42,8 +40,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example -->
* </pre>
*
*/
@StrutsTag(name="checkboxlist", tldTagClass="org.apache.struts2.views.jsp.ui.CheckboxListTag", description="Render a list of checkboxes")
* @s.tag name="checkboxlist" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.CheckboxListTag"
* description="Render a list of checkboxes"
*/
public class CheckboxList extends ListUIBean {
final public static String TEMPLATE = "checkboxlist";
@@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.util.ValueStack;
@@ -45,7 +44,10 @@ public abstract class ClosingUIBean extends UIBean {
public abstract String getDefaultOpenTemplate();
@StrutsTagAttribute(description="Set template to use for opening the rendered html.")
/**
* Set template to use for opening the rendered html.
* @s.tagattribute required="false"
*/
public void setOpenTemplate(String openTemplate) {
this.openTemplate = openTemplate;
}
@@ -27,8 +27,6 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.util.MakeIterator;
import com.opensymphony.xwork2.util.ValueStack;
@@ -87,8 +85,9 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: example -->
* </pre>
*
*/
@StrutsTag(name="combobox", tldTagClass="org.apache.struts2.views.jsp.ui.ComboBoxTag", description="Widget that fills a text box from a select")
* @s.tag name="combobox" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.ComboBoxTag"
* description="Widget that fills a text box from a select"
*/
public class ComboBox extends TextField {
final public static String TEMPLATE = "combobox";
@@ -166,33 +165,50 @@ public class ComboBox extends TextField {
"Example: people or people.{name}");
}
@StrutsTagAttribute(description="Iteratable source to populate from. " +
"If this is missing, the select widget is simply not displayed.", required=true)
/**
* Iteratable source to populate from. If this is missing, the select widget is simply not displayed.
* @s.tagattribute required="true"
*/
public void setList(String list) {
this.list = list;
}
@StrutsTagAttribute(description="Decide if an empty option is to be inserted. Default false.")
/**
* Decide if an empty option is to be inserted. Default false.
* @s.tagattribute required="false"
*/
public void setEmptyOption(String emptyOption) {
this.emptyOption = emptyOption;
}
@StrutsTagAttribute(description="Set the header key for the header option.")
/**
* set the header key for the header option.
* @s.tagattribute required="false"
*/
public void setHeaderKey(String headerKey) {
this.headerKey = headerKey;
}
@StrutsTagAttribute(description="Set the header value for the header option.")
/**
* set the header value for the header option.
* @s.tagattribute required="false"
*/
public void setHeaderValue(String headerValue) {
this.headerValue = headerValue;
}
@StrutsTagAttribute(description="Set the key used to retrive the option key.")
/**
* set the key used to retrive the option key.
* @s.tagattribute required="false"
*/
public void setListKey(String listKey) {
this.listKey = listKey;
}
@StrutsTagAttribute(description="Set the value used to retrive the option value.")
/**
* set the value used to retrive the option value.
* @s.tagattribute required="false"
*/
public void setListValue(String listValue) {
this.listValue = listValue;
}
@@ -31,7 +31,6 @@ import java.util.Stack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -40,6 +39,9 @@ import org.apache.struts2.views.jsp.TagUtils;
import org.apache.struts2.views.util.ContextUtil;
import org.apache.struts2.views.util.UrlHelper;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.TextParseUtil;
@@ -451,7 +453,10 @@ public class Component {
return id;
}
@StrutsTagAttribute(description="id for referencing element. For UI and form tags it will be used as HTML id attribute")
/**
* id for referencing element. For UI and form tags it will be used as HTML id attribute
* @s.tagattribute required="false"
*/
public void setId(String id) {
if (id != null) {
this.id = findString(id);
@@ -30,8 +30,6 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.TextProvider;
@@ -137,8 +135,10 @@ import com.opensymphony.xwork2.util.ValueStack;
*
* <code>Date</code>
*
* @s.tag name="date" tld-body-content="empty"
* tld-tag-class="org.apache.struts2.views.jsp.DateTag"
* description="Render a formatted date."
*/
@StrutsTag(name="date", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.DateTag", description="Render a formatted date.")
public class Date extends Component {
private static final Log LOG = LogFactory.getLog(Date.class);
@@ -336,12 +336,20 @@ public class Date extends Component {
return super.end(writer, "");
}
@StrutsTagAttribute(description="Date or DateTime format pattern", rtexprvalue=false)
/**
* Date or DateTime format pattern
*
* @s.tagattribute required="false" rtexprvalue="false"
*/
public void setFormat(String format) {
this.format = format;
}
@StrutsTagAttribute(description="Whether to print out the date nicely", type="Boolean", defaultValue="false")
/**
* Whether to print out the date nicely
*
* @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setNice(boolean nice) {
this.nice = nice;
}
@@ -353,7 +361,11 @@ public class Date extends Component {
return name;
}
@StrutsTagAttribute(description="The date value to format", required=true)
/**
* The date value to format
*
* @s.tagattribute required="true" type="String"
*/
public void setName(String name) {
this.name = name;
}

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