Compare commits

...

101 Commits

Author SHA1 Message Date
René Gielen 676a011b4f Fixed ignores
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4@1368890 13f79535-47bb-0310-9956-ffa450edef68
2012-08-03 11:15:11 +00:00
Lukasz Lenart 954c21481f [maven-release-plugin] copy for tag STRUTS_2_3_4
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4@1337582 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 16:06:38 +00:00
Lukasz Lenart 4e61119eab [maven-release-plugin] prepare release STRUTS_2_3_4
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1337581 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 16:06:29 +00:00
Lukasz Lenart 7eb6cdbeaa WW-3813 Prepares for release
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1337576 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 15:45:50 +00:00
Lukasz Lenart f75cc72633 WW-3812 wraps Arrays.asList with new ArrayList() to allow add() operation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1337447 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 05:44:27 +00:00
Lukasz Lenart 517de353c1 WW-3763 adds setter to inject missing UrlHelper
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1336486 13f79535-47bb-0310-9956-ffa450edef68
2012-05-10 05:54:36 +00:00
Lukasz Lenart 02a84be2c7 WW-3810 reverts support for JBoss 5.1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1335463 13f79535-47bb-0310-9956-ffa450edef68
2012-05-08 12:28:02 +00:00
Lukasz Lenart 5af2eda14c Reverts site target
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1333786 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 07:15:29 +00:00
Lukasz Lenart 997c577d4f WW-3805 solves problem with reloading configuration on each request even no changes to file
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1331402 13f79535-47bb-0310-9956-ffa450edef68
2012-04-27 12:56:02 +00:00
Lukasz Lenart b382c5c021 WW-3803 improves support for JAR inside EAR package when used with JBoss 7
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1331373 13f79535-47bb-0310-9956-ffa450edef68
2012-04-27 12:12:03 +00:00
Lukasz Lenart 0e5d4f3e9f Updated tag version and name
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1331339 13f79535-47bb-0310-9956-ffa450edef68
2012-04-27 10:22:26 +00:00
Lukasz Lenart 37ebc858a3 Improves logging messages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1330502 13f79535-47bb-0310-9956-ffa450edef68
2012-04-25 19:25:03 +00:00
Lukasz Lenart 495753e1aa WW-3801 adds logic to clean ups uploaded files
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1328528 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 22:23:26 +00:00
Lukasz Lenart 0b2069dba0 WW-3803 solves problem with package name contains the package locator
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1328527 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 22:21:40 +00:00
Lukasz Lenart 0d8f4d43bd WW-3804 adds support of dynamic attributes to <s:radio/> tag and extends support for dynamic attributes with expression evaluation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1328526 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 22:19:41 +00:00
Lukasz Lenart 5a9048065f WW-3282 Changes logic to add namespace only once when building urls and cleans up code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1327601 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 18:13:57 +00:00
Lukasz Lenart 73e763faf8 WW-3799 converts FileManager into a bean, adds default implementation and defines new extension point
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1326928 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 05:03:45 +00:00
Lukasz Lenart 73c976a028 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1326479 13f79535-47bb-0310-9956-ffa450edef68
2012-04-16 04:34:52 +00:00
Lukasz Lenart 6411771bb0 [maven-release-plugin] prepare release STRUTS_2_3_3
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1326477 13f79535-47bb-0310-9956-ffa450edef68
2012-04-16 04:34:13 +00:00
Lukasz Lenart f45597252f WW-3798 changes params for wget to download just WW spaces
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1326396 13f79535-47bb-0310-9956-ffa450edef68
2012-04-15 18:49:00 +00:00
Lukasz Lenart 6a4240bdf0 WW-3791 prepares test build
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1326342 13f79535-47bb-0310-9956-ffa450edef68
2012-04-15 14:02:27 +00:00
Lukasz Lenart e9a12de7ee Reverst site link to dev one
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1326062 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 07:07:49 +00:00
Lukasz Lenart abd628ea09 WW-3442 adds additional initialisation of HttpSession
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1324893 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 17:49:35 +00:00
Lukasz Lenart 78ee4b8ba2 WW-3796 Changes logic to set encoding on HttpServletRequest if differs from configured
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1324888 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 17:41:06 +00:00
Lukasz Lenart 4f07559dc1 WW-3431 Solves problem with array initialization
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1324871 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 17:13:42 +00:00
Lukasz Lenart f064937984 WW-3059 Changes logic to set encoding for XMLHttpRequest type
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1324870 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 17:12:35 +00:00
Maurizio Cucchiara a99dadfebf Update commons lang3 reference
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1324674 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 09:42:13 +00:00
Lukasz Lenart 5c15306366 WW-3442 adds Session initialisation method to solve problem with missing session and allow to initialise session on its own in test cases
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311951 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 19:33:51 +00:00
Lukasz Lenart ecc0e56440 WW-3432 pushes messages variables to allow customize validation messages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311945 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 19:29:09 +00:00
Lukasz Lenart b90fe0996f WW-3418 solves problem with excludePackages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311931 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 19:04:57 +00:00
Lukasz Lenart 2dacf99394 Removes strange file
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311908 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 18:28:32 +00:00
Lukasz Lenart c8850cb558 WW-3413 removes unneeded dependencies
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311903 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 18:22:01 +00:00
Lukasz Lenart a377ce5c40 WW-3173 adds additional test case to proof that there is no error
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311902 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 18:20:25 +00:00
Lukasz Lenart 7146f389c7 WW-3795 allows specify location as a relative for result type plainText and add possibility to extend class by overriding protected methods
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311895 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 18:07:16 +00:00
Lukasz Lenart 73da07e6af WW-3793 corrects name of PlainText Result in documentation to be plainText and not plaintext
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1311872 13f79535-47bb-0310-9956-ffa450edef68
2012-04-10 17:15:38 +00:00
Lukasz Lenart cbb55e9793 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1310831 13f79535-47bb-0310-9956-ffa450edef68
2012-04-07 19:28:23 +00:00
Lukasz Lenart a903a80600 [maven-release-plugin] prepare release STRUTS_2_3_2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1310829 13f79535-47bb-0310-9956-ffa450edef68
2012-04-07 19:27:47 +00:00
Lukasz Lenart 79de91800e Prepares to release 2.3.2 version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1310826 13f79535-47bb-0310-9956-ffa450edef68
2012-04-07 18:53:40 +00:00
Lukasz Lenart d21a0c8e42 WW-3746 Upgrades OGNL to version 3.0.5 to solve problem with running Struts 2 application within secured environment
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1310686 13f79535-47bb-0310-9956-ffa450edef68
2012-04-07 07:30:06 +00:00
Lukasz Lenart aef1c6aaf6 WW-3174 additional test case for Dynamic Attributes support
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1310417 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 15:56:45 +00:00
Lukasz Lenart 3cd48592dd WW-3174 adds logic to support dynamic attributes in tags used with FreeMarker templates
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1310221 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 08:17:00 +00:00
Lukasz Lenart 7eb38fdb66 WW-3636 adds className parameter to @Action annotation, can be useful when used with Spring Framework to instantiate actions
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1309089 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 18:34:30 +00:00
Lukasz Lenart 4b9445de80 WW-3779 adds description of missing extension points and removes some code duplications
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1307906 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 21:22:04 +00:00
Lukasz Lenart c71a8dfd2d WW-3780 makes JSON plugin more extendable
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1307897 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 20:39:53 +00:00
Lukasz Lenart 2d5fdbe6dd WW-3781 upgrades XStream to 1.4.2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1307617 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 21:13:48 +00:00
Lukasz Lenart 35b84844d9 WW-3750 reduces scope of cashing
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1307614 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 21:04:33 +00:00
René Gielen c7a0ec6256 Added CDI plugin to dependency management section
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1304631 13f79535-47bb-0310-9956-ffa450edef68
2012-03-23 22:25:13 +00:00
Lukasz Lenart 880e5d1b7d WW-3783 upgrades json-lib to 2.3
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1304317 13f79535-47bb-0310-9956-ffa450edef68
2012-03-23 12:44:12 +00:00
René Gielen b0d14cea04 WW-3768:
ThreadLocal was created but not removed appropriately

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1304070 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 21:17:07 +00:00
Lukasz Lenart c52cd98c9e WW-3777 converts UrlHelper into an interface with default implementation, cleanups code and adds support for generics
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1303298 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 07:11:29 +00:00
Lukasz Lenart f01f6e3cfe Merges Struts 2 ClassLoaderUtils into XWork 2 ClassLoaderUtil
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1302821 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 10:17:37 +00:00
Lukasz Lenart b5a58f1b90 Improves config-browser plugin, cleanups code, adds support for Convention plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1302806 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 09:17:02 +00:00
Lukasz Lenart 9831ecf543 Adds better way to handle JavaScript injection into request parameters
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1302803 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 09:10:37 +00:00
Lukasz Lenart 06d2aa4981 WW-3773 recreates HttpSession and SessionMap if HttpSession doesn't exist
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1301989 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 20:08:37 +00:00
Lukasz Lenart 98af0ac15f WW-3774 - initialize portlet mocks only in case if portlet dependencies are available
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1301531 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 14:06:25 +00:00
Lukasz Lenart 86d97dc20b WW-3721 upgrades to latest Struts Master
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1300550 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 14:04:13 +00:00
Lukasz Lenart 6399ec283b WW-3771 upgrades to the latest FreeMarker version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1297997 13f79535-47bb-0310-9956-ffa450edef68
2012-03-07 15:47:52 +00:00
Lukasz Lenart f070d7e830 WW-3769 adds missing line of code to generate namespace without explicit specifying it
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1297994 13f79535-47bb-0310-9956-ffa450edef68
2012-03-07 15:34:38 +00:00
Lukasz Lenart da85bb6abd WW-3631 - adds additional excluded params to avoid session / request / response tempering
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1297521 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 15:24:08 +00:00
Lukasz Lenart 524a602fa7 WW-3662 - improves support for JBoss server
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1297384 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 08:48:30 +00:00
Lukasz Lenart 9bd53cc212 WW-3762 - extracts one huge converter into smaller classes and implements better conversion mechanism for collections
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1297347 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 06:26:38 +00:00
Lukasz Lenart 26ed57b11a WW-3748 s:bean shouldn't load class, just delegate that to ObjectFactory
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1295146 13f79535-47bb-0310-9956-ffa450edef68
2012-02-29 15:14:22 +00:00
René Gielen 20689c0cf7 WW-3767:
- added support for servlet container JNDI lookup key java:comp/env/BeanManager
- added support for custom configuration constant to override standard lookup

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1294420 13f79535-47bb-0310-9956-ffa450edef68
2012-02-28 00:35:04 +00:00
René Gielen 94d75f9cbe Simple code reformatting, no actual change.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1294413 13f79535-47bb-0310-9956-ffa450edef68
2012-02-28 00:28:57 +00:00
Lukasz Lenart 5aa97c1b4b WW-3753 - adheres AnnotationActionValidatorManager to ActionValidatorManager interface's contract
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1293795 13f79535-47bb-0310-9956-ffa450edef68
2012-02-26 09:52:12 +00:00
Lukasz Lenart f47cfa889a WW-3753 - adheres AnnotationActionValidatorManager to ActionValidatorManager interface's contract
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1293791 13f79535-47bb-0310-9956-ffa450edef68
2012-02-26 09:28:10 +00:00
Lukasz Lenart 9abf8dd346 WW-3763 restores the old behaviour of Portlet plugin, to allow use portlets in standalone application as well
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1293127 13f79535-47bb-0310-9956-ffa450edef68
2012-02-24 08:14:55 +00:00
Lukasz Lenart a9b26ca87f WW-3761 - improves loading templates from file path
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1292722 13f79535-47bb-0310-9956-ffa450edef68
2012-02-23 09:28:13 +00:00
Lukasz Lenart 6ec3d2a8b6 WW-3758 - upgrade commons-lang to version 3.1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1292705 13f79535-47bb-0310-9956-ffa450edef68
2012-02-23 08:40:53 +00:00
Lukasz Lenart 4b40771643 WW-3760 changes access level to protected to allow override
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1292259 13f79535-47bb-0310-9956-ffa450edef68
2012-02-22 12:42:01 +00:00
René Gielen f3f8278411 WW-3757
Show how to produce sanitized output of user inputted data

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1290994 13f79535-47bb-0310-9956-ffa450edef68
2012-02-19 12:51:44 +00:00
René Gielen 4a5211716f WW-3757
Show how to produce sanitized output of user inputted data

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1290827 13f79535-47bb-0310-9956-ffa450edef68
2012-02-18 17:44:04 +00:00
Johannes Geppert ef8c44967d WW-3738: Struts2 Maven Archetypes are broken
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1244929 13f79535-47bb-0310-9956-ffa450edef68
2012-02-16 11:02:27 +00:00
Johannes Geppert 29c2eb778b WW-3738: Struts2 Maven Archetypes are broken
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1243174 13f79535-47bb-0310-9956-ffa450edef68
2012-02-11 22:33:36 +00:00
Johannes Geppert eafd29bea7 WW-3750: ScopesHashModel calls OgnlValueStack.findValue too many times during rendering freemarker templates
Patch provided by Pelladi Gabor

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1241573 13f79535-47bb-0310-9956-ffa450edef68
2012-02-07 19:41:45 +00:00
Johannes Geppert 261c5fb996 WW-3736: Client Validation is broken for Struts2 themes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1240312 13f79535-47bb-0310-9956-ffa450edef68
2012-02-03 19:44:51 +00:00
Maurizio Cucchiara b5eebb9842 WW-3747 - regular expressions in combination with advanced wildcards don't work
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1237092 13f79535-47bb-0310-9956-ffa450edef68
2012-01-28 16:40:38 +00:00
Maurizio Cucchiara cc6edbb49a Security issue fixed (see [1] for further details)
[1] https://cwiki.apache.org/confluence/display/WW/S2-009

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1234212 13f79535-47bb-0310-9956-ffa450edef68
2012-01-21 00:04:43 +00:00
Lukasz Lenart 3ec7b8ca22 WW-3743 - removes unnecessary second call to getProperty() and removes some unused code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1232518 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 18:14:19 +00:00
Lukasz Lenart 4a00dbb6b3 WW-3745 - solves wrong documentation snippets regarding Validation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1232423 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 14:27:51 +00:00
Maurizio Cucchiara bbec257e3b exploit
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1231642 13f79535-47bb-0310-9956-ffa450edef68
2012-01-15 09:01:54 +00:00
Lukasz Lenart 4599676018 Changes home url to point to proper url
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1229927 13f79535-47bb-0310-9956-ffa450edef68
2012-01-11 08:21:29 +00:00
Maurizio Cucchiara 7cb22a719c Upgraded the site plugin to the latest version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1229535 13f79535-47bb-0310-9956-ffa450edef68
2012-01-10 13:36:44 +00:00
John Lindal 031098fa01 WW-3740 apply allowed-methods filter to wildcard actions
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1228497 13f79535-47bb-0310-9956-ffa450edef68
2012-01-06 23:19:32 +00:00
Lukasz Lenart 872a7b0b6d WW-3733 - adds missing PortletContext to ActionContext to avoid NPE during PortletResult initialisation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1226265 13f79535-47bb-0310-9956-ffa450edef68
2012-01-01 17:29:25 +00:00
Lukasz Lenart 248d0f5879 WW-3284 - adds new Number tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1225353 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 21:47:20 +00:00
Lukasz Lenart 54945c5417 Code formatting
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1225339 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 21:16:31 +00:00
Lukasz Lenart 9cad25f258 Merges changes from 2.3.x branch
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1225038 13f79535-47bb-0310-9956-ffa450edef68
2011-12-27 22:34:37 +00:00
Lukasz Lenart 47e12adc0e WW-3414 add JavaDoc comments about new API
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1222075 13f79535-47bb-0310-9956-ffa450edef68
2011-12-22 07:08:20 +00:00
Lukasz Lenart 5563389dc6 WW-3414 removes not serializable field from XWorkList and uses Object Factory to obtain instance o XWorkBasicConverter
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1222068 13f79535-47bb-0310-9956-ffa450edef68
2011-12-22 06:51:14 +00:00
Johannes Geppert 21fcf36ad3 WW-3727: com/opensymphony/xwork2/validator/default.xml uses old DTD
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1221462 13f79535-47bb-0310-9956-ffa450edef68
2011-12-20 19:54:24 +00:00
Johannes Geppert 970251ff95 Update to current 2.3 DTD
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1221225 13f79535-47bb-0310-9956-ffa450edef68
2011-12-20 12:22:28 +00:00
Lukasz Lenart 5ec51ae1bc Adds repository tag and updates to latest version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1220551 13f79535-47bb-0310-9956-ffa450edef68
2011-12-18 21:46:41 +00:00
Lukasz Lenart 09f7f37d72 WW-3264 improves strict DMI mode
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1215253 13f79535-47bb-0310-9956-ffa450edef68
2011-12-16 19:53:42 +00:00
Lukasz Lenart 3683b8f7fd Removes wrong .equal() and formats code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1215225 13f79535-47bb-0310-9956-ffa450edef68
2011-12-16 17:04:00 +00:00
Lukasz Lenart 659a688d25 Improves adding tokens to collection
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1215224 13f79535-47bb-0310-9956-ffa450edef68
2011-12-16 17:02:42 +00:00
Lukasz Lenart 0c61bf4c34 Removes duplicated dependencies from poms
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1215053 13f79535-47bb-0310-9956-ffa450edef68
2011-12-16 07:29:09 +00:00
Lukasz Lenart d91a168e3f Uses compatible version of Reports plugin with Maven 3
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1214267 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 14:44:29 +00:00
Lukasz Lenart 47deea981b WW-3072 - shows properties of Action object instead of Action class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1212532 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 17:34:15 +00:00
Lukasz Lenart c6af386d57 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1212123 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 21:09:17 +00:00
Lukasz Lenart 133ca637f0 [maven-release-plugin] prepare release STRUTS_2_3_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1212121 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 21:05:31 +00:00
395 changed files with 7183 additions and 5104 deletions
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
@@ -34,9 +34,9 @@
<name>Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/blank/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/blank/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/blank/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/blank</url>
</scm>
<dependencies>
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jboss-blank</artifactId>
@@ -34,9 +34,9 @@
<name>JBoss Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/jboss-blank/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/jboss-blank/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/jboss-blank/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/jboss-blank</url>
</scm>
<dependencies>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
@@ -34,9 +34,9 @@
<name>Mail Reader Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/mailreader/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/mailreader/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/mailreader/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/mailreader</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
@@ -42,9 +42,9 @@
</modules>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps</url>
</scm>
<profiles>
+6 -6
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -34,9 +34,9 @@
<name>Portlet Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/portlet/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/portlet/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/portlet/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/portlet</url>
</scm>
<profiles>
@@ -190,8 +190,8 @@
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
@@ -22,7 +22,7 @@ package org.apache.struts2.portlet.example.spring;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import com.opensymphony.xwork2.ActionSupport;
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//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"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//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">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//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"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//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"
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<include file="struts-view.xml"/>
@@ -1,3 +1,3 @@
<b>Hello from FreeMarker, ${firstName} ${lastName}!</b>
<b>Hello from FreeMarker, ${firstName?html} ${lastName?html}!</b>
<p/>
<a href="<@s.url action="index"/>">Back to front page</a>
+2 -2
View File
@@ -26,13 +26,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>
@@ -23,8 +23,8 @@
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- Overwrite Convention -->
@@ -20,8 +20,8 @@
<s:iterator value="model">
<tr>
<td>${id}</td>
<td>${clientName}</td>
<td>${amount}</td>
<td><s:property value="clientName"/></td>
<td><s:property value="amount"/></td>
<td><a href="orders/${id}">View</a> |
<a href="orders/${id}/edit">Edit</a> |
<a href="orders/${id}/deleteConfirm">Delete</a></td>
@@ -1,7 +1,9 @@
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="s" uri="/struts-tags" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Order ${id}</title>
@@ -14,11 +16,11 @@
</tr>
<tr>
<th>Client</th>
<td>${clientName}</td>
<td><s:property value="clientName"/></td>
</tr>
<tr>
<th>Amount</th>
<td>${amount}</td>
<td><s:property value="amount"/></td>
</tr>
</table>
<a href="../orders">Back to Orders</a>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
@@ -34,9 +34,9 @@
<name>Showcase Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/showcase/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/showcase/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/showcase/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/apps/showcase</url>
</scm>
@@ -59,7 +59,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
public String execute() throws MalformedURLException, IOException {
if (page != null && page.trim().length() > 0) {
if (page != null) {
InputStream in = ClassLoaderUtil.getResourceAsStream(page.substring(page.indexOf("//")+1), getClass());
page = page.replace("//", "/");
@@ -78,7 +78,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
}
}
if (className != null && className.trim().length() > 0) {
if (className != null) {
className = "/"+className.replace('.', '/') + ".java";
InputStream in = getClass().getResourceAsStream(className);
if (in == null) {
@@ -93,7 +93,7 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
String rootPath = ServletActionContext.getServletContext().getRealPath("/");
if (config != null && config.trim().length() > 0 && (rootPath == null || config.startsWith(rootPath))) {
if (config != null && (rootPath == null || config.startsWith(rootPath))) {
int pos = config.lastIndexOf(':');
configLine = Integer.parseInt(config.substring(pos+1));
config = config.substring(0, pos).replace("//", "/");
@@ -107,21 +107,27 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
* @param className the className to set
*/
public void setClassName(String className) {
this.className = className;
if (className != null && className.trim().length()>0) {
this.className = className;
}
}
/**
* @param config the config to set
*/
public void setConfig(String config) {
this.config = config;
if (config != null && config.trim().length()>0) {
this.config = config;
}
}
/**
* @param page the page to set
*/
public void setPage(String page) {
this.page = page;
if (page != null && page.trim().length()>0) {
this.page = page;
}
}
/**
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="actionchaining" extends="struts-default" namespace="/actionchaining">
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="ajax" extends="struts-default">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="chat" extends="struts-default" namespace="/chat">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="conversion" namespace="/conversion" extends="struts-default">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="filedownload" extends="struts-default" namespace="/filedownload">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="fileupload" extends="struts-default" namespace="/fileupload">
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="freemarker" namespace="/freemarker" extends="struts-default">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="hangman" extends="struts-default" namespace="/hangman">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="integration" extends="struts1-default" namespace="/integration">
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="ognl" namespace="/nodecorate" extends="struts-default">
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="jsf" extends="jsf-default" namespace="/jsf">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="modelDriven" extends="struts-default" namespace="/modelDriven">
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<!-- START SNIPPET: xworkSample -->
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="ui-tags" extends="struts-default" namespace="/tags/ui">
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<include file="struts-tags-ui.xml"/>
<include file="struts-tags-non-ui.xml" />
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="tiles" extends="tiles-default" namespace="/tiles">
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="token" extends="struts-default" namespace="/token">
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="validation" extends="json-default" namespace="/validation">
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="wait" extends="struts-default" namespace="/wait">
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="xslt" extends="struts-default" namespace="/xslt">
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<!-- START SNIPPET: xworkSample -->
<struts>
@@ -1,5 +1,5 @@
[
<#list options as option>
["${option}"],
["${option?html}"],
</#list>
]
@@ -1,3 +1,3 @@
Hello, <br/>
Today is ${todayDate}, the time now is ${todayTime}
Today is ${todayDate?html}, the time now is ${todayTime?html}
@@ -1,2 +1,2 @@
Hello, ${name}
Hello, ${name?html}
@@ -1,2 +1,2 @@
So, you are a ${gender}
So, you are a ${gender?html}
@@ -118,7 +118,7 @@
<div class="center">
<div class="box">
<h3>Messages Posted In Room [${roomName?default('')}]</h3>
<h3>Messages Posted In Room [${roomName?default('')?html}]</h3>
<@s.url id="url" value="/chat/ajax/messagesAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
@@ -143,7 +143,7 @@
<div class="right">
<div class="box">
<h3>Users Available In Room [${roomName?default('')}]</h3>
<h3>Users Available In Room [${roomName?default('')?html}]</h3>
<@s.url id="url" value="/chat/ajax/usersAvailableInRoom.action" includeContext="true">
<@s.param name="roomName" value="%{roomName}" />
</@s.url>
@@ -1,6 +1,6 @@
<ul>
<#list availableUsers as user>
<li>${user.name}</li>
<li>${user.name?html}</li>
</#list>
</ul>
@@ -6,7 +6,7 @@
<body>
<#list actionMessages as msg>
${msg}
${msg?html}
</#list>
<@s.form action="guess" method="post">
@@ -13,9 +13,9 @@ There are ${peopleCount} people...
</tr>
<#list people as person>
<tr>
<td>${person.id}</td>
<td>${person.name}</td>
<td>${person.lastName}</td>
<td>${person.id?html}</td>
<td>${person.name?html}</td>
<td>${person.lastName?html}</td>
</tr>
</#list>
</table>
@@ -8,7 +8,7 @@
You have come to this page because you used an 'action' prefix.<p/>
The text you've enter is ${text?default('')}<p/>
The text you've entered is ${text?default('')?html}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
@@ -8,7 +8,7 @@
You have come to this page because you used an 'method' prefix.<p/>
The text you've enter is ${text?default('')}<p/>
The text you've enter is ${text?default('')?html}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
@@ -11,7 +11,7 @@
Because this is a 'redirect-action', the text will be lost, due to a redirection
implies a new request being issued from the client.<p/>
The text you've enter is ${text?default('')}<p/>
The text you've enter is ${text?default('')?html}<p/>
<@s.url id="url" action="actionPrefixExampleUsingFreemarker" namespace="/tags/non-ui/actionPrefix" />
<@s.a href="%{#url}">Back</@s.a>
+3 -3
View File
@@ -11,14 +11,14 @@
<sx:tabbedpanel id="test">
<sx:div id="one" label="Page" >
<h3>${empty page ? "Unknown page" : page}</h3>
<h3><s:property default="Unknown page" value="page"/></h3>
<pre>
<s:iterator value="pageLines" status="row">
${row.count}: <s:property/></s:iterator>
</pre>
</sx:div>
<sx:div id="two" label="Configuration" >
<h3>${empty config ? "Unknown configuration" : config}</h3>
<h3><s:property default="Unknown configuration" value="config"/></h3>
<pre>
<s:iterator value="configLines" status="row"><s:if test="%{(#row.count-1)==(configLines.size()/2)}">
@@ -27,7 +27,7 @@ ${configLine - padding + row.count - 1}: <s:property/></s:else></s:iterator>
</pre>
</sx:div>
<sx:div id="three" label="Java Action">
<h3>${empty className ? "Unknown or unavailable Action class" : className}</h3>
<h3><s:property default="Unknown or unavailable Action class" value="className"/></h3>
<pre>
<s:iterator value="classLines" status="row">
${row.count}: <s:property/></s:iterator>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Maven Archetypes</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes</url>
</scm>
<modules>
+40 -6
View File
@@ -3,18 +3,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Blank</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-blank/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-blank/</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-blank/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-blank</url>
</scm>
<properties>
@@ -27,10 +28,43 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<archetype
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"
>
<id>struts2-archetype-blank</id>
<!--
@@ -2,11 +2,11 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Webapp</name>
<name>\${artifactId}</name>
<properties>
<struts2.version>${project.version}</struts2.version>
@@ -17,19 +17,19 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
<scope>test</scope>
</dependency>
@@ -46,20 +46,6 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<!--
- This file is included by the struts.xml file as an example
- of how to break up the configuration file into multiple files.
@@ -1,5 +1,5 @@
HelloWorld.message = ¡Struts está bien!...
HelloWorld.message = \u00A1Struts est\u00E1 bien\!...
requiredstring = ${getText(fieldName)} es requerido.
password = Contraseña
password = Contrase\u00F1a
username = Nombre de Usuario
Missing.message = Página bajo construcción, trate de nuevo en la proxima versión
Missing.message = P\u00E1gina bajo construcci\u00F3n, trate de nuevo en la proxima versi\u00F3n.
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
@@ -1,21 +1,20 @@
<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">
<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">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Blank Convention</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-convention/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-convention/
</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-convention/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-convention</url>
</scm>
<properties>
@@ -28,10 +27,43 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-convention</id>
</archetype>
@@ -0,0 +1,7 @@
<archetype
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"
>
<id>struts2-archetype-convention</id>
</archetype>
@@ -2,11 +2,11 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Convention Webapp</name>
<name>\${artifactId}</name>
<properties>
<struts2.version>${project.version}</struts2.version>
@@ -17,26 +17,26 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
@@ -1,2 +1,2 @@
hello.message = ¡Struts está bien!...
hello.message = \u00A1Struts est\u00E1 bien\!...
requiredstring = ${getText(fieldName)} es requerido.
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
+41 -9
View File
@@ -1,21 +1,20 @@
<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">
<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">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Database Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/
</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-dbportlet/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-dbportlet</url>
</scm>
<properties>
@@ -28,10 +27,43 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-dbblank</id>
<sources>
<source>src/main/java/view/IndexAction.java</source>
<source>src/main/java/edit/IndexAction.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
<resource>src/main/webapp/WEB-INF/applicationContext.xml</resource>
<resource>src/main/webapp/WEB-INF/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/help/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-input.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-success.jsp</resource>
</resources>
</archetype>
@@ -2,11 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${project.version}</version>
<name>Struts 2 Database Portlet</name>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>\${artifactId}</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Database Portlet</description>
@@ -28,31 +28,31 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<!-- Spring -->
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<constant name="struts.convention.default.parent.package" value="struts-portlet-default" />
+40 -9
View File
@@ -1,22 +1,20 @@
<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">
<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">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-plugin/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-plugin/
</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-plugin/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-plugin</url>
</scm>
<properties>
@@ -29,10 +27,43 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-plugin</id>
<sources>
<source>src/main/java/MyResult.java</source>
</sources>
<resources>
<resource>src/main/resources/struts-plugin.xml</resource>
<resource>LICENSE.txt</resource>
<resource>NOTICE.txt</resource>
<resource>README.txt</resource>
</resources>
</archetype>
@@ -3,10 +3,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<name>Struts 2 Plugin</name>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>jar</packaging>
<name>\${artifactId}</name>
<dependencies>
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
+40 -9
View File
@@ -1,22 +1,20 @@
<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">
<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">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-portlet/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-portlet/
</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-portlet/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-portlet</url>
</scm>
<properties>
@@ -29,10 +27,43 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-portlet</id>
<sources>
<source>src/main/java/HelloAction.java</source>
<source>src/main/java/UpdateNameAction.java</source>
</sources>
<testSources>
<source>src/test/java/JettyPlutoLauncher.java</source>
</testSources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/WEB-INF/jsp/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/jsp/edit/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
</resources>
</archetype>
@@ -3,11 +3,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>My Portlet Application</name>
<version>${project.version}</version>
<name>\${artifactId}</name>
<properties>
<struts2.version>${project.version}</struts2.version>
@@ -19,19 +19,19 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="default" extends="struts-portlet-default" namespace="/view">
+40 -9
View File
@@ -1,24 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<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">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Starter</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-starter/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-starter/
</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/archetypes/struts2-archetype-starter/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/archetypes/struts2-archetype-starter</url>
</scm>
<properties>
@@ -31,10 +29,43 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/pom.xml</include>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/archetype-resources/src</directory>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
@@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-starter</id>
<sources>
<source>src/main/java/HelloWorldAction.java</source>
<source>src/main/java/IndexAction.java</source>
<source>src/main/java/DateConverter.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/resources/xwork-conversion.properties</resource>
<resource>src/main/resources/struts.properties</resource>
<resource>src/main/resources/applicationContext.xml</resource>
<resource>src/main/resources/log4j.properties</resource>
<resource>src/main/webapp/jsp/index.jsp</resource>
<resource>src/main/webapp/jsp/helloWorld.jsp</resource>
<resource>src/main/webapp/WEB-INF/decorators/main.jsp</resource>
<resource>src/main/webapp/WEB-INF/decorators.xml</resource>
<resource>src/main/webapp/styles/main.css</resource>
<resource>src/main/webapp/styles/forms.css</resource>
<resource>src/main/webapp/styles/layout.css</resource>
<resource>src/main/webapp/styles/layout-1col.css</resource>
<resource>src/main/webapp/styles/layout-navleft-1col.css</resource>
<resource>src/main/webapp/styles/layout-navleft-2col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-1col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-3col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-localleft.css</resource>
<resource>src/main/webapp/styles/layout-navtop-subright.css</resource>
<resource>src/main/webapp/styles/nav-horizontal.css</resource>
<resource>src/main/webapp/styles/nav-vertical.css</resource>
<resource>src/main/webapp/styles/tools.css</resource>
<resource>src/main/webapp/styles/typo.css</resource>
<resource>src/main/webapp/WEB-INF/dwr.xml</resource>
<resource>src/main/webapp/WEB-INF/sitemesh.xml</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
</resources>
<testSources>
<source>src/test/java/HelloWorldActionTest.java</source>
<source>src/test/java/IndexActionTest.java</source>
</testSources>
<testResources>
<resource>src/test/resources/test.properties</resource>
</testResources>
</archetype>
@@ -2,12 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${project.version}</version>
<name>Struts 2 Starter</name>
<url>http://www.myComp.com</url>
<groupId>\${groupId}</groupId>
<artifactId>\${artifactId}</artifactId>
<version>\${version}</version>
<packaging>war</packaging>
<name>\${artifactId}</name>
<description>Struts 2 Starter</description>
<properties>
@@ -27,25 +26,25 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
<version>\${struts2.version}</version>
</dependency>
<!-- Servlet & Jsp -->
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<?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>
+6 -4
View File
@@ -11,13 +11,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/assembly</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/assembly</url>
</scm>
<profiles>
@@ -276,6 +276,8 @@
<arg value="-nv" />
<arg value="-E" />
<arg value="-L" />
<arg value="-l 0" />
<arg value="-np" />
<arg value="--directory-prefix=${project.build.directory}/cwiki" />
<arg value="--no-check-certificate" />
<arg value="-r" />
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-admin-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Admin Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/admin/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/admin/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/bundles/admin/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/bundles/admin</url>
</scm>
<dependencies>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-demo-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Demo Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/demo/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/demo/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/bundles/demo/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/bundles/demo</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
@@ -34,9 +34,9 @@
<name>Struts OSGi Bundles</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/bundles</url>
</scm>
<modules>
+6 -6
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.3.4</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
@@ -34,13 +34,13 @@
<name>Struts 2 Core</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/core/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/core/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/core/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_4/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_4/core</url>
</scm>
<properties>
<tlib.version>2.2</tlib.version>
<tlib.version>2.3</tlib.version>
</properties>
<build>
@@ -50,7 +50,7 @@
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.15</version>
<configuration>
<A>uri=/struts-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=s,displayName="Struts Tags",
<A>uri=/struts-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=s,displayName=Struts Tags,
outFile=${basedir}/target/classes/META-INF/struts-tags.tld,
description="To make it easier to access dynamic data;
the Apache Struts framework includes a library of custom tags.
@@ -64,6 +64,9 @@ public final class StrutsConstants {
/** The com.opensymphony.xwork2.ObjectFactory implementation class */
public static final String STRUTS_OBJECTFACTORY = "struts.objectFactory";
/** The com.opensymphony.xwork2.util.FileManager implementation class */
public static final String STRUTS_FILEMANAGER = "struts.fileManager";
/** The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class */
public static final String STRUTS_OBJECTTYPEDETERMINER = "struts.objectTypeDeterminer";
@@ -223,4 +226,8 @@ public final class StrutsConstants {
/** Enables caching of parsed OGNL expressions **/
public static final String STRUTS_ENABLE_OGNL_EXPRESSION_CACHE = "struts.ognl.enableExpressionCache";
/** The{@link org.apache.struts2.views.util.UrlHelper} implementation class **/
public static final String STRUTS_URL_HELPER = "struts.view.urlHelper";
}
@@ -22,7 +22,7 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -22,7 +22,7 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -28,7 +28,7 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -21,18 +21,16 @@
package org.apache.struts2.components;
import java.io.Writer;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.Writer;
/**
* <!-- START SNIPPET: javadoc -->
@@ -94,8 +92,8 @@ import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
*
* @see Param
*/
@StrutsTag(name="bean", tldTagClass="org.apache.struts2.views.jsp.BeanTag",
description="Instantiate a JavaBean and place it in the context")
@StrutsTag(name = "bean", tldTagClass = "org.apache.struts2.views.jsp.BeanTag",
description = "Instantiate a JavaBean and place it in the context")
public class Bean extends ContextBean {
protected static final Logger LOG = LoggerFactory.getLogger(Bean.class);
@@ -107,12 +105,12 @@ public class Bean extends ContextBean {
public Bean(ValueStack stack) {
super(stack);
}
@Inject
public void setObjectFactory(ObjectFactory objectFactory) {
this.objectFactory = objectFactory;
}
@Inject
public void setReflectionProvider(ReflectionProvider prov) {
this.reflectionProvider = prov;
@@ -124,11 +122,10 @@ public class Bean extends ContextBean {
ValueStack stack = getStack();
try {
String beanName = findString(name, "name", "Bean name is required. Example: com.acme.FooBean");
bean = objectFactory.buildBean(ClassLoaderUtil.loadClass(beanName, getClass()), stack.getContext());
String beanName = findString(name, "name", "Bean name is required. Example: com.acme.FooBean or proper Spring bean ID");
bean = objectFactory.buildBean(beanName, stack.getContext(), false);
} catch (Exception e) {
LOG.error("Could not instantiate bean", e);
return false;
}
@@ -152,9 +149,9 @@ public class Bean extends ContextBean {
reflectionProvider.setProperty(key, value, bean, getStack().getContext());
}
@StrutsTagAttribute(description="The class name of the bean to be instantiated (must respect JavaBean specification)",
required=true)
@StrutsTagAttribute(description = "The class name of the bean to be instantiated (must respect JavaBean specification)", required = true)
public void setName(String name) {
this.name = name;
}
}
@@ -21,19 +21,11 @@
package org.apache.struts2.components;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.StrutsException;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.util.FastByteArrayOutputStream;
@@ -41,9 +33,14 @@ import org.apache.struts2.views.jsp.TagUtils;
import org.apache.struts2.views.util.ContextUtil;
import org.apache.struts2.views.util.UrlHelper;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.TextParseUtil;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
/**
* Base class to extend for UI components.
@@ -52,12 +49,14 @@ import com.opensymphony.xwork2.util.TextParseUtil;
*
*/
public class Component {
public static final String COMPONENT_STACK = "__component_stack";
protected ValueStack stack;
protected Map parameters;
protected ActionMapper actionMapper;
protected boolean throwExceptionOnELFailure;
private UrlHelper urlHelper;
/**
* Constructor.
@@ -91,7 +90,11 @@ public class Component {
public void setThrowExceptionsOnELFailure(String throwException) {
this.throwExceptionOnELFailure = "true".equals(throwException);
}
@Inject
public void setUrlHelper(UrlHelper urlHelper) {
this.urlHelper = urlHelper;
}
/**
* Gets the OGNL value stack assoicated with this component.
* @return the OGNL value stack assoicated with this component.
@@ -407,7 +410,7 @@ public class Component {
String finalNamespace = determineNamespace(namespace, getStack(), req);
ActionMapping mapping = new ActionMapping(finalAction, finalNamespace, finalMethod, parameters);
String uri = actionMapper.getUriFromActionMapping(mapping);
return UrlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult, forceAddSchemeHostAndPort, escapeAmp);
return urlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult, forceAddSchemeHostAndPort, escapeAmp);
}
/**
@@ -445,8 +448,8 @@ public class Component {
stack.push(parameters);
stack.push(this);
try {
for (Iterator iterator = params.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
for (Object o : params.entrySet()) {
Map.Entry entry = (Map.Entry) o;
String key = (String) entry.getKey();
stack.setValue(key, entry.getValue());
}
@@ -22,7 +22,7 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import javax.servlet.http.HttpServletRequest;
@@ -36,7 +36,7 @@ import com.opensymphony.xwork2.validator.Validator;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -0,0 +1,404 @@
/**
*
*/
package org.apache.struts2.components;
/*
* $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.
*/
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.IOException;
import java.io.Writer;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.util.Currency;
/**
* <!-- START SNIPPET: javadoc -->
* <p/>
* Format Number object in different ways.
* <p>
* The number tag will allow you to format a Number in a quick and easy way,
* based on the java.text.NumberFormat class. There are four basic number types,
* a number, a currency, a percentage and an integer. If a currency is
* specified, the number format will match the given currency. Further
* parameters can be overridden as needed.
* <p/>
* If a type is not defined, it will finally fall back to the default
* NumberFormat.getNumberInstance() formatting.
* <p/>
* <b>Note</b>: If the requested Number object isn't found on the stack, a blank
* will be returned.
* </p>
* <p/>
* Configurable attributes are :-
* <ul>
* <li>name</li>
* <li>currency - you can specify your own currency or as an OGNL expression</li>
* <li>type - if not specified try to find base on struts.number.format property</li>
* <li>groupingUsed - see NumberFormat.isGroupingUsed</li>
* <li>maximumFractionDigits - see NumberFormat.setMaximumFractionDigits</li>
* <li>maximumIntegerDigits - see NumberFormat.setMaximumIntegerDigits</li>
* <li>minimumFractionDigits - see NumberFormat.setMinimumFractionDigits</li>
* <li>minimumIntegerDigits - see NumberFormat.setMinimumIntegerDigits</li>
* <li>parseIntegerOnly - see NumberFormat.isParseIntegerOnly</li>
* <li>roundingMode - see below</li>
* </ul>
* <p/>
* <p/>
* <p/>
* Possible values for rounding mode are :-
* <ul>
* <li>ceiling</li>
* <li>down</li>
* <li>floor</li>
* <li>half-down</li>
* <li>half-even</li>
* <li>half-up</li>
* <li>unnecessary</li>
* <li>up</li>
* </ul>
* <p/>
* <p/>
* <p/>
* <!-- END SNIPPET: javadoc -->
* <p/>
* <p/>
* <b>Examples</b>
* <p/>
* <pre>
* &lt;!-- START SNIPPET: example --&gt;
* &lt;s:number name=&quot;invoice.total&quot; type=&quot;currency&quot; currency=&quot;XYZ&quot; /&gt;
* &lt;s:number name=&quot;invoice.quantity&quot; type=&quot;number&quot; /&gt;
* &lt;s:number name=&quot;invoice.discount&quot; type=&quot;percentage&quot; /&gt;
* &lt;s:number name=&quot;invoice.terms&quot; type=&quot;integer&quot; /&gt;
* &lt;!-- END SNIPPET: example --&gt;
* </pre>
* <p/>
* <code>Number</code>
*/
@StrutsTag(name = "number", tldBodyContent = "empty", tldTagClass = "org.apache.struts2.views.jsp.NumberTag", description = "Render a formatted number.")
public class Number extends ContextBean {
private static final Logger LOG = LoggerFactory.getLogger(Number.class);
/**
* Property name to fall back when no format is specified
*/
public static final String NUMBERTAG_PROPERTY = "struts.number.format";
private String name;
private String currency;
private String type;
private Boolean groupingUsed;
private Integer maximumFractionDigits;
private Integer maximumIntegerDigits;
private Integer minimumFractionDigits;
private Integer minimumIntegerDigits;
private Boolean parseIntegerOnly;
private String roundingMode;
public Number(ValueStack stack) {
super(stack);
}
public boolean end(Writer writer, String body) {
java.lang.Number number = findNumberName();
if (number != null) {
NumberFormat format = getNumberFormat();
findCurrency(format);
setNumberFormatParameters(format);
setRoundingMode(format);
String msg = format.format(number);
if (msg != null) {
try {
if (getVar() == null) {
writer.write(msg);
} else {
putInContext(msg);
}
} catch (IOException e) {
LOG.error("Could not write out Number tag", e);
}
}
}
return super.end(writer, "");
}
// try to find the currency, percentage and integer on the stack
private void findCurrency(NumberFormat format) {
if (currency != null) {
Object currencyValue = findValue(currency);
if (currencyValue != null) {
currency = currencyValue.toString();
}
try {
format.setCurrency(Currency.getInstance(currency));
} catch (IllegalArgumentException iae) {
LOG.error("Could not recognise a currency of [" + currency + "]");
}
}
}
private void setNumberFormatParameters(NumberFormat format) {
if (groupingUsed != null) {
format.setGroupingUsed(groupingUsed);
}
if (maximumFractionDigits != null) {
format.setMaximumFractionDigits(maximumFractionDigits);
}
if (maximumIntegerDigits != null) {
format.setMaximumIntegerDigits(maximumIntegerDigits);
}
if (minimumFractionDigits != null) {
format.setMinimumFractionDigits(minimumFractionDigits);
}
if (minimumIntegerDigits != null) {
format.setMinimumIntegerDigits(minimumIntegerDigits);
}
if (parseIntegerOnly != null) {
format.setParseIntegerOnly(parseIntegerOnly);
}
}
private java.lang.Number findNumberName() {
java.lang.Number number = null;
// find the name on the valueStack
try {
// suport Calendar also
Object numberObject = findValue(name);
if (numberObject instanceof java.lang.Number) {
number = (java.lang.Number) numberObject;
}
} catch (Exception e) {
LOG.error("Could not convert object with key [" + name + "] to a java.lang.Number instance");
}
return number;
}
private void setRoundingMode(NumberFormat format) {
if (roundingMode != null) {
roundingMode = findString(roundingMode);
if ("ceiling".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.CEILING);
} else if ("down".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.DOWN);
} else if ("floor".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.FLOOR);
} else if ("half-down".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.HALF_DOWN);
} else if ("half-even".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.HALF_EVEN);
} else if ("half-up".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.HALF_UP);
} else if ("unnecessary".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.UNNECESSARY);
} else if ("up".equals(roundingMode)) {
format.setRoundingMode(RoundingMode.UP);
} else {
LOG.error("Could not recognise a roundingMode of [" + roundingMode + "]");
}
}
}
private NumberFormat getNumberFormat() {
NumberFormat format = null;
if (type == null) {
try {
type = findString(NUMBERTAG_PROPERTY);
} catch (Exception e) {
LOG.error("Could not find [" + NUMBERTAG_PROPERTY + "] on the stack!", e);
}
}
if (type != null) {
type = findString(type);
if ("currency".equals(type)) {
format = NumberFormat.getCurrencyInstance(ActionContext.getContext().getLocale());
} else if ("integer".equals(type)) {
format = NumberFormat.getIntegerInstance(ActionContext.getContext().getLocale());
} else if ("number".equals(type)) {
format = NumberFormat.getNumberInstance(ActionContext.getContext().getLocale());
} else if ("percent".equals(type)) {
format = NumberFormat.getPercentInstance(ActionContext.getContext().getLocale());
}
}
if (format == null) {
format = NumberFormat.getInstance(ActionContext.getContext().getLocale());
}
return format;
}
@StrutsTagAttribute(description = "Type of number formatter (currency, integer, number or percent, default is number)", rtexprvalue = false)
public void setType(String type) {
this.type = type;
}
@StrutsTagAttribute(description = "The currency to use for a currency format", type = "String", defaultValue = "")
public void setCurrency(String currency) {
this.currency = currency;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
@StrutsTagAttribute(description = "The number value to format", required = true)
public void setName(String name) {
this.name = name;
}
/**
* @return Returns the format.
*/
public String getType() {
return type;
}
/**
* @return Returns the currency.
*/
public String getCurrency() {
return currency;
}
@StrutsTagAttribute(description = "Whether grouping is used", type = "Boolean")
public void setGroupingUsed(Boolean groupingUsed) {
this.groupingUsed = groupingUsed;
}
/**
* @return Returns the grouping used.
*/
public Boolean isGroupingUsed() {
return groupingUsed;
}
/**
* @return the maximumFractionDigits
*/
public Integer getMaximumFractionDigits() {
return maximumFractionDigits;
}
/**
* @param maximumFractionDigits the maximumFractionDigits to set
*/
@StrutsTagAttribute(description = "Maximum fraction digits", type = "Integer")
public void setMaximumFractionDigits(Integer maximumFractionDigits) {
this.maximumFractionDigits = maximumFractionDigits;
}
/**
* @return the maximumIntegerDigits
*/
public Integer getMaximumIntegerDigits() {
return maximumIntegerDigits;
}
/**
* @param maximumIntegerDigits the maximumIntegerDigits to set
*/
@StrutsTagAttribute(description = "Maximum integer digits", type = "Integer")
public void setMaximumIntegerDigits(Integer maximumIntegerDigits) {
this.maximumIntegerDigits = maximumIntegerDigits;
}
/**
* @return the minimumFractionDigits
*/
public Integer getMinimumFractionDigits() {
return minimumFractionDigits;
}
/**
* @param minimumFractionDigits the minimumFractionDigits to set
*/
@StrutsTagAttribute(description = "Minimum fraction digits", type = "Integer")
public void setMinimumFractionDigits(Integer minimumFractionDigits) {
this.minimumFractionDigits = minimumFractionDigits;
}
/**
* @return the minimumIntegerDigits
*/
public Integer getMinimumIntegerDigits() {
return minimumIntegerDigits;
}
/**
* @param minimumIntegerDigits the minimumIntegerDigits to set
*/
@StrutsTagAttribute(description = "Maximum integer digits", type = "Integer")
public void setMinimumIntegerDigits(Integer minimumIntegerDigits) {
this.minimumIntegerDigits = minimumIntegerDigits;
}
/**
* @return the parseIntegerOnly
*/
public Boolean isParseIntegerOnly() {
return parseIntegerOnly;
}
/**
* @param parseIntegerOnly the parseIntegerOnly to set
*/
@StrutsTagAttribute(description = "Parse integer only", type = "Boolean")
public void setParseIntegerOnly(Boolean parseIntegerOnly) {
this.parseIntegerOnly = parseIntegerOnly;
}
/**
* @return the roundingMode
*/
public String getRoundingMode() {
return roundingMode;
}
/**
* @param roundingMode the roundingMode to set
*/
@StrutsTagAttribute(description = "The rounding mode to use", type = "String")
public void setRoundingMode(String roundingMode) {
this.roundingMode = roundingMode;
}
}
@@ -24,7 +24,7 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -176,10 +176,10 @@ public class Property extends Component {
private String prepare(String value) {
String result = value;
if (escapeHtml) {
result = StringEscapeUtils.escapeHtml(result);
result = StringEscapeUtils.escapeHtml4(result);
}
if (escapeJavaScript) {
result = StringEscapeUtils.escapeJavaScript(result);
result = StringEscapeUtils.escapeEcmaScript(result);
}
if (escapeXml) {
result = StringEscapeUtils.escapeXml(result);
@@ -27,16 +27,15 @@ import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.views.util.UrlHelper;
import org.apache.commons.lang.StringUtils;
import java.io.IOException;
import java.io.Writer;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -51,12 +50,17 @@ public class ServletUrlRenderer implements UrlRenderer {
private static final Logger LOG = LoggerFactory.getLogger(ServletUrlRenderer.class);
private ActionMapper actionMapper;
private UrlHelper urlHelper;
@Inject
public void setActionMapper(ActionMapper mapper) {
this.actionMapper = mapper;
}
@Inject
public void setUrlHelper(UrlHelper urlHelper) {
this.urlHelper = urlHelper;
}
/**
* {@inheritDoc}
@@ -87,7 +91,7 @@ public class ServletUrlRenderer implements UrlRenderer {
if (_value != null && _value.indexOf("?") > 0) {
_value = _value.substring(0, _value.indexOf("?"));
}
result = UrlHelper.buildUrl(_value, urlComponent.getHttpServletRequest(), urlComponent.getHttpServletResponse(), urlComponent.getParameters(), scheme, urlComponent.isIncludeContext(), urlComponent.isEncode(), urlComponent.isForceAddSchemeHostAndPort(), urlComponent.isEscapeAmp());
result = urlHelper.buildUrl(_value, urlComponent.getHttpServletRequest(), urlComponent.getHttpServletResponse(), urlComponent.getParameters(), scheme, urlComponent.isIncludeContext(), urlComponent.isEncode(), urlComponent.isForceAddSchemeHostAndPort(), urlComponent.isEscapeAmp());
}
String anchor = urlComponent.getAnchor();
if (StringUtils.isNotEmpty(anchor)) {
@@ -121,8 +125,7 @@ public class ServletUrlRenderer implements UrlRenderer {
* {@inheritDoc}
*/
public void renderFormUrl(Form formComponent) {
String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(),
formComponent.request);
String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(), formComponent.request);
String action;
if(formComponent.action != null) {
@@ -151,8 +154,8 @@ public class ServletUrlRenderer implements UrlRenderer {
if (actionConfig != null) {
ActionMapping mapping = new ActionMapping(actionName, namespace, actionMethod, formComponent.parameters);
String result = UrlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping),
formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
String result = urlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping),
formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
formComponent.addParameter("action", result);
// let's try to get the actual action class and name
@@ -187,7 +190,7 @@ public class ServletUrlRenderer implements UrlRenderer {
LOG.warn("No configuration found for the specified action: '" + actionName + "' in namespace: '" + namespace + "'. Form action defaulting to 'action' attribute's literal value.");
}
String result = UrlHelper.buildUrl(action, formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
String result = urlHelper.buildUrl(action, formComponent.request, formComponent.response, null, null, formComponent.includeContext, true);
formComponent.addParameter("action", result);
// namespace: cut out anything between the start and the last /
@@ -236,7 +239,7 @@ public class ServletUrlRenderer implements UrlRenderer {
}
if (UrlProvider.NONE.equalsIgnoreCase(includeParams)) {
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), Collections.EMPTY_MAP);
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), Collections.<String, Object>emptyMap());
} else if (UrlProvider.ALL.equalsIgnoreCase(includeParams)) {
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), urlComponent.getHttpServletRequest().getParameterMap());
@@ -267,7 +270,7 @@ public class ServletUrlRenderer implements UrlRenderer {
}
private void includeGetParameters(UrlProvider urlComponent) {
String query = extractQueryString(urlComponent);
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), UrlHelper.parseQueryString(query));
mergeRequestParameters(urlComponent.getValue(), urlComponent.getParameters(), urlHelper.parseQueryString(query, false));
}
private String extractQueryString(UrlProvider urlComponent) {
@@ -304,9 +307,9 @@ public class ServletUrlRenderer implements UrlRenderer {
* @param parameters component parameters
* @param contextParameters request parameters
*/
protected void mergeRequestParameters(String value, Map parameters, Map contextParameters){
protected void mergeRequestParameters(String value, Map<String, Object> parameters, Map<String, Object> contextParameters){
Map mergedParams = new LinkedHashMap(contextParameters);
Map<String, Object> mergedParams = new LinkedHashMap<String, Object>(contextParameters);
// Merge contextParameters (from current request) with parameters specified in value attribute
// eg. value="someAction.action?id=someId&venue=someVenue"
@@ -315,30 +318,23 @@ public class ServletUrlRenderer implements UrlRenderer {
if (value != null && value.trim().length() > 0 && value.indexOf("?") > 0) {
String queryString = value.substring(value.indexOf("?")+1);
mergedParams = UrlHelper.parseQueryString(queryString);
for (Iterator iterator = contextParameters.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
Object key = entry.getKey();
if (!mergedParams.containsKey(key)) {
mergedParams.put(key, entry.getValue());
mergedParams = urlHelper.parseQueryString(queryString, false);
for (Map.Entry<String, Object> entry : contextParameters.entrySet()) {
if (!mergedParams.containsKey(entry.getKey())) {
mergedParams.put(entry.getKey(), entry.getValue());
}
}
}
// Merge parameters specified in value attribute
// eg. value="someAction.action?id=someId&venue=someVenue"
// with parameters specified though param tag
// eg. <param name="id" value="%{'someId'}" />
// where parameters specified through param tag takes priority.
for (Iterator iterator = mergedParams.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
Object key = entry.getKey();
if (!parameters.containsKey(key)) {
parameters.put(key, entry.getValue());
for (Map.Entry<String, Object> entry : mergedParams.entrySet()) {
if (!parameters.containsKey(entry.getKey())) {
parameters.put(entry.getKey(), entry.getValue());
}
}
}
@@ -24,7 +24,7 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.util.TextProviderHelper;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;

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