Compare commits

..

265 Commits

Author SHA1 Message Date
Lukasz Lenart 12cc861875 [maven-release-plugin] prepare release STRUTS_2_5_4 2016-10-06 21:03:54 +02:00
Lukasz Lenart adeda4788b WW-4572 Updates JavaDocs 2016-10-06 20:56:34 +02:00
Lukasz Lenart bb403720ac WW-4572 Reverts ParameterAware interface to its previous version and introduces new one 2016-10-06 20:51:19 +02:00
Lukasz Lenart 67541e07a7 [maven-release-plugin] prepare for next development iteration 2016-10-05 07:44:55 +02:00
Lukasz Lenart c6a0ea2dcd [maven-release-plugin] prepare release STRUTS_2_5_3 2016-10-05 07:44:33 +02:00
Lukasz Lenart a8115aef2e Drops reference to struts2-portlet example app 2016-10-05 07:39:13 +02:00
Lukasz Lenart 29d470ad42 WW-4695 Upgrades Commons Collections to version 4.1 2016-10-01 10:06:29 +02:00
cnenning 9b38ad8fcf WW-4628: proper decoding of parameters in query-string 2016-09-28 13:09:40 +02:00
Lukasz Lenart 50328ffe1a Fixes issues in config-browse plugin 2016-09-28 11:32:14 +02:00
Lukasz Lenart 9ee5c4e6ef WW-4676 Extends ConversionErrorInterceptor with MethodFilterInterceptor 2016-09-28 10:37:27 +02:00
Lukasz Lenart 6c2ff6f153 Fixes failing test 2016-09-28 10:36:39 +02:00
gregh3269 6b22901814 ConversionErrorInterceptor to extend MethodFilterIntercept
See WW-4676
2016-09-28 10:36:39 +02:00
gregh3269 d9fe1406ee Revert "WW-4628: proper decoding of parameters in query-string"
This reverts commit ef9c66118e.
2016-09-28 10:36:39 +02:00
gregh3269 1617940138 Add java doc for MethodFilterInterceptor 2016-09-28 10:36:39 +02:00
gregh3269 d73a8471a6 ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 2016-09-28 10:36:39 +02:00
Lukasz Lenart cf676d9244 Fixes failing test 2016-09-28 10:35:06 +02:00
cnenning e7ce5dcc0d WW-4631: unified behavior for empty url parameters 2016-09-23 11:33:19 +02:00
Lukasz Lenart 6916f47c97 WW-4677 Ignores locale set to null 2016-09-20 17:04:38 +02:00
Lukasz Lenart b3a9c9d233 WW-4690 Defines version for jshint plugin 2016-09-19 10:23:17 +02:00
Lukasz Lenart ea92e95461 WW-4677 Exyends LocaleProvider to be used to validate Locale 2016-09-19 09:45:16 +02:00
Stefaan Dutry ef1754710d WW-4690 added version to jshint-maven-plugin 2016-09-18 09:31:37 +02:00
Lukasz Lenart c570a2b2bd WW-4679 Handles empty space in path 2016-09-16 16:45:27 +02:00
Lukasz Lenart 459e198022 WW-4674 Uses the same logic as in Dispatcher to control handling exception 2016-09-16 16:31:17 +02:00
Stefaan Dutry 45c113eaa9 replaced constants for marking status with enum 2016-09-16 08:17:38 +02:00
Stefaan Dutry 7873eb910e updated javadoc after changing to enum 2016-09-15 19:26:12 +02:00
Lukasz Lenart ac10fa9cf5 WW-4688 Excludes "java.ext.dirs" when scanning for actions 2016-09-14 08:17:24 +02:00
Lukasz Lenart 7605c1641c WW-4686 Renames packages in xml 2016-09-12 09:07:41 +02:00
Lukasz Lenart 41c97636e5 WW-4686 Cleans up code and uses Enum 2016-09-12 08:42:40 +02:00
Lukasz Lenart 07bb62ba8f WW-4686 Merges two implementations of I18N interceptor 2016-09-12 08:15:53 +02:00
Lukasz Lenart a5f3bdd147 WW-4685 Uses dedicated prefixes to access I18N and Struts internals 2016-09-07 09:27:43 +02:00
Lukasz Lenart 1bed00d3d7 WW-4685 Supports evaluating expressions from tiles definitions as a Struts values 2016-09-06 21:33:31 +02:00
Lukasz Lenart f6876ce6ce WW-4667 Applies params to all instances of interceptor defined in stack 2016-09-06 09:16:54 +02:00
Lukasz Lenart ab0cb82d31 WW-4667 Applies params to all instances of interceptor defined in stack
# Conflicts:
#	xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
2016-09-06 09:16:48 +02:00
Lukasz Lenart 175c852eef WW-4684 Uses charset and adds some logging 2016-09-05 12:14:12 +02:00
Lukasz Lenart 547718fcc6 WW-4684 Uses Content-Type to perform action based on defined type 2016-09-05 12:02:00 +02:00
Lukasz Lenart 7dbe3ea8bb WW-4663 Checks if expression is null to avoid NPE 2016-09-02 14:00:17 +02:00
Lukasz Lenart 92c54de110 WW-4662 Partially reverts try-with-resources introduced with WW-4515 2016-08-30 08:51:32 +02:00
Lukasz Lenart 18be60fa12 WW-4620 Improves XWorkListPropertyAccessor to against DOS attack 2016-08-30 08:32:33 +02:00
Lukasz Lenart 83e2841451 WW-4681 Fixes freemaker error in checkbox.ftl of css_xhtml template 2016-08-30 08:08:06 +02:00
Lukasz Lenart 6a65b808cb WW-4680 Upgrades Tiles to 3.0.7 version 2016-08-29 09:21:18 +02:00
Marc Michele d32033aa54 Merge pull request #1 from tiv-source/tiv-source-patch-1
Fix freemaker error in checkbox.ftl of css_xhtml template
2016-08-28 21:57:16 +02:00
Marc Michele 6af35c7b9c Fix freemaker error in checkbox.ftl of css_xhtml template
Fix freemaker error when set label position to left on a checkbox tag of a form (Missing brackets).
2016-08-28 21:56:34 +02:00
Lukasz Lenart 7f3defd67d Simplifies when map should be unmodifiable 2016-08-17 16:59:51 +02:00
Lukasz Lenart 1f5c1979d2 Drops unused setter 2016-08-17 16:18:16 +02:00
Lukasz Lenart c1869f4989 Adds double check if resource exists 2016-08-17 16:17:26 +02:00
Lukasz Lenart 17d5e39344 Disables params evaluation when creating results by convention 2016-08-17 16:01:17 +02:00
Lukasz Lenart ea2564d769 Allows modify params on coping 2016-08-17 15:40:24 +02:00
Lukasz Lenart fb527e4f4e Sets proper java target version 2016-08-08 08:51:54 +02:00
gregh3269 607fd00af0 ConversionErrorInterceptor to extend MethodFilterIntercept
See WW-4676
2016-08-04 09:49:44 +01:00
gregh3269 51a49201ad Revert "WW-4628: proper decoding of parameters in query-string"
This reverts commit ef9c66118e.
2016-08-04 08:57:25 +01:00
gregh3269 b6be359b0e Merge remote-tracking branch 'upstream/master' 2016-08-04 08:47:22 +01:00
gregh3269 50fa26533a Add java doc for MethodFilterInterceptor 2016-08-04 08:31:32 +01:00
cnenning ef9c66118e WW-4628: proper decoding of parameters in query-string 2016-08-03 13:02:16 +02:00
gregh3269 5e07b9574c ConversionErrorInterceptor to extend MethodFilterIntercept. See WW-4676 2016-08-03 10:50:44 +01:00
cnenning 7fdc103e8a Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/struts 2016-08-01 15:34:07 +02:00
cnenning a6b3301856 WW-4628: new issues were introduced by last change, restoring old behavior and ignoring new tests 2016-08-01 15:33:21 +02:00
Lukasz Lenart ec9a24ec2a Adds Jenkins build status 2016-08-01 13:33:33 +02:00
cnenning af50018f11 WW-4628: avoid double encoding of url parameters, e.g. when spaces are present in parameter values 2016-08-01 13:09:12 +02:00
Yanming Zhou c7fdf7ffc5 Rename constants name use prefix "xwork"
I think prefix "xwork" better than "struts"
2016-08-01 18:01:16 +08:00
Lukasz Lenart 8b559afc76 Converts value of single parameter 2016-07-31 13:39:37 +02:00
Lukasz Lenart 0b24437ed6 Fixes issue with posting multiple values 2016-07-31 13:39:22 +02:00
Lukasz Lenart 5acc71f7c3 WW-4669 Returns default action/method instead of throwing exception 2016-07-29 10:09:24 +02:00
Lukasz Lenart d19b9eaa82 WW-4671 makes URLValidator case insensitive 2016-07-28 13:09:21 +02:00
Lukasz Lenart 0bd2e70589 WW-4670 Upgrades JFreeChart to the latest version 2016-07-27 08:37:00 +02:00
Lukasz Lenart c6d07d3ab6 WW-4669 Reverts back to default RegEx 2016-07-27 08:28:00 +02:00
Andrea Ligios 1643568095 Change to the documentation
To make it clear that the behavior is not limited to validation errors, but also extendend to conversion errors and (most important) to action errors, that will be stored and retrieved by the Message Store Interceptor during a redirection, and that will generate an undesired result.
2016-07-25 17:18:04 +02:00
Lukasz Lenart abf7bfa343 WW-4638 Upgrades TestNG and Surefire plugin 2016-07-18 08:01:08 +02:00
victorsosa 7f28bfd2d2 Merge remote-tracking branch 'origin/master' into WW-4638 2016-07-15 08:26:05 -04:00
victorsosa 90ab489c40 update maven-surefire-plugin 2.19.1 2016-07-15 08:19:12 -04:00
Lukasz Lenart 70fdc00f66 Merge remote-tracking branch 'upstream/master' into http-parameters 2016-07-15 10:53:50 +02:00
Lukasz Lenart cdbf697ad8 WW-4652 Fixes concurrency issue in addDefaultResourceBundle 2016-07-15 10:48:36 +02:00
Lukasz Lenart 7f5c8b620d WW-4654 Includes params when bulding URL to action 2016-07-15 10:40:19 +02:00
Lukasz Lenart ca42e4ea56 WW-4653 Drops duplicated source jar deployment 2016-07-15 09:33:53 +02:00
Lukasz Lenart 79beb5679a WW-4653 Drops duplicated source jar deployment 2016-07-15 09:23:58 +02:00
Lukasz Lenart 889e6db562 Updates assemblies 2016-07-14 20:14:11 +02:00
Lukasz Lenart d948a85a8d Drops unused patterns 2016-07-14 20:14:03 +02:00
Lukasz Lenart 7a350b02af WW-4316 Moves archetypes into its own repo 2016-07-14 19:48:15 +02:00
Lukasz Lenart f21a3fd10f WW-4660 Moves example portlet app into struts-examples 2016-07-14 11:47:08 +02:00
Lukasz Lenart 633552d112 Upgrades Log4j2 to the latest version 2016-07-14 09:23:47 +02:00
Lukasz Lenart 8db9d8352f WW-4646 Replaces ASM3 with the latest version of ASM5 2016-07-14 09:18:19 +02:00
Lukasz Lenart a317668213 WW-4601 Hides webconsole when not in devMode 2016-07-08 06:40:01 +02:00
Lukasz Lenart 78f9bac5e7 [maven-release-plugin] prepare for next development iteration 2016-07-07 10:49:08 +02:00
Lukasz Lenart 17e14ef42b [maven-release-plugin] prepare release STRUTS_2_5_2 2016-07-07 10:48:45 +02:00
Lukasz Lenart d75a890482 WW-4655 Cleans up code and uses more user friendly logic to process parameters 2016-07-03 10:55:14 +02:00
Przemek Bruski 39ec62ac35 WW-4652 fixed a concurrency issue in addDefaultResourceBundle 2016-07-01 16:36:36 +02:00
zhouyanming df721885c3 [WW-4620] Improve XWorkListPropertyAccessor to against DOS attack 2016-06-30 15:12:21 +08:00
Lukasz Lenart d06689120d Uses the latest OGNL version 2016-06-29 20:41:57 +02:00
Lukasz Lenart fb92c67d13 Cleans up test 2016-06-29 20:34:03 +02:00
victorsosa 59b0e40e00 merge 2016-06-27 09:59:30 -04:00
victorsosa ad5cc58680 change version surefire-plugin 2016-06-24 10:51:01 -04:00
victorsosa e170ae1feb Merge branch 'master' into WW-4638 2016-06-24 10:49:06 -04:00
victorsosa abdb0a3351 rollback change 2016-06-24 09:48:51 -04:00
victorsosa 0cd7b831e0 Merge branch 'master' of https://github.com/apache/struts into WW-4638
# Conflicts:
#	core/src/main/resources/template/xhtml/controlheader.ftl
#	core/src/main/resources/template/xhtml/styles.css
2016-06-24 09:46:37 -04:00
victorsosa 7c308253ce change maven-surefire-plugin update version 2016-06-24 09:35:05 -04:00
victorsosa 6e07a63797 WW-4650 Json deserialization does not work in 2.5.1
logic need to be changed as accept can be a list; the check need to be
done in the list itself.

Accept:application/json, text/plain, */*
2016-06-24 09:06:52 -04:00
victorsosa b462286589 Merge branch 'apache-master' 2016-06-24 08:26:27 -04:00
victorsosa 4f07433626 Merge branch 'master' of https://github.com/apache/struts into apache-master 2016-06-24 08:25:42 -04:00
Lukasz Lenart cd13846e19 Fixes test and conflicts 2016-06-22 11:10:26 +02:00
Lukasz Lenart f096dd611e Adds test to guard pre-evaulation of name attribute 2016-06-22 11:10:04 +02:00
Lukasz Lenart cfcefcf589 Drops commented out test 2016-06-22 11:04:07 +02:00
Lukasz Lenart 8dfe178585 Uses LocaleProvider and default TextProvider instead of evaluating expression 2016-06-22 11:03:41 +02:00
Lukasz Lenart d5e0fe9207 WW-4648 Upgrades commons-fileupload to the latest version 2016-06-22 10:57:14 +02:00
Przemek Bruski 4eca24631b action parameters should be included when building the URL to action 2016-06-21 16:27:46 +02:00
Przemek Bruski 04c98e7dc9 sync up execution ids with top-level Apache pom, otherwise the sources are deployed twice during release 2016-06-21 16:26:50 +02:00
Przemek Bruski b67bed674a action parameters should be included when building URL to action 2016-06-21 16:19:40 +02:00
Przemek Bruski 516d3d5136 sync up execution ids with top-level Apache pom, otherwise the sources are deployed twice during release 2016-06-21 16:10:29 +02:00
Lukasz Lenart a2de255697 [maven-release-plugin] prepare for next development iteration 2016-06-14 08:07:45 +02:00
Lukasz Lenart e8aa825f21 [maven-release-plugin] prepare release STRUTS_2_5_1 2016-06-14 08:07:24 +02:00
Lukasz Lenart a0fdca138f Improves validation RegEx 2016-06-14 07:02:09 +02:00
Lukasz Lenart 7621c2bc92 WW-4643 Makes set unmodifiable 2016-06-12 19:40:27 +02:00
Lukasz Lenart b866e0e880 WW-4643 Fixes SMI when used with Action-less resutls 2016-06-12 19:38:31 +02:00
Lukasz Lenart 08360cb916 WW-4634 Fixes centre alignment in Velocity tags 2016-06-12 15:48:35 +02:00
Lukasz Lenart 1afb48aa76 WW-4640 Adds more informative message when method is not allowed 2016-06-12 15:41:28 +02:00
Lukasz Lenart ca256a74e9 Inlines constants and drops class 2016-06-12 15:22:45 +02:00
Lukasz Lenart e60119436a WW-4632 Uses proper DTD version 2016-06-12 13:10:49 +02:00
Lukasz Lenart 7da4ef3902 Introduces new callMethod() function to be used to execute actions
(cherry picked from commit b28b78c062)
2016-06-12 13:03:39 +02:00
Lukasz Lenart ce294b48df Drops unneeded method
(cherry picked from commit 3f526d630a)
2016-06-12 13:02:03 +02:00
Lukasz Lenart 04e5e9dde8 Upgrades OGNL to the latest version 2016-06-12 12:54:15 +02:00
Aleksandr Mashchenko e28e5f03a6 Fixes WW-4529 and few other typos 2016-06-11 21:17:01 +03:00
Aleksandr Mashchenko 39cc611d72 WW-4644 - Drops xwork-core from bom 2016-06-11 20:30:05 +03:00
jumiller dd3b80f2be add GlobalAllowedMethods getter to PackageConfig and modified getActionConfig method in ConventionUnknownHandler to reference it 2016-06-10 07:59:27 -06:00
jumiller 0d92fd0ee5 add allowed methods to ActionBuilder 2016-06-09 15:39:23 -06:00
victorsosa a4fc8ae42e update maven-surefire-plugin 2016-06-07 09:25:39 -04:00
victorsosa b59f17f467 maven-surefire-plugin update version 2016-06-07 08:42:07 -04:00
victor sosa 7985fd191a Merge pull request #17 from apache/master
update pull
2016-05-26 19:23:37 -04:00
victor sosa 2a071cc3aa Update controlheader.ftl 2016-05-25 10:49:56 -04:00
victor sosa 4138b2a6f0 Update styles.css 2016-05-25 10:49:11 -04:00
victor sosa 03a90b2308 Update controlheader.ftl 2016-05-25 10:48:46 -04:00
victorsosa bbc3862219 WW-4638
TestNG 6.9.10 dependency error

Fix dependency issue
2016-05-25 10:42:14 -04:00
victorsosa e0b13a5b0b fix test cases 2016-05-25 10:38:37 -04:00
victorsosa 8fea9566a9 fix test cases 2016-05-25 10:36:53 -04:00
victorsosa 2cd28b160e fix test 2016-05-25 09:47:28 -04:00
victorsosa 30b74a3f01 Merge branch 'WW-4634' of github.com:victorsosa/struts into WW-4634 2016-05-25 09:23:39 -04:00
victorsosa dce6d3e110 test fix 2016-05-25 09:23:13 -04:00
victor sosa c70f2409f2 Update styles.css 2016-05-25 08:29:20 -04:00
victorsosa 175d0d42db Add a class .tdInput for future and use align attribute with
class="align-${parameters.align?html}"
2016-05-25 07:52:23 -04:00
Lukasz Lenart 095960b569 Allows empty string as a action name 2016-05-23 17:05:53 +02:00
Lukasz Lenart 9b34a28190 Disallows dot in action name 2016-05-23 16:03:09 +02:00
Lukasz Lenart 880c1d54a4 WW-4558 contentType override ignored for JSONInterceptor 2016-05-22 08:30:27 +02:00
Lukasz Lenart 9ad0dfba1d Merge branch 'master' into http-parameters 2016-05-18 14:57:38 +02:00
victorsosa 9e11b2c2b1 WW-4634 2016-05-17 09:17:35 -04:00
victorsosa d06c71d68e WW-4634 2016-05-17 09:03:27 -04:00
victorsosa ffdacf1b60 WW-4634 2016-05-17 09:00:33 -04:00
victorsosa f9e4a5e676 Merge branch 'master' of github.com:victorsosa/struts 2016-05-17 08:50:50 -04:00
victor sosa b4facc8e06 Merge pull request #15 from apache/master
update pull
2016-05-17 08:39:51 -04:00
victorsosa 6b360108e5 WW-4634 2016-05-17 08:37:13 -04:00
Lukasz Lenart 104bd92b88 WW-4627 Adds unit test to confirm the issue 2016-05-13 08:07:59 +02:00
Lukasz Lenart a44c7bc13d WW-4626 Adds support for .cat domain 2016-05-13 07:43:02 +02:00
Lukasz Lenart dbf744f54b WW-4618 Supports custom redirect types which base on ServletRedirectResult 2016-05-13 07:05:27 +02:00
Lukasz Lenart 27ca165ddb Throws away methods that doesn't match pattern 2016-05-12 15:36:12 +02:00
victorsosa d16aa65098 remove old second contentType parameter 2016-05-06 18:04:04 -04:00
Lukasz Lenart 8b688cc38d Fixes label positioning 2016-05-06 13:04:30 +02:00
Lukasz Lenart 3a78fd1a11 [maven-release-plugin] prepare for next development iteration 2016-05-05 15:21:50 +02:00
victor sosa ca74ac36fc Merge pull request #14 from apache/master
update pull
2016-05-04 10:47:57 -04:00
victor sosa 47cf4ff84b Merge pull request #13 from apache/master
update pull
2016-04-20 14:58:32 -04:00
victor sosa 379b75292e Merge pull request #11 from apache/master
update pull
2016-03-27 14:43:40 -04:00
Lukasz Lenart b48082a811 Fixes test to use HttpParameters instead of Map 2016-03-12 16:14:45 +01:00
Lukasz Lenart 31826bc117 Drops unused import 2016-03-12 16:14:25 +01:00
Lukasz Lenart bb21dbe492 Merge remote-tracking branch 'upstream/master' into http-parameters
Conflicts:
	core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
	core/src/test/java/com/opensymphony/xwork2/interceptor/I18nInterceptorTest.java
	core/src/test/java/com/opensymphony/xwork2/interceptor/ParameterRemoverInterceptorTest.java
	core/src/test/java/org/apache/struts2/interceptor/MessageStoreInterceptorTest.java
	core/src/test/java/org/apache/struts2/interceptor/ServletConfigInterceptorTest.java
	core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
2016-03-12 16:03:42 +01:00
victor sosa 6bb1ec67ad Merge pull request #10 from apache/master
pull update
2016-03-04 18:07:16 -04:00
victor sosa a5d7163939 Merge pull request #9 from victorsosa/easymock_update
Easymock update
2016-03-03 14:41:11 -04:00
victor sosa da8b13a87e Merge pull request #8 from apache/master
update pull
2016-03-03 14:16:11 -04:00
victorsosa 8b8135af79 Merge branch 'ww-4558' of github.com:victorsosa/struts into ww-4558
# Conflicts:
#	plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
2016-02-15 10:37:26 -04:00
victorsosa 2fada1ec05 Merge branch 'ww-4558' of github.com:victorsosa/struts into ww-4558
# Conflicts:
#	plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
2016-02-15 10:35:29 -04:00
victorsosa bab451c6d8 Merge branch 'ww-4558' of github.com:victorsosa/struts into ww-4558
# Conflicts:
#	plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
2016-02-15 10:34:15 -04:00
victorsosa 0d49050381 fix patch WW-4558
contentType override ignored for JSONInterceptor

use of accept parameter st by the interceptor params


Signed-off-by: victorsosa <victor.sosa@peopleware.do>
2016-02-15 10:31:36 -04:00
victorsosa fab687a07e fix patch WW-4558
contentType override ignored for JSONInterceptor

From now on:

The "accept" request header parameter must be "application/json" or
"application/json-rpc"

Also the default encoding is "UTF-8"
2016-02-15 08:28:01 -04:00
Lukasz Lenart abd8c6bfb5 Merge branch 'master' into http-parameters
Conflicts:
	core/src/main/java/com/opensymphony/xwork2/util/CompoundRoot.java
2016-01-19 16:21:00 +01:00
Lukasz Lenart 8b6078570e Simplifies logging 2016-01-19 16:19:20 +01:00
Lukasz Lenart 47c6467fe0 Adds support for I18N 2016-01-19 16:19:20 +01:00
Lukasz Lenart 42628da3c3 Adds support to use Struts' Locale 2016-01-19 16:19:20 +01:00
Lukasz Lenart 4771dfa63d Extracts constants representing expression languages 2016-01-19 16:19:20 +01:00
Lukasz Lenart 6274820e80 Uses existing constants instead of literals 2016-01-19 16:19:20 +01:00
Aleksandr Mashchenko 5eaef08e52 WW-4585 Struts2 Rest plugin doesn't handle JSESSIONID with DMI 2016-01-19 16:19:20 +01:00
Rene Gielen dd849e82f3 WW-4381 - exclude org.olap4j:olap4j for compile, to fix broken builds behind Maven mirror 2016-01-19 16:19:19 +01:00
Rene Gielen 50c95d43de WW-4403 - add JDK 8 profile, disabling JavaDoc lint checker when building with JDK8
(cherry picked from commit 7c4bb7e)
2016-01-19 16:19:19 +01:00
Rene Gielen 4720f46a63 WW-4507 - adjust Tomcat url decoding code to Log4j 2 logging used in Struts 2016-01-19 16:19:19 +01:00
Rene Gielen 76f188406e WW-4507 - clone Tomcat UDecoder and use it for in query string handling
(cherry picked from commit 5421930)
2016-01-19 16:19:19 +01:00
cnenning b0613a60ed increased visibilty of methods and constants for better extensibility 2016-01-19 16:19:19 +01:00
Lukasz Lenart 4e36a54549 Simplifies logic to fetch HttpServletRequest 2016-01-19 16:19:19 +01:00
Lukasz Lenart e53a119c2c Extends logging 2016-01-19 16:19:19 +01:00
Lukasz Lenart 828b237649 Overrides method to use defined base instead of fetching it again 2016-01-19 16:19:19 +01:00
Lukasz Lenart 4c6e51b302 Defines helper method to fetch ActionContext from request 2016-01-19 16:19:19 +01:00
Lukasz Lenart 375faa41d4 Adds missing dependencies to tiles-request 2016-01-19 16:19:19 +01:00
Lukasz Lenart 21a1e8b9a5 Renames class to match pattern used in Tiles 2016-01-19 16:19:18 +01:00
cnenning 8a2f083d5d made methods non static and private, javadoc updates 2016-01-19 16:19:18 +01:00
Lukasz Lenart f6d0e15f6b Migrates tiles-portlet to the same version 2016-01-19 16:19:18 +01:00
Lukasz Lenart 07488866b6 Uses new way to access TileContainer 2016-01-19 16:18:42 +01:00
Lukasz Lenart 9249aacded Adjusts code to Tiles 3 2016-01-19 16:18:42 +01:00
Lukasz Lenart 0737d7281c Adds missing Tiles API dependency 2016-01-19 16:18:42 +01:00
Lukasz Lenart 8d83dc2f96 Ports solution to resolve problem with EL functions 2016-01-19 16:18:42 +01:00
Lukasz Lenart 4e3f950b27 Upgrade Tiles dependencies 2016-01-19 16:18:42 +01:00
Lukasz Lenart bdf4f0b534 Ports solution from 2.3.x branch 2016-01-19 16:18:01 +01:00
Lukasz Lenart adb8a1365c Removes module 2016-01-19 16:18:01 +01:00
Lukasz Lenart 9f665f7b23 Drops Tiles 3 plugin 2016-01-19 16:18:01 +01:00
Lukasz Lenart bdb3b2ec24 WW-3731 Uses import to reduce noise in code 2016-01-19 16:18:01 +01:00
cnenning a35a9a8229 Adds new result 'JSONActionRedirectResult' to json-plugin. Contains tests and example in showcase app. The new result type is intended to be used along with existing JSONValidationInterceptor. It makes it possible to do form validation via ajax and handle form submitting, action execution and redirect evaluation all in one request inside JS context. 2016-01-19 16:18:01 +01:00
Lukasz Lenart 61f9b07a78 Prevents eval expressions at all 2016-01-19 16:18:01 +01:00
Lukasz Lenart 46f3cf24c4 Adds additional pattern to prevent access to getClass method 2016-01-19 16:18:01 +01:00
Victor Sosa c0670209ba Patch WW-3266
getFieldValue() method of ValueStackDataSource uses getDescription() to
get field value may not appropriate
2016-01-19 16:18:00 +01:00
Aleksandr Mashchenko b84fd6fe0c WW-4583 JakartaStreamMultiPartRequest fails on short file name and on empty file input 2016-01-19 16:18:00 +01:00
cnenning 6fd37d86cc added testcase for WW-4312 / #69 2016-01-19 16:18:00 +01:00
Lukasz Lenart dad437bd06 WW-3710 Adds test to proof support for wildcards in <include/> 2016-01-19 16:18:00 +01:00
Victor Sosa fd33dc84a6 Fix for WW-4312
A problem on Iterator tag


and  WW-3010 s:iterator fails to iterate over collections containing
null
2016-01-19 16:18:00 +01:00
Victor Sosa e9bd9453d5 fix conflict 2016-01-19 16:18:00 +01:00
Victor Sosa a446cdacc0 Patch WW-4381
upgrade to jasperreports 6.0

to 6.0.3
2016-01-19 16:18:00 +01:00
victor sosa bccf099c04 Update JasperReportsResult.java 2016-01-19 16:18:00 +01:00
Victor Sosa 8966787499 Patch WW-3945
Set default encoding for JSONResult to UTF-8

Now the default encoding is UTF-8 for JSON as should be.
2016-01-19 16:17:09 +01:00
donghui 49a7fe14d5 make test passed for people not using GMT. 2016-01-19 16:17:09 +01:00
Victor Sosa cee303a4c4 A proper way to close the db connection 2016-01-19 16:17:09 +01:00
Victor Sosa 9420789862 Patch WW-3462
connection open after report generation

Now the connection is close after been used.
2016-01-19 16:17:09 +01:00
Victor Sosa 8d4bb890ab fix for WW-4573
NPE/ concurrent modification exception

using a CopyOnWriteArrayList. This is to keep Memory consistency on the
ValueStack.
2016-01-19 16:17:09 +01:00
Victor Sosa 3a29bc3575 fix for WW-4573
NPE/ concurrent modification exception

using a CopyOnWriteArrayList. This is to keep Memory consistency on the
ValueStack.
2016-01-19 16:17:08 +01:00
victor sosa 8fd4f8cad4 remove empty comments 2016-01-19 16:17:08 +01:00
victor sosa db33d65087 version removed
version removed, it is on the parent already
2016-01-19 16:17:08 +01:00
Victor Sosa 55f1a9a0ba fix for WW-4564
Postback result is rendered as plain-text rather than html form in
Chrome

the response's content type must be set to text/html in order for Chrome
to properly handle the operation.
2016-01-19 16:17:08 +01:00
Victor Sosa 26d8a9eca8 fix for WW-4564
Postback result is rendered as plain-text rather than html form in
Chrome

the response's content type must be set to text/html in order for Chrome
to properly handle the operation.
2016-01-19 16:17:08 +01:00
Victor Sosa 3c372b0696 Fix to ww-4577 and ww-4576
Upgrade OGNL to version 3.1.2
Upgrade to Log4j2 version 2.5
2016-01-19 16:17:08 +01:00
Victor Sosa 680ad75e30 fix for WW-4269
blank double results in NumberFormatException being thrown on sending
JSON in request body
2016-01-19 16:16:03 +01:00
Lukasz Lenart 624d8b0787 WW-4365 Fixes issue with evaluating doubleHeaderValue and doubleHeaderKey
(cherry picked from commit 8bbfb46)
2016-01-19 16:16:03 +01:00
Lukasz Lenart 7038701026 WW-4569 Adds support for .tech 2016-01-19 16:16:03 +01:00
Lukasz Lenart 37445b0ef4 WW-4570 Drops XWork core from min-lib 2016-01-19 16:16:02 +01:00
Lukasz Lenart e901ff68c9 WW-4570 Drops ASM from minimal set of Jars
(cherry picked from commit 90dbf54)
2016-01-19 16:16:02 +01:00
Lukasz Lenart 3573c1be5b WW-4570 Uses proper schema for assembly descriptor
(cherry picked from commit b4a18d0)
2016-01-19 16:16:02 +01:00
Lukasz Lenart da55360868 WW-4570 Defines a minimal jar set to be used by users
(cherry picked from commit 5d26c6c)
2016-01-19 16:16:02 +01:00
Aleksandr Mashchenko aff7a56045 WW-2069 Replaces 'id' and 'name' with 'var'. 2016-01-19 16:16:02 +01:00
Lukasz Lenart f4bf7591ff Fixes dependency clash 2016-01-19 16:16:02 +01:00
Lukasz Lenart 0185a2b9e7 Registers Tiles model 2016-01-19 16:16:02 +01:00
Lukasz Lenart dacc58321d Adds missing header with license 2016-01-19 16:16:02 +01:00
Lukasz Lenart 795d45f867 Updates Portal Tiles integration 2016-01-19 16:16:02 +01:00
Lukasz Lenart e76865aa43 Replaces call to deprecated api 2016-01-19 16:16:02 +01:00
Lukasz Lenart 061a3ba174 Drops unused classes 2016-01-19 16:16:01 +01:00
Lukasz Lenart 443cc659e6 Re-implements tiles integration based on new API 2016-01-19 16:16:01 +01:00
Lukasz Lenart 7feaa854e7 Adds required dependencies 2016-01-19 16:16:00 +01:00
Lukasz Lenart d7897196dc Drops unused method 2015-12-19 12:08:03 +01:00
Lukasz Lenart 278b22a0b4 Renames method to better express its meaning 2015-12-19 12:07:22 +01:00
Lukasz Lenart 059ebc72c2 Updates tests 2015-11-25 19:57:24 +01:00
Lukasz Lenart 60b9d85d44 Adjusts usage of parameters 2015-11-25 19:57:24 +01:00
Lukasz Lenart ce8ac8e3ce Introduces getObject getter to keep compatibility 2015-11-25 19:56:36 +01:00
Lukasz Lenart 3a0bd4caf0 Updates tests 2015-11-25 19:56:36 +01:00
Lukasz Lenart bb096d6415 Fixes test 2015-11-25 19:56:36 +01:00
Lukasz Lenart 9640c2b3a1 Fixes test 2015-11-25 19:56:36 +01:00
Lukasz Lenart 582bb32e4b Adjusts interceptor 2015-11-25 19:56:36 +01:00
Lukasz Lenart c14791a2a0 Fixes test 2015-11-25 19:56:36 +01:00
Lukasz Lenart 48602b899d Fixes test 2015-11-25 19:56:36 +01:00
Lukasz Lenart bb115bef81 Fixes support for checkboxes 2015-11-25 19:56:36 +01:00
Lukasz Lenart 8dc6f77e0b Creates ActionMapping with empty params 2015-11-25 19:56:35 +01:00
Lukasz Lenart bda06c8baa Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart 6fd94e8661 Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart 4b8f7b0680 Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart 1fa8eac8bd Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart b373d6a43a Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart 560f03025f Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart b0a2fbcc07 Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart fcd407cb45 Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart 2c110e2a46 Fixes test 2015-11-25 19:56:35 +01:00
Lukasz Lenart c393a428be Fixes test and cleans up naming 2015-11-25 19:56:35 +01:00
Lukasz Lenart fe1cbc453a Updates test 2015-11-25 19:56:34 +01:00
Lukasz Lenart 8282d60fa5 Adjusts test 2015-11-25 19:56:34 +01:00
Lukasz Lenart 26235599cd Fixes issue with filtering out excluded params 2015-11-25 19:56:34 +01:00
Lukasz Lenart 6ad4f9f018 Updates implementation and fixes test 2015-11-25 19:56:34 +01:00
Lukasz Lenart 5508352ddb Uses HttpParameters class instead of a generic Map 2015-11-25 19:56:34 +01:00
Lukasz Lenart 330a0edf26 Uses the class instead of a Map 2015-11-25 19:56:34 +01:00
Lukasz Lenart 787f2f96eb Introduces new class to represent expression evaluation 2015-11-25 19:56:34 +01:00
Lukasz Lenart 6b20fb51ba Introduces new class to represent HTTP parameters 2015-11-25 19:56:34 +01:00
1373 changed files with 2721 additions and 199425 deletions
+3 -9
View File
@@ -11,6 +11,9 @@
.metadata/
Servers/
#VSCode
.vscode
# OSX
.DS_Store
@@ -22,15 +25,6 @@ Servers/
# Maven
core/target
xwork-core/target
archetypes/struts2-archetype-angularjs/target
archetypes/struts2-archetype-blank/target
archetypes/struts2-archetype-convention/target
archetypes/struts2-archetype-dbportlet/target
archetypes/struts2-archetype-plugin/target
archetypes/struts2-archetype-portlet/target
archetypes/struts2-archetype-starter/target
archetypes/target
plugins/convention/target
plugins/embeddedjsp/target
plugins/osgi/target
+2 -1
View File
@@ -1,7 +1,8 @@
The Apache Struts web framework
-------------------------------
[![Build Status](https://travis-ci.org/apache/struts.svg?branch=master)](https://travis-ci.org/apache/struts)
[![Build Status @ Jenkins](https://builds.apache.org/buildStatus/icon?job=Struts-JDK7-master)](https://builds.apache.org/view/S-Z/view/Struts/job/Struts-JDK7-master/)
[![Build Status @ Travis](https://travis-ci.org/apache/struts.svg?branch=master)](https://travis-ci.org/apache/struts)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
+1 -2
View File
@@ -26,13 +26,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.5</version>
<version>2.5.4</version>
</parent>
<artifactId>struts2-apps</artifactId>
<packaging>pom</packaging>
<name>Struts 2 Webapps</name>
<modules>
<module>portlet</module>
<module>showcase</module>
<module>rest-showcase</module>
</modules>
-22
View File
@@ -1,22 +0,0 @@
README.txt - portlet
This is a simple example of using the portlet API with Struts applications.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
WARNING - Additional configuration required for deployment
Due to difference in portlet container implementations, the portlet
WAR is not ready-to-run. Extract the portlet WAR, and then copy the
contents of apps/portlet/src/main/etc/<your_portal_server>/ into the
WAR's WEB-INF directory.
I18N:
=====
Please note that this project was created with the assumption that it will be run
in an environment where the default locale is set to English. This means that
the default messages defined in package.properties are in English. If the default
locale for your server is different, then rename package.properties to package_en.properties
and create a new package.properties with proper values for your default locale.
-218
View File
@@ -1,218 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<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-apps</artifactId>
<version>2.5</version>
</parent>
<artifactId>struts2-portlet</artifactId>
<packaging>war</packaging>
<name>Struts 2 Portlet Webapp</name>
<profiles>
<profile>
<id>pluto</id>
<build>
<plugins>
<!-- configure maven-war-plugin to use updated web.xml -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
</configuration>
</plugin>
<!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->
<plugin>
<groupId>org.apache.pluto</groupId>
<artifactId>maven-pluto-plugin</artifactId>
<version>1.1.7</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
<webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
<systemProperties>
<systemProperty>
<name>org.apache.pluto.embedded.portletIds</name>
<value>StrutsPortlet</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dwr-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-tiles-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
<version>3.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rat-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<configuration>
<includes>
<include>pom.xml</include>
<include>src/**</include>
</includes>
<excludes>
<exclude>src/main/etc/gridsphere/README-gridsphere.txt</exclude>
<exclude>src/main/etc/gridsphere/struts-portlet</exclude>
<exclude>src/main/etc/jetspeed2/README-jetspeed2.txt</exclude>
<exclude>src/main/etc/jetspeed2/struts-portlet.psml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
-63
View File
@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>struts-portlet</display-name>
<!-- Uncomment/comment this if you need/don't need Spring support -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
<filter>
<filter-name>action2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.apache.struts2.portlet.context.ServletContextHolderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener
</listener-class>
</listener>
<servlet>
<servlet-name>preparator</servlet-name>
<servlet-class>
org.apache.struts2.portlet.context.PreparatorServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>PortletWrapper</servlet-name>
<servlet-class>
org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PortletWrapper</servlet-name>
<url-pattern>/PortletWrapper</url-pattern>
</servlet-mapping>
</web-app>
@@ -1,2 +0,0 @@
Put the empty 'struts-portlet' file in the $CATALINA_HOME/webapps/gridsphere/WEB-INF/CustomPortal/portlets
folder of your Gridsphere installation. You will need to add the gridsphere-ui-tags-2.1.2.jar to your project.
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app-collection>
<portlet-app-def>
<portlet-app id="org.gridlab.gridsphere.provider.portlet.jsr.PortletServlet">
<portlet-name>JSR Portlet Servlet</portlet-name>
<servlet-name>PortletServlet</servlet-name>
</portlet-app>
<concrete-portlet-app id="org.gridlab.gridsphere.provider.portlet.jsr.PortletServlet.1">
<concrete-portlet>
<portlet-name>Portlet Servlet</portlet-name>
<default-locale>en</default-locale>
<language locale="en">
<title>Portlet Servlet</title>
<title-short>Portlet Servlet</title-short>
<description>A JSR Portlet Loader</description>
<keywords>portlet servlet</keywords>
</language>
</concrete-portlet>
</concrete-portlet-app>
</portlet-app-def>
</portlet-app-collection>
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<portlet-group>
<group-name>StrutsPortlet</group-name>
<group-description>StrutsPortlet Example Application</group-description>
<group-visibility>PUBLIC</group-visibility>
<portlet-role-info>
<portlet-class>struts-portlet#StrutsPortlet</portlet-class>
<required-role>USER</required-role>
</portlet-role-info>
</portlet-group>
@@ -1,19 +0,0 @@
<portlet-tabbed-pane>
<portlet-tab label="StrutsPortlet">
<title lang="en">StrutsPortlet Example</title>
<portlet-tabbed-pane style="sub-menu">
<portlet-tab label="strutsportlettab">
<title lang="en">StrutsPortlet Example Application</title>
<table-layout>
<row-layout>
<column-layout>
<portlet-frame label="strutsportlet">
<portlet-class>struts-portlet#StrutsPortlet</portlet-class>
</portlet-frame>
</column-layout>
</row-layout>
</table-layout>
</portlet-tab>
</portlet-tabbed-pane>
</portlet-tab>
</portlet-tabbed-pane>
@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>struts-portlet</display-name>
<!-- Uncomment/comment this if you need/don't need Spring support -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
<filter>
<filter-name>action2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.apache.struts2.portlet.context.ServletContextHolderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.gridlab.gridsphere.provider.portlet.jsr.PortletServlet
</listener-class>
</listener>
<servlet>
<servlet-name>preparator</servlet-name>
<servlet-class>
org.apache.struts2.portlet.context.PreparatorServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>PortletServlet</servlet-name>
<servlet-class>
org.gridlab.gridsphere.provider.portlet.jsr.PortletServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PortletServlet</servlet-name>
<url-pattern>/jsr/struts-portlet</url-pattern>
</servlet-mapping>
</web-app>
@@ -1,3 +0,0 @@
<jboss-app>
<app-name>struts-portlet</app-name>
</jboss-app>
@@ -1,12 +0,0 @@
<portlet-app>
<portlet>
<portlet-name>StrutsPortlet</portlet-name>
<security>
</security>
</portlet>
<portlet>
<portlet-name>StrutsPortlet2</portlet-name>
<security>
</security>
</portlet>
</portlet-app>
@@ -1,3 +0,0 @@
<?xml version="1.0"?>
<jboss-web>
</jboss-web>
@@ -1,11 +0,0 @@
<?xml version="1.0" standalone="yes"?>
<instances>
<instance>
<instance-name>StrutsPortletInstance</instance-name>
<component-ref>StrutsPortlet</component-ref>
</instance>
<instance>
<instance-name>StrutsPortlet2Instance</instance-name>
<component-ref>StrutsPortlet2</component-ref>
</instance>
</instances>
@@ -1,18 +0,0 @@
<pages>
<portal-name>default</portal-name>
<page>
<page-name>struts-portlet</page-name>
<window>
<window-name>StrutsPortletWindow</window-name>
<instance-ref>struts-portlet.StrutsPortlet.StrutsPortletInstance</instance-ref>
<region>left</region>
<height>0</height>
</window>
<window>
<window-name>StrutsPortletWindow2</window-name>
<instance-ref>struts-portlet.StrutsPortlet2.StrutsPortlet2Instance</instance-ref>
<region>right</region>
<height>0</height>
</window>
</page>
</pages>
@@ -1,3 +0,0 @@
<jboss-app>
<app-name>struts-portlet</app-name>
</jboss-app>
@@ -1,12 +0,0 @@
<portlet-app>
<portlet>
<portlet-name>StrutsPortlet</portlet-name>
<security>
</security>
</portlet>
<portlet>
<portlet-name>StrutsPortlet2</portlet-name>
<security>
</security>
</portlet>
</portlet-app>
@@ -1,3 +0,0 @@
<?xml version="1.0"?>
<jboss-web>
</jboss-web>
@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<deployments>
<deployment>
<if-exists>overwrite</if-exists>
<parent-ref>default</parent-ref>
<properties />
<page>
<page-name>StrutsPortlet Example</page-name>
<properties />
<window>
<window-name>StrutsWindow</window-name>
<instance-ref>StrutsPortletInstance</instance-ref>
<region>center</region>
<height>0</height>
</window>
</page>
</deployment>
<deployment>
<if-exists>overwrite</if-exists>
<instance>
<instance-name>StrutsPortletInstance</instance-name>
<component-ref>struts-portlet.StrutsPortlet</component-ref>
</instance>
</deployment>
</deployments>
@@ -1 +0,0 @@
Copy the struts-portlet.psml file to the JETSPEED2_INSTALL_DIR/webapps/jetspeed/WEB-INF/pages directory.
@@ -1,20 +0,0 @@
<page>
<defaults
skin="orange"
layout-decorator="tigris"
portlet-decorator="tigris"
/>
<title>Struts Portlet Example Application</title>
<metadata name="title" xml:lang="en">Struts Portlet Example Application</metadata>
<fragment id="simplest" type="layout" name="jetspeed-layouts::VelocityTwoColumns">
<fragment id="struts-portlet-1" type="portlet" name="struts-portlet::StrutsPortlet">
<property layout="TwoColumns" name="row" value="0" />
<property layout="TwoColumns" name="column" value="0" />
</fragment>
</fragment>
<security-constraints>
<security-constraints-ref>public-view</security-constraints-ref>
</security-constraints>
</page>
@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>struts-portlet</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
<context-param>
<param-name>company_id</param-name>
<param-value>struts.apache.org</param-value>
</context-param>
<filter>
<filter-name>action2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
com.liferay.portal.servlet.PortletContextListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.apache.struts2.portlet.context.ServletContextHolderListener
</listener-class>
</listener>
<servlet>
<servlet-name>StrutsPortlet</servlet-name>
<servlet-class>
com.liferay.portal.servlet.PortletServlet
</servlet-class>
<init-param>
<param-name>portlet-class</param-name>
<param-value>
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher
</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet>
<servlet-name>preparator</servlet-name>
<servlet-class>
org.apache.struts2.portlet.context.PreparatorServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>StrutsPortlet</servlet-name>
<url-pattern>/StrutsPortlet/*</url-pattern>
</servlet-mapping>
</web-app>
@@ -1,39 +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.portlet.example;
import java.util.Map;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class ExampleAction extends ActionSupport {
private String name = "PortletWork Example";
public String getName() {
return name;
}
public Map getRenderParameters() {
return ActionContext.getContext().getParameters();
}
}
@@ -1,50 +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.portlet.example;
import org.apache.struts2.dispatcher.DefaultActionSupport;
import com.opensymphony.xwork2.ActionSupport;
/**
*/
public class FormExample extends DefaultActionSupport {
String firstName = null;
String lastName = null;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String displayResult() {
return "displayResult";
}
}
@@ -1,37 +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.portlet.example;
import org.apache.struts2.portlet.example.model.Name;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
/**
*/
public class FormExampleModelDriven extends ActionSupport implements ModelDriven<Name> {
private Name name = new Name();
public Name getModel() {
return name;
}
}
@@ -1,47 +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.portlet.example;
import com.opensymphony.xwork2.ActionSupport;
/**
*/
public class FormExampleWithValidation extends ActionSupport {
private String firstName = null;
private String lastName = null;
public String input() {
return SUCCESS;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
@@ -1,36 +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.portlet.example;
import com.opensymphony.xwork2.ActionSupport;
/**
*/
public class FormTestAction extends ActionSupport {
private String name = null;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
@@ -1,62 +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.portlet.example;
import javax.portlet.ActionRequest;
import javax.portlet.PortletPreferences;
import org.apache.struts2.portlet.context.PortletActionContext;
import com.opensymphony.xwork2.ActionSupport;
/**
*/
public class SavePrefsAction extends ActionSupport {
private String preferenceOne = null;
private String preferenceTwo = null;
public String getPreferenceOne() {
return preferenceOne;
}
public void setPreferenceOne(String preferenceOne) {
this.preferenceOne = preferenceOne;
}
public String getPreferenceTwo() {
return preferenceTwo;
}
public void setPreferenceTwo(String preferenceTwo) {
this.preferenceTwo = preferenceTwo;
}
public String execute() throws Exception {
ActionRequest req = PortletActionContext.getActionRequest();
PortletPreferences prefs = req.getPreferences();
prefs.setValue("preferenceOne", preferenceOne);
prefs.setValue("preferenceTwo", preferenceTwo);
prefs.store();
return SUCCESS;
}
public String showForm() throws Exception {
PortletPreferences prefs = PortletActionContext.getRequest().getPreferences();
preferenceOne = prefs.getValue("preferenceOne", "not set");
preferenceTwo = prefs.getValue("preferenceTwo", "not set");
return SUCCESS;
}
}
@@ -1,61 +0,0 @@
/*
* 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.portlet.example.eventing;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.portlet.interceptor.PortletRequestAware;
import org.apache.struts2.portlet.interceptor.PortletResponseAware;
import javax.portlet.EventRequest;
import javax.portlet.EventResponse;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
public class ProcessAction extends ActionSupport implements PortletRequestAware, PortletResponseAware {
private PortletRequest request;
private PortletResponse response;
private String name;
public String execute() throws Exception {
if (request instanceof EventRequest) {
EventRequest req = (EventRequest) request;
EventResponse res = (EventResponse) response;
res.setRenderParameter("eventName", (String) req.getEvent().getValue());
return "forward";
} else {
name = request.getParameter("eventName");
}
return SUCCESS;
}
public void setPortletRequest(PortletRequest request) {
this.request = request;
}
public void setPortletResponse(PortletResponse response) {
this.response = response;
}
public String getName() {
return this.name;
}
}
@@ -1,52 +0,0 @@
/*
* 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.portlet.example.eventing;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.portlet.interceptor.PortletResponseAware;
import javax.portlet.ActionResponse;
import javax.portlet.PortletResponse;
import javax.xml.namespace.QName;
public class PublishAction extends ActionSupport implements PortletResponseAware {
private PortletResponse response;
private String name;
public String execute() throws Exception {
if (name != null) {
((ActionResponse) response).setEvent(new QName("http://org.apache.struts2.portlets/events", "name"), name);
addActionMessage("Publishing Event with Parameter name : " + name);
}
return SUCCESS;
}
public void setPortletResponse(PortletResponse response) {
this.response = response;
}
public void setName(String name) {
this.name = name;
}
}
@@ -1,81 +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.portlet.example.fileupload;
import java.io.File;
import org.apache.struts2.dispatcher.DefaultActionSupport;
/**
* File Upload example's action. <code>FileUploadAction</code>
*
*/
public class FileUploadAction extends DefaultActionSupport {
private static final long serialVersionUID = 5156288255337069381L;
private String contentType;
private File upload;
private String fileName;
private String caption;
// since we are using <s:file name="upload" .../> the file name will be
// obtained through getter/setter of <file-tag-name>FileName
public String getUploadFileName() {
return fileName;
}
public void setUploadFileName(String fileName) {
this.fileName = fileName;
}
// since we are using <s:file name="upload" ... /> the content type will be
// obtained through getter/setter of <file-tag-name>ContentType
public String getUploadContentType() {
return contentType;
}
public void setUploadContentType(String contentType) {
this.contentType = contentType;
}
// since we are using <s:file name="upload" ... /> the File itself will be
// obtained through getter/setter of <file-tag-name>
public File getUpload() {
return upload;
}
public void setUpload(File upload) {
this.upload = upload;
}
public String getCaption() {
return caption;
}
public void setCaption(String caption) {
this.caption = caption;
}
public String upload() throws Exception {
return SUCCESS;
}
}
@@ -1,18 +0,0 @@
package org.apache.struts2.portlet.example.model;
public class Name {
private String firstName;
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
@@ -1,58 +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.portlet.example.spring;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import com.opensymphony.xwork2.ActionSupport;
/**
*/
public class SpringAction extends ActionSupport {
private ThingManager thingManager = null;
private String thing = null;
public void setThingManager(ThingManager thingManager) {
this.thingManager = thingManager;
}
public List getThings() {
return thingManager.getThings();
}
public String getThing() {
return thing;
}
public void setThing(String thing) {
this.thing = thing;
}
public String execute() {
if(StringUtils.isNotEmpty(thing)) {
thingManager.addThing(thing);
}
return SUCCESS;
}
}
@@ -1,38 +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.portlet.example.spring;
import java.util.ArrayList;
import java.util.List;
/**
*/
public class ThingManager {
private List things = new ArrayList();
public void addThing(String thing) {
things.add(thing);
}
public List getThings() {
return things;
}
}
-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-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Console name="STDOUT" target="SYSTEM_OUT">
<PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="com.opensymphony.xwork2" level="info"/>
<Logger name="org.apache.struts2" level="info"/>
<Root level="warn">
<AppenderRef ref="STDOUT"/>
</Root>
</Loggers>
</Configuration>
@@ -1,13 +0,0 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<validators>
<field name="firstName">
<field-validator type="requiredstring">
<message>You must enter a first name</message>
</field-validator>
</field>
<field name="lastName">
<field-validator type="requiredstring">
<message>You must enter a last name</message>
</field-validator>
</field>
</validators>
@@ -1,13 +0,0 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<validators>
<field name="firstName">
<field-validator type="requiredstring">
<message>You must enter a first name</message>
</field-validator>
</field>
<field name="lastName">
<field-validator type="requiredstring">
<message>You must enter a last name</message>
</field-validator>
</field>
</validators>
@@ -1,13 +0,0 @@
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<validators>
<field name="firstName">
<field-validator type="requiredstring">
<message>You must enter a first name</message>
</field-validator>
</field>
<field name="lastName">
<field-validator type="requiredstring">
<message>You must enter a last name</message>
</field-validator>
</field>
</validators>
@@ -1,155 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--
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.
-->
<!--
************************************************************
NOTE:
The following configuration file contains the spring bean
configuration needed to run the pluto-portal in memory
mode. Optional services are available which allow
persistence to an rdbms, xml files, etc. . . however,
we strongly recomend that if you are looking at these
advanced features that you consider an enterprise portal
such as Apache Jetspeed.
Service Functions Include:
- Preference Persistence
- User Attribute Persistence
- Portlet Registry
- Page Registry
************************************************************
-->
<bean id="RequiredContainerServices"
name="OptionalContainerServices"
class="org.apache.pluto.driver.services.container.ContainerServicesImpl"
scope="singleton">
<constructor-arg>
<ref bean="PortalContext"/>
</constructor-arg>
<constructor-arg>
<ref bean="DriverConfiguration"/>
</constructor-arg>
</bean>
<bean id="PortalContext"
class="org.apache.pluto.driver.services.container.PortalContextImpl">
<constructor-arg>
<ref bean="DriverConfiguration"/>
</constructor-arg>
</bean>
<!-- ================================================ -->
<!-- The single top element of the configuration tree -->
<!-- ================================================ -->
<bean id="DriverConfiguration"
class="org.apache.pluto.driver.config.impl.DriverConfigurationImpl">
<!-- ===== Portal Services ===== -->
<constructor-arg>
<ref bean="PortalURLParser"/>
</constructor-arg>
<constructor-arg>
<ref bean="PropertyConfigService"/>
</constructor-arg>
<constructor-arg>
<ref bean="RenderConfigService"/>
</constructor-arg>
<constructor-arg>
<ref bean="SupportedModesService"/>
</constructor-arg>
<constructor-arg>
<ref bean="SupportedWindowStatesService"/>
</constructor-arg>
<!-- === Container Services === -->
<constructor-arg>
<ref bean="PortalCallbackService"/>
</constructor-arg>
<!-- Optional Container Services -->
<!--
<property name="portletPreferencesService"><ref bean="PortletPreferencesService"/></property>
<property name="userAttributeService"><ref bean="UserAttributeService"/></property>
-->
</bean>
<!-- ================================================ -->
<!-- The single top element of the administration tree -->
<!-- ================================================ -->
<bean id="AdminConfiguration" class="org.apache.pluto.driver.config.impl.AdminConfigurationImpl">
<property name="renderConfigAdminService">
<ref bean="RenderConfigService"/>
</property>
</bean>
<!-- ================================================ -->
<!-- Portal Services injected into the Configuration -->
<!-- ================================================ -->
<bean id="PortalURLParser"
class="org.apache.pluto.driver.url.impl.PortalURLParserImpl"
factory-method="getParser"
scope="singleton">
</bean>
<bean id="PropertyConfigService"
class="org.apache.pluto.driver.services.impl.resource.PropertyConfigServiceImpl"
scope="singleton">
</bean>
<bean id="RenderConfigService"
class="org.apache.pluto.driver.services.impl.resource.RenderConfigServiceImpl"
scope="singleton">
</bean>
<bean id="SupportedModesService"
class="org.apache.pluto.driver.services.impl.resource.SupportedModesServiceImpl"
scope="singleton">
<constructor-arg>
<ref bean="PropertyConfigService"/>
</constructor-arg>
</bean>
<bean id="SupportedWindowStatesService"
class="org.apache.pluto.driver.services.impl.resource.SupportedWindowStateServiceImpl"
scope="singleton">
<constructor-arg>
<ref bean="PropertyConfigService"/>
</constructor-arg>
</bean>
<!-- ================================================ -->
<!-- Container Services injected into Configuration -->
<!-- ================================================ -->
<bean id="PortalCallbackService"
class="org.apache.pluto.driver.services.container.PortalCallbackServiceImpl"
scope="singleton">
</bean>
</beans>
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="edit" extends="struts-portlet-default"
namespace="/edit">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/index.jsp</result>
</action>
<action name="test"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/test.jsp</result>
</action>
<action name="formExampleEdit"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/edit/formExampleInput.jsp
</result>
</action>
<action name="processFormExampleEdit"
class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/edit/formExampleInput.jsp
</result>
<result name="success">
/edit/processFormExampleForward.action?firstName=${firstName}&amp;lastName=${lastName}
</result>
</action>
<action name="processFormExampleForward"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">
/WEB-INF/edit/formExample.jsp
</result>
</action>
</package>
<package name="editTest" extends="edit" namespace="/edit/dummy/test">
<action name="testAction"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/namespaceTest.jsp</result>
</action>
</package>
</struts>
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="eventing" extends="struts-portlet-default" namespace="/eventing">
<action name="publish" class="org.apache.struts2.portlet.example.eventing.PublishAction">
<result name="success">/WEB-INF/eventing/index.jsp</result>
</action>
<action name="process" class="org.apache.struts2.portlet.example.eventing.ProcessAction">
<result name="success">/WEB-INF/eventing/process.jsp</result>
<result name="forward" type="redirectAction">
<param name="actionName">process</param>
<param name="namespace">/eventing</param>
</result>
</action>
</package>
</struts>
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="help" extends="struts-portlet-default"
namespace="/help">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/help/index.jsp</result>
</action>
</package>
</struts>
@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="tiles" extends="struts-portlet-tiles-default" namespace="/tiles">
<default-action-ref name="index"/>
<action name="index" class="org.apache.struts2.portlet.example.FormExample">
<result type="tiles">formExampleTiles.index</result>
<result name="success" type="tiles">formExampleTiles.index</result>
</action>
<action name="processTilesFreemarkerExample" class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="success" type="tiles">formExampleTiles.freemarker</result>
</action>
<action name="processTilesFreemarkerExample" class="org.apache.struts2.portlet.example.FormExample" method="execute">
<result name="input" type="tiles">formExampleTiles.freemarker</result>
<result name="success" type="tiles">formExampleTiles.freemarkerResult</result>
</action>
</package>
</struts>
@@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="view" extends="struts-portlet-default"
namespace="/view">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/view/index.jsp</result>
</action>
<action name="formExample"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/view/formExampleInput.jsp
</result>
</action>
<action name="processFormExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/view/formExampleInput.jsp
</result>
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
</action>
<action name="formExamplePrg" class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/view/formExampleInputPrg.jsp
</result>
<result name="success" type="redirectAction">
<param name="actionName">formExamplePrg</param>
<param name="method">displayResult</param>
<param name="firstName">${firstName}</param>
<param name="lastName">${lastName}</param>
</result>
<result name="displayResult">
/WEB-INF/view/formExample.jsp
</result>
</action>
<action name="formExampleModelDriven"
class="org.apache.struts2.portlet.example.FormExampleModelDriven">
<result name="input">
/WEB-INF/view/formExampleInputModelDriven.jsp
</result>
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
</action>
<action name="validationExample"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/view/formExampleInputValidation.jsp
</result>
</action>
<action name="processValidationExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
<result name="input">
/WEB-INF/view/formExampleInputValidation.jsp
</result>
</action>
<action name="fileUpload" class="org.apache.struts2.portlet.example.fileupload.FileUploadAction">
<result name="input">
/WEB-INF/view/fileUpload.jsp
</result>
<result name="success">
/WEB-INF/view/fileUploadSuccess.jsp
</result>
</action>
<action name="tokenExample"
class="com.opensymphony.xwork2.ActionSupport" method="input">
<result name="input">
/WEB-INF/view/tokenExampleInput.jsp
</result>
</action>
<action name="processTokenExample"
class="com.opensymphony.xwork2.ActionSupport">
<result name="input">
/WEB-INF/view/tokenExampleInput.jsp
</result>
<result name="invalid.token">
/WEB-INF/view/tokenExampleInput.jsp
</result>
<result name="success">
/WEB-INF/view/tokenExample.jsp
</result>
<interceptor-ref name="portletDefaultStackWithToken" />
</action>
<action name="springExample" class="springAction">
<result name="success">
/WEB-INF/view/springExample.jsp
</result>
</action>
<action name="freeMarkerExample"
class="com.opensymphony.xwork2.ActionSupport" method="input">
<result type="freemarker" name="input">
/WEB-INF/view/freeMarkerExampleInput.ftl
</result>
</action>
<action name="processFreeMarkerExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">/view/processFreeMarkerView.action?firstName=${firstName}&amp;lastName=${lastName}</result>
</action>
<action name="processFreeMarkerView" class="org.apache.struts2.portlet.example.FormExample">
<result type="freemarker" name="success">/WEB-INF/view/freeMarkerExample.ftl</result>
</action>
<action name="velocityHelloWorld" class="com.opensymphony.xwork2.ActionSupport">
<result type="velocity" name="success">/WEB-INF/view/helloWorld.vm</result>
</action>
</package>
</struts>
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<include file="struts-view.xml"/>
<include file="struts-edit.xml"/>
<include file="struts-help.xml"/>
<include file="struts-eventing.xml"/>
<include file="struts-tiles.xml"/>
</struts>
@@ -1,12 +0,0 @@
<div align="center">
<input type="checkbox"
name="$!struts.htmlEncode($parameters.name)"
value="$!struts.htmlEncode($parameters.fieldValue)"
#if ($parameters.nameValue) checked="checked" #end
#if ($parameters.disabled == true) disabled="disabled" #end
#if ($parameters.tabindex) tabindex="$!struts.htmlEncode($parameters.tabindex)" #end
#if ($parameters.onchange) onchange="$!struts.htmlEncode($parameters.onchange)" #end
#if ($parameters.id) id="$!struts.htmlEncode($parameters.id)" #end
/><br />
$!struts.htmlEncode($parameters.label)
</div>
@@ -1,8 +0,0 @@
#set ($name = $parameters.name)
#set ($label = $parameters.label)
#set ($size = $parameters.mysize)
#set ($yearsize = $parameters.yearsize)
$label:
<input type="text" name="${name}.day" size="$size" /> /
<input type="text" name="${name}.month" size="$size" /> /
<input type="text" name="${name}.year" size="$yearsize" /> (dd/mm/yyyy)
@@ -1,15 +0,0 @@
<div align="center">
<input type="text"
name="$!struts.htmlEncode($parameters.name)"
#if ($parameters.size) size="$!struts.htmlEncode($parameters.size)" #end
#if ($parameters.maxlength) maxlength="$!struts.htmlEncode($parameters.maxlength)" #end
#if ($parameters.nameValue) value="$!struts.htmlEncode($parameters.nameValue)" #end
#if ($parameters.disabled == true) disabled="disabled" #end
#if ($parameters.readonly) readonly="readonly" #end
#if ($parameters.onkeyup) onkeyup="$!struts.htmlEncode($parameters.onkeyup)" #end
#if ($parameters.tabindex) tabindex="$!struts.htmlEncode($parameters.tabindex)" #end
#if ($parameters.onchange) onchange="$!struts.htmlEncode($parameters.onchange)" #end
#if ($parameters.id) id="$!struts.htmlEncode($parameters.id)" #end
/><br />
$!struts.htmlEncode($parameters.label)
</div>
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator Config 1.0//EN"
"http://struts.apache.org/dtds/xwork-validator-config-1.0.dtd">
<validators>
<validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>
<validator name="requiredstring" class="com.opensymphony.xwork2.validator.validators.RequiredStringValidator"/>
<validator name="int" class="com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator"/>
<validator name="short" class="com.opensymphony.xwork2.validator.validators.ShortRangeFieldValidator"/>
<validator name="double" class="com.opensymphony.xwork2.validator.validators.DoubleRangeFieldValidator"/>
<validator name="date" class="com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator"/>
<validator name="expression" class="com.opensymphony.xwork2.validator.validators.ExpressionValidator"/>
<validator name="fieldexpression" class="com.opensymphony.xwork2.validator.validators.FieldExpressionValidator"/>
<validator name="email" class="com.opensymphony.xwork2.validator.validators.EmailValidator"/>
<validator name="url" class="com.opensymphony.xwork2.validator.validators.URLValidator"/>
<validator name="visitor" class="com.opensymphony.xwork2.validator.validators.VisitorFieldValidator"/>
<validator name="conversion" class="com.opensymphony.xwork2.validator.validators.ConversionErrorFieldValidator"/>
</validators>
@@ -1 +0,0 @@
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--
- Application context definition for "springapp" DispatcherServlet.
-->
<bean id="thingManager"
class="org.apache.struts2.portlet.example.spring.ThingManager">
</bean>
<bean id="springAction"
class="org.apache.struts2.portlet.example.spring.SpringAction" scope="prototype">
<property name="thingManager">
<ref bean="thingManager" />
</property>
</bean>
</beans>
@@ -1,5 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H1>StrutsPortlet</H1>
This is the default edit page!
<p>
<a href="<s:url value="prefsForm.action"/>">Set some prefs</a>
@@ -1,5 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Hello <s:property value="firstName"/> <s:property value="lastName"/></H2>
<p/>
<a href="<s:url action="index"/>">Back to front page</a>
@@ -1,8 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Input your name</H2>
<s:form action="processFormExampleEdit" method="POST">
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,11 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
There are no examples in edit mode yet
<p/>
<a href="<s:url action="test"/>">Test</a>
<p/>
<a href="<s:url action="formExampleEdit"/>">Form test</a>
<p/>
<a href="<s:url action="/test/testAction" namespace="dummy"/>">Dummy test</a>
<p/>
<a href="<s:url action="index" portletMode="view"/>">Back to view mode</a>
@@ -1,4 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<a href="<s:url action="test"/>">Test page for namespace /edit/test</a>
<p/>
<a href="<s:url action="index"/>">Back to edit index</a>
@@ -1,6 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="prefsFormSave.action" method="POST">
<s:textfield label="Preference one" name="preferenceOne" value="%{preferenceOne}"/>
<s:textfield label="Preference two" name="preferenceTwo" value="%{preferenceTwo}"/>
<s:submit value="Save prefs"/>
</s:form>
@@ -1,5 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
The preferences has been saved.
<a href="<s:url value="index.action"/>">Back</a>
@@ -1,4 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<a href="<s:url action="test"/>">Test page</a>
<p/>
<a href="<s:url action="index"/>">Back to edit index</a>
@@ -1,11 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h2>Input your name</h2>
<s:actionmessage/>
<s:form action="publish" method="POST">
<s:textfield label="Please enter your name" name="name" value="%{name}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,12 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:if test="%{name != null}">
<h2>Welcome <s:property value="name"/></h2>
</s:if>
<s:else>
<h2>Please insert a Name in the Publish Portlet Form</h2>
</s:else>
<s:actionmessage/>
@@ -1 +0,0 @@
This is the default help page!
@@ -1 +0,0 @@
There are no examples in help mode yet
@@ -1,384 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- ===================================================================== -->
<!-- This file contains the default descriptor for web applications. -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- The intent of this descriptor is to include jetty specific or common -->
<!-- configuration for all webapps. If a context has a webdefault.xml -->
<!-- descriptor, it is applied before the contexts own web.xml file -->
<!-- -->
<!-- A context may be assigned a default descriptor by: -->
<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
<!-- + Passed an arg to addWebApplications -->
<!-- -->
<!-- This file is used both as the resource within the jetty.jar (which is -->
<!-- used as the default if no explicit defaults descriptor is set) and it -->
<!-- is copied to the etc directory of the Jetty distro and explicitly -->
<!-- by the jetty.xml file. -->
<!-- -->
<!-- ===================================================================== -->
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
metadata-complete="true"
version="2.5">
<description>
Default web.xml file.
This file is applied to a Web application before it's own WEB_INF/web.xml file
</description>
<!-- ==================================================================== -->
<!-- Context params to control Session Cookies -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- UNCOMMENT TO ACTIVATE
<context-param>
<param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
<param-value>127.0.0.1</param-value>
</context-param>
<context-param>
<param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
<param-value>/</param-value>
</context-param>
<context-param>
<param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
<param-value>-1</param-value>
</context-param>
-->
<context-param>
<param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
<param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar</param-value>
</context-param>
<listener>
<listener-class>
com.bekk.boss.pluto.embedded.jetty.util.OverrideContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
com.bekk.boss.pluto.embedded.util.PortalStartupListener
</listener-class>
</listener>
<filter>
<filter-name>plutoResourceFilter</filter-name>
<filter-class>com.bekk.boss.pluto.embedded.util.PlutResourcesFilter</filter-class>
</filter>
<filter>
<filter-name>plutoPortalDriver</filter-name>
<filter-class>com.bekk.boss.pluto.embedded.util.PlutoPortalDriverFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>plutoResourceFilter</filter-name>
<url-pattern>*.css</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>plutoResourceFilter</filter-name>
<url-pattern>*.gif</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>plutoResourceFilter</filter-name>
<url-pattern>*.png</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>plutoResourceFilter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>plutoPortalDriver</filter-name>
<url-pattern>/pluto/index.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>plutoPortalDriver</filter-name>
<url-pattern>/pluto/index.jsp/*</url-pattern>
</filter-mapping>
<!-- ==================================================================== -->
<!-- The default servlet. -->
<!-- This servlet, normally mapped to /, provides the handling for static -->
<!-- content, OPTIONS and TRACE methods for the context. -->
<!-- The following initParameters are supported: -->
<!-- -->
<!-- acceptRanges If true, range requests and responses are -->
<!-- supported -->
<!-- -->
<!-- dirAllowed If true, directory listings are returned if no -->
<!-- welcome file is found. Else 403 Forbidden. -->
<!-- -->
<!-- redirectWelcome If true, redirect welcome file requests -->
<!-- else use request dispatcher forwards -->
<!-- -->
<!-- gzip If set to true, then static content will be served-->
<!-- as gzip content encoded if a matching resource is -->
<!-- found ending with ".gz" -->
<!-- -->
<!-- resoureBase Can be set to replace the context resource base -->
<!-- -->
<!-- relativeResourceBase -->
<!-- Set with a pathname relative to the base of the -->
<!-- servlet context root. Useful for only serving -->
<!-- static content from only specific subdirectories. -->
<!-- -->
<!-- useFileMappedBuffer -->
<!-- If set to true (the default), a memory mapped -->
<!-- file buffer will be used to serve static content -->
<!-- when using an NIO connector. Setting this value -->
<!-- to false means that a direct buffer will be used -->
<!-- instead. If you are having trouble with Windows -->
<!-- file locking, set this to false. -->
<!-- -->
<!-- cacheControl If set, all static content will have this value -->
<!-- set as the cache-control header. -->
<!-- -->
<!-- maxCacheSize Maximum size of the static resource cache -->
<!-- -->
<!-- maxCachedFileSize Maximum size of any single file in the cache -->
<!-- -->
<!-- maxCachedFiles Maximum number of files in the cache -->
<!-- -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
<init-param>
<param-name>acceptRanges</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>dirAllowed</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>redirectWelcome</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>maxCacheSize</param-name>
<param-value>4000000</param-value>
</init-param>
<init-param>
<param-name>maxCachedFileSize</param-name>
<param-value>254000</param-value>
</init-param>
<init-param>
<param-name>maxCachedFiles</param-name>
<param-value>1000</param-value>
</init-param>
<init-param>
<param-name>gzip</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>true</param-value>
</init-param>
<!--
<init-param>
<param-name>cacheControl</param-name>
<param-value>max-age=3600,public</param-value>
</init-param>
-->
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<!-- ==================================================================== -->
<!-- JSP Servlet -->
<!-- This is the jasper JSP servlet from the jakarta project -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- The JSP page compiler and execution servlet, which is the mechanism -->
<!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
<!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- checkInterval If development is false and reloading is true, -->
<!-- background compiles are enabled. checkInterval -->
<!-- is the time in seconds between checks to see -->
<!-- if a JSP page needs to be recompiled. [300] -->
<!-- -->
<!-- compiler Which compiler Ant should use to compile JSP -->
<!-- pages. See the Ant documenation for more -->
<!-- information. [javac] -->
<!-- -->
<!-- classdebuginfo Should the class file be compiled with -->
<!-- debugging information? [true] -->
<!-- -->
<!-- classpath What class path should I use while compiling -->
<!-- generated servlets? [Created dynamically -->
<!-- based on the current web application] -->
<!-- Set to ? to make the container explicitly set -->
<!-- this parameter. -->
<!-- -->
<!-- development Is Jasper used in development mode (will check -->
<!-- for JSP modification on every access)? [true] -->
<!-- -->
<!-- enablePooling Determines whether tag handler pooling is -->
<!-- enabled [true] -->
<!-- -->
<!-- fork Tell Ant to fork compiles of JSP pages so that -->
<!-- a separate JVM is used for JSP page compiles -->
<!-- from the one Tomcat is running in. [true] -->
<!-- -->
<!-- ieClassId The class-id value to be sent to Internet -->
<!-- Explorer when using <jsp:plugin> tags. -->
<!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
<!-- -->
<!-- javaEncoding Java file encoding to use for generating java -->
<!-- source files. [UTF-8] -->
<!-- -->
<!-- keepgenerated Should we keep the generated Java source code -->
<!-- for each page instead of deleting it? [true] -->
<!-- -->
<!-- logVerbosityLevel The level of detailed messages to be produced -->
<!-- by this servlet. Increasing levels cause the -->
<!-- generation of more messages. Valid values are -->
<!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
<!-- [WARNING] -->
<!-- -->
<!-- mappedfile Should we generate static content with one -->
<!-- print statement per input line, to ease -->
<!-- debugging? [false] -->
<!-- -->
<!-- -->
<!-- reloading Should Jasper check for modified JSPs? [true] -->
<!-- -->
<!-- suppressSmap Should the generation of SMAP info for JSR45 -->
<!-- debugging be suppressed? [false] -->
<!-- -->
<!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
<!-- dumped to a file? [false] -->
<!-- False if suppressSmap is true -->
<!-- -->
<!-- scratchdir What scratch directory should we use when -->
<!-- compiling JSP pages? [default work directory -->
<!-- for the current web application] -->
<!-- -->
<!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
<!-- -->
<!-- xpoweredBy Determines whether X-Powered-By response -->
<!-- header is added by generated servlet [false] -->
<!-- -->
<!-- If you wish to use Jikes to compile JSP pages: -->
<!-- Set the init parameter "compiler" to "jikes". Define -->
<!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
<!-- to cause Jikes to emit error messages in a format compatible with -->
<!-- Jasper. -->
<!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
<!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet id="jsp">
<servlet-name>jsp</servlet-name>
<servlet-class>com.bekk.boss.pluto.embedded.util.PortletJspServlet</servlet-class>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>DEBUG</param-value>
</init-param>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<!--
<init-param>
<param-name>classpath</param-name>
<param-value>?</param-value>
</init-param>
-->
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.jspf</url-pattern>
<url-pattern>*.jspx</url-pattern>
<url-pattern>*.xsp</url-pattern>
<url-pattern>*.JSP</url-pattern>
<url-pattern>*.JSPF</url-pattern>
<url-pattern>*.JSPX</url-pattern>
<url-pattern>*.XSP</url-pattern>
</servlet-mapping>
<!-- ==================================================================== -->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- ==================================================================== -->
<!-- Default MIME mappings -->
<!-- The default MIME mappings are provided by the mime.properties -->
<!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->
<!-- mappings may be specified here -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- UNCOMMENT TO ACTIVATE
<mime-mapping>
<extension>mysuffix</extension>
<mime-type>mymime/type</mime-type>
</mime-mapping>
-->
<!-- ==================================================================== -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- ==================================================================== -->
<locale-encoding-mapping-list>
<locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>
</locale-encoding-mapping-list>
</web-app>
@@ -1,214 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
id="struts-portlet"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
>
<portlet id="StrutsPortlet">
<description xml:lang="EN">Struts Test Portlet</description>
<portlet-name>StrutsPortlet</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<!-- The default action to invoke in help mode. -->
<init-param>
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>My Struts2 Portlet</title>
<short-title>SP2</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet id="StrutsPortlet2">
<description xml:lang="EN">Struts Test Portlet with JSR 286 Dispatcher</description>
<portlet-name>StrutsPortlet2</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet with JSR 286 Dispatcher</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<!-- The default action to invoke in help mode. -->
<init-param>
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>My Struts2 Portlet with JSR 286 Dispatcher</title>
<short-title>SP2JSR286</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet id="Struts2PublishPortlet">
<description xml:lang="EN">Struts2 Publish Portlet</description>
<portlet-name>Struts2PublishPortlet</portlet-name>
<display-name xml:lang="EN">Struts2 Publish Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/eventing</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>publish</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>Struts2 Publish Portlet</title>
<short-title>S2PUB</short-title>
<keywords>struts,publish,portlet</keywords>
</portlet-info>
<supported-publishing-event xmlns:x="http://org.apache.struts2.portlets/events">
<qname>x:name</qname>
</supported-publishing-event>
</portlet>
<portlet id="Struts2ProcessPortlet">
<description xml:lang="EN">Struts2 Process Portlet</description>
<portlet-name>Struts2ProcessPortlet</portlet-name>
<display-name xml:lang="EN">Struts2 Process Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher</portlet-class>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/eventing</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>process</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>Struts2 Process Portlet</title>
<short-title>S2PRO</short-title>
<keywords>struts,process,portlet</keywords>
</portlet-info>
<supported-processing-event xmlns:x="http://org.apache.struts2.portlets/events">
<qname>x:name</qname>
</supported-processing-event>
</portlet>
<event-definition>
<qname xmlns:x="http://org.apache.struts2.portlets/events">x:name</qname>
<value-type>java.lang.String</value-type>
</event-definition>
</portlet-app>
@@ -1,10 +0,0 @@
Configurations:
JBoss Portal specific configuration files
-----------------------------------------
jboss-app.xml
jboss-portlet.xml
jboss-web.xml
portlet-instances.xml
struts-example-object.xml
struts-example-pages.xml
@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
-->
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<definition name="formExampleTiles.index" template="/WEB-INF/tiles/layout.jsp">
<put-attribute name="title" value="Portlet Tiles FormExample"/>
<put-attribute name="header" value="/WEB-INF/tiles/header.jsp"/>
<put-attribute name="body" value="/WEB-INF/tiles/index.jsp"/>
<put-attribute name="footer" value="/WEB-INF/tiles/footer.jsp"/>
</definition>
<definition name="formExampleTiles.freemarker" extends="formExampleTiles.index">
<put-attribute name="title" value="Portlet Tiles/Freemarker FormExample"/>
<put-attribute name="body" value="/WEB-INF/tiles/formExampleInputValidation.jsp"/>
</definition>
<definition name="formExampleTiles.freemarkerResult" extends="formExampleTiles.freemarker">
<put-attribute name="body" value="/WEB-INF/tiles/formExample.jsp"/>
</definition>
</tiles-definitions>
@@ -1,13 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h1>Fileupload sample</h1>
<s:actionerror />
<s:fielderror />
<s:form action="fileUpload" method="POST" enctype="multipart/form-data">
<s:file name="upload" label="File"/>
<s:textfield name="caption" label="Caption"/>
<s:submit />
</s:form>
@@ -1,14 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h1>Fileupload sample</h1>
<p>
<ul>
<li>ContentType: <s:property value="uploadContentType" /></li>
<li>FileName: <s:property value="uploadFileName" /></li>
<li>File: <s:property value="upload" /></li>
<li>Caption:<s:property value="caption" /></li>
</ul>
</p>
@@ -1,5 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Hello <s:property value="firstName"/> <s:property value="lastName"/></H2>
<p/>
<a href="<s:url action="index"/>">Back to front page</a>
@@ -1,8 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Input your name</H2>
<s:form action="processFormExample" method="POST">
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,8 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Input your name</H2>
<s:form action="formExampleModelDriven" method="POST">
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,8 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Input your name</H2>
<s:form action="formExamplePrg" method="POST">
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,8 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<link rel="stylesheet" type="text/css" href="<s:url value="/styles/styles.css"/>">
<H2>Input your name</H2>
<s:form action="processValidationExample" method="POST">
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,6 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Hello <s:property value="firstName"/> <s:property value="lastName"/></H2>
<p/>
<a href="<s:url action="index"/>">Back to front page</a>
@@ -1,3 +0,0 @@
<b>Hello from FreeMarker, ${firstName?html} ${lastName?html}!</b>
<p/>
<a href="<@s.url action="index"/>">Back to front page</a>
@@ -1,5 +0,0 @@
<@s.form action="processFreeMarkerExample" method="POST">
<@s.textfield label="First name" name="firstName"/>
<@s.textfield label="Last name" name="lastName"/>
<@s.submit value="Say hello!"/>
</@s.form>
@@ -1,4 +0,0 @@
Hello World from velocity!
<p />
#surl ("var=url" "action=index")
<a href="${url}">Back to the front page</a>
@@ -1,18 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Welcome to the Struts example portlet</H2>
<p/>
Here you'll find examples of what is possible with the Struts Portlet integration framework.
<ul>
<li><a href="<s:url action="formExample"/>">A simple form</a></li>
<li><a href="<s:url action="formExamplePrg" method="input"/>">Form example with proper PRG</a></li>
<li><a href="<s:url action="formExampleModelDriven" method="input"/>">Model driven example</a>/li>
<li><a href="<s:url action="validationExample"/>">Validation</a></li>
<li><a href="<s:url action="tokenExample"/>">Token</a></li>
<li><a href="<s:url action="springExample"/>">Spring integration</a></li>
<li><a href="<s:url action="fileUpload" method="input"/>">File upload</a></li>
<li><a href="<s:url action="freeMarkerExample"/>">FreeMarker</a></li>
<li><a href="<s:url action="velocityHelloWorld"/>">Velocity</a></li>
<li><a href="<s:url action="index" namespace="/tiles"/>">Form Example Validation with Tiles</a></li>
<li><a href="<s:url action="index" portletMode="edit"/>">Go to edit mode and see what's there</a></li>
<li><a href="<s:url action="index" portletMode="help"/>">Go to help mode and see what's there</a></li>
</ul>
@@ -1 +0,0 @@
<H2>This example has not yet been implemented</H2>
@@ -1,16 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h3>Example of Spring managed singleton. All the 'things' are contained in a Spring defined ThingManager</h3>
<b>Things in the list:</b>
<p/>
<s:iterator value="things">
<s:property /><br/>
</s:iterator>
<p/>
<s:form action="springExample" method="POST">
<s:textfield label="Thing to add?" name="thing" value=""/>
<s:submit value="Add the thing"/>
</s:form>
<p/>
<a href="<s:url action="index"/>">Back to front page</a>
@@ -1,5 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>The form was successfully submitted with a valid token</H2>
<a href="<s:url action="index"/>"/>Back to front page</a>
@@ -1,20 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:if test="hasErrors()">
ERROR:<br />
<font color="red">
<s:iterator value="actionErrors">
<s:property/><br />
</s:iterator>
</font>
</s:if>
<H2>Form with invalid token</H2>
<s:form action="processTokenExample" method="POST">
<s:textfield label="The value to submit" name="theValue" value=""/>
<s:submit value="Submit the form"/>
</s:form>
<H2>Form with valid token</H2>
<s:form action="processTokenExample" method="POST">
<s:token/>
<s:textfield label="The value to submit" name="theValue" value=""/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="StrutsPortlet">
<context-param>
<param-name>org.apache.tiles.factory.TilesContainerFactory</param-name>
<param-value>org.apache.struts2.tiles.StrutsTilesContainerFactory</param-value>
</context-param>
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<!-- Uncomment/comment this if you need/don't need Spring support -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext*.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Tiles Plugin -->
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener>
</web-app>
@@ -1,7 +0,0 @@
.wwFormTable {}
.label {font-style:italic; }
.errorLabel {font-style:italic; color:red; }
.errorMessage {font-weight:bold; text-align: center; color:red; }
.checkboxLabel {}
.checkboxErrorLabel {color:red; }
.required {color:red;}
@@ -1,5 +0,0 @@
<hr/>
<@s.url var="home" action="index" namespace="/view" />
<div>
<p>Powered by Struts2 Portlet/Tiles Plugin | <@s.a href="${home}">Back to front page</@s.a></p>
</div>
@@ -1,6 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<hr/>
<s:url var="home" action="index" namespace="/view" />
<div>
<p>Powered by Struts2 Portlet/Tiles Plugin | <s:a href="%{home}">Back to front page</s:a></p>
</div>
@@ -1,5 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Hello <s:property value="firstName"/> <s:property value="lastName"/></H2>
<p/>
@@ -1,8 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<link rel="stylesheet" type="text/css" href="<s:url value="/styles/styles.css"/>">
<H2>Input your name</H2>
<s:form action="processTilesFreemarkerExample" namespace="/tiles" method="POST" >
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -1,2 +0,0 @@
<h1>Struts2 Portlet Tiles App Example</h1>
<hr/>
@@ -1,13 +0,0 @@
<%@taglib prefix="s" uri="/struts-tags" %>
<div>
<p>This example illustrates the Struts/Portlet/Tiles Plugin.</p>
<h4>Features</h4>
<ul>
<li>
<s:url var="freemarker" namespace="/tiles" action="processTilesFreemarkerExample" method="input" />
<s:a href="%{freemarker}">View FreeMarker Example</s:a>
</li>
</ul>
</div>
@@ -1,13 +0,0 @@
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<tiles:importAttribute name="title" scope="request"/>
<tiles:insertAttribute name="header"/>
<h2><tiles:insertAttribute name="title"/></h2>
<p id="body">
<tiles:insertAttribute name="body"/>
</p>
<p>Notice that this is a layout made in JSP</p>
<tiles:insertAttribute name="footer"/>
@@ -1,19 +0,0 @@
import org.apache.pluto.core.PortletServlet;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.jetty.webapp.WebAppContext;
public class JettyPlutoLauncher {
public static void main(String[] args) throws Exception {
System.setProperty("org.apache.pluto.embedded.portletIds", "StrutsPortlet");
Server server = new Server(8080);
WebAppContext webapp = new WebAppContext(System.getProperty("user.dir") + "/apps/portlet/src/main/webapp", "/test");
webapp.setDefaultsDescriptor("/WEB-INF/jetty-pluto-web-default.xml");
ServletHolder portletServlet = new ServletHolder(new PortletServlet());
portletServlet.setInitParameter("portlet-name", "StrutsPortlet");
portletServlet.setInitOrder(1);
webapp.addServlet(portletServlet, "/PlutoInvoker/StrutsPortlet");
server.addHandler(webapp);
server.start();
}
}
@@ -1,97 +0,0 @@
package org.apache.struts2.portlet.test;
import static net.sourceforge.jwebunit.junit.JWebUnit.*;
import org.apache.pluto.core.PortletServlet;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.jetty.webapp.WebAppContext;
import junit.framework.TestCase;
import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;
public abstract class BasePortletTest extends TestCase {
protected Server server;
private String contextPath = "/test";
private int port;
public void setUp() throws Exception {
System.setProperty("org.apache.pluto.embedded.portletIds", getPortletName());
System.setProperty("org.apache.jasper.compiler.disablejsr199", "false");
server = new Server(port);
WebAppContext webapp = new WebAppContext("src/main/webapp", contextPath);
webapp.setTempDirectory(new File("target/work"));
webapp.setDefaultsDescriptor("/WEB-INF/jetty-pluto-web-default.xml");
// Set Classloader of Context to be sane (needed for JSTL)
// JSP requires a non-System classloader, this simply wraps the
// embedded System classloader in a way that makes it suitable
// for JSP to use
ClassLoader jspClassLoader = new URLClassLoader(new URL[0], this.getClass().getClassLoader());
webapp.setClassLoader(jspClassLoader);
ServletHolder portletServlet = new ServletHolder(new PortletServlet());
portletServlet.setInitParameter("portlet-name", getPortletName());
portletServlet.setInitOrder(1);
webapp.addServlet(portletServlet, "/PlutoInvoker/" + getPortletName());
server.addHandler(webapp);
server.start();
// Retrieve the actual port that is used, in case a random, free port is
// picked
int port = server.getConnectors()[0].getLocalPort();
getTestContext().setBaseUrl("http://localhost:" + port + contextPath);
}
public void tearDown() throws Exception {
server.stop();
}
public void minimizeWindow() {
clickElementByXPath("//span[@class='minimized']/..");
}
public void maximizeWindow() {
clickElementByXPath("//span[@class='minimized']/..");
}
public void restoreWindow() {
clickElementByXPath("//span[@class='normal']/..");
}
public void switchEdit() {
clickElementByXPath("//span[@class='edit']/..");
}
public void switchView() {
clickElementByXPath("//span[@class='view']/..");
}
public void switchHelp() {
clickElementByXPath("//span[@class='help']/..");
}
public void setContextPath(String contextPath) {
if(!contextPath.startsWith("/")) {
this.contextPath = "/" + contextPath;
}
else {
this.contextPath = contextPath;
}
}
public void setPort(int port) {
this.port = port;
}
public abstract String getPortletName();
}
@@ -1,87 +0,0 @@
package org.apache.struts2.portlet.test;
import static net.sourceforge.jwebunit.junit.JWebUnit.*;
public class Struts2PortletTest extends BasePortletTest {
private final static String PORTLET_NAME = "StrutsPortlet";
public void testNone() {}
public void testIndexPage() throws Exception {
beginAt("pluto/index.jsp");
assertTextPresent("Welcome to the Struts example portlet");
assertLinkPresentWithExactText("A simple form");
assertLinkPresentWithExactText("Validation");
}
public void testFormExample() throws Exception {
beginAt("pluto/index.jsp");
clickLinkWithExactText("A simple form");
assertFormPresent("processFormExample");
assertTextPresent("Input your name");
setWorkingForm("processFormExample");
setTextField("firstName", "Nils-Helge");
setTextField("lastName", "Garli");
submit();
assertTextPresent("Hello Nils-Helge Garli");
}
public void testValidationExample() throws Exception {
beginAt("pluto/index.jsp");
clickLinkWithExactText("Validation");
assertFormPresent("processValidationExample");
assertTextPresent("Input your name");
setWorkingForm("processValidationExample");
setTextField("firstName", "Nils-Helge");
submit();
assertTextFieldEquals("firstName", "Nils-Helge");
assertTextPresent("You must enter a last name");
setTextField("lastName", "Garli");
submit();
assertTextPresent("Hello Nils-Helge Garli");
}
public void testValidationErrorMessagesStickBetweenWindowStateChanges() throws Exception {
beginAt("pluto/index.jsp");
clickLinkWithExactText("Validation");
assertFormPresent("processValidationExample");
assertTextPresent("Input your name");
setWorkingForm("processValidationExample");
setTextField("firstName", "Nils-Helge");
submit();
assertTextFieldEquals("firstName", "Nils-Helge");
assertTextPresent("You must enter a last name");
minimizeWindow();
assertTextNotPresent("Input your name");
restoreWindow();
assertTextPresent("Input your name");
assertTextPresent("You must enter a last name");
}
public void testTokenExample() throws Exception {
beginAt("pluto/index.jsp");
clickLinkWithText("Token");
setWorkingForm(0);
setTextField("theValue", "something");
submit();
assertTextPresent("ERROR");
setWorkingForm(1);
setTextField("theValue", "somethingElse");
submit();
assertTextPresent("The form was successfully submitted with a valid token");
}
public void testSwitchFromViewToEditShouldGoToDefaultEditPage() throws Exception {
beginAt("pluto/index.jsp");
assertTextPresent("Welcome to the Struts example portlet");
switchEdit();
assertTextPresent("Back to view mode");
}
@Override
public String getPortletName() {
return PORTLET_NAME;
}
}
+2 -9
View File
@@ -26,12 +26,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.5</version>
<version>2.5.4</version>
</parent>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.5</version>
<version>2.5.4</version>
<name>Struts 2 Rest Showcase Webapp</name>
<description>Struts 2 Rest Showcase Example</description>
@@ -98,13 +98,6 @@
<build>
<finalName>struts2-rest-showcase</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>

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