Compare commits

..

74 Commits

Author SHA1 Message Date
Lukasz Lenart 9df00b0a86 [maven-release-plugin] copy for tag STRUTS_2_3_14
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14@1462298 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 20:51:33 +00:00
Lukasz Lenart 07fca85b08 [maven-release-plugin] prepare release STRUTS_2_3_14
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1462297 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 20:51:02 +00:00
Lukasz Lenart a1e8c628f5 WW-4022 Updates version of archetypes to match release version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1462292 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 20:21:52 +00:00
Lukasz Lenart 3d19149866 WW-4027 Changes app context to match archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1461961 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 06:33:38 +00:00
Maurizio Cucchiara d1635c5c9e minor change: adjusted indentation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1461735 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 17:33:18 +00:00
Maurizio Cucchiara 4eee1f4747 WW-4031 - Missing log4j.properties inside convention and blank app archetypes (placed log4j file in the right dir)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1461733 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 17:32:06 +00:00
Maurizio Cucchiara e5a217a891 WW-4031 - Missing log4j.properties inside convention and blank app archetypes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1461711 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 17:02:28 +00:00
Maurizio Cucchiara 90cd4fc717 WW-4030 - Blank, Convention and Starter archetype contains a wrong path
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1461694 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 16:25:56 +00:00
Christian Grobmeier aa991b14b0 WW-4029: do not print stacktraces when an optional class could not be loaded
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1461544 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 12:05:52 +00:00
Lukasz Lenart b9ebe65738 WW-4026 Improves logging
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1460986 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 06:27:47 +00:00
Lukasz Lenart 3bf95951bc WW-4025 Solves problem with NPE in TextParseUtil
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1460985 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 06:21:53 +00:00
Lukasz Lenart 3ae920e5a3 WW-2537 Cleans up code and adds usage of generics
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1460983 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 06:14:18 +00:00
Lukasz Lenart 00ce58a3d6 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1460302 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 09:58:59 +00:00
Lukasz Lenart 8ca0e87d35 [maven-release-plugin] prepare release STRUTS_2_3_13
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1460299 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 09:57:28 +00:00
Lukasz Lenart 01fd6750a0 WW-4022 Updates version of archetypes to match release version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1460292 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 09:40:49 +00:00
Lukasz Lenart f7594cf03f WW-3975 Adds logic to look for handler without specified charset
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459920 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 18:33:58 +00:00
Lukasz Lenart 8c7db9d2b0 WW-3988 Adds xwor.loggerFactory to allow define which implementation to use
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459734 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 11:46:48 +00:00
Lukasz Lenart 359bcdbe48 WW-3988 Changes order of looking for LoggerFactory, first trying to use commons-logging
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459689 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 09:59:43 +00:00
Lukasz Lenart 2c13925b49 WW-3964 Adds DEFAULT_PARAM to reduce noise in the logs
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459687 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 09:37:51 +00:00
Lukasz Lenart 6e33b77ad8 WW-4019 When looking for converter of primitive type fallback to defaultConverter
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459662 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 08:23:07 +00:00
Lukasz Lenart 1815a9925b WW-3389 Adds statusCode param as a excluded param to hide it in built url
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459660 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 08:05:36 +00:00
Lukasz Lenart 48394634f5 WW-3778 Adds missing version tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459657 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 07:53:07 +00:00
Lukasz Lenart eaa423dc71 WW-3997 Does small cleanup
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459650 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 07:22:45 +00:00
Lukasz Lenart b4f49eed47 WW-3997 Reverts logic regarding empty action name to allow UnknownHandler work
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459645 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 06:45:02 +00:00
Christian Grobmeier fc7ee40bd6 added example on how to use the convention plugin in conjunction with the junit plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458681 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 08:17:33 +00:00
Christian Grobmeier cee2b773b1 removed wildcard import
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458679 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 08:16:08 +00:00
Christian Grobmeier 6b98b9d33d added missing copyright information
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458678 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 08:12:59 +00:00
Lukasz Lenart aaa27dc380 WW-3994 Uses constructor injections instead property injections to avoid NPE
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458543 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 22:11:59 +00:00
Lukasz Lenart e091eb41f3 WW-3406 Solves NPE problem
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458537 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 21:58:55 +00:00
Lukasz Lenart b56b9b9ff4 WW-3996 Updates files of example app to match new param name
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458528 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 21:44:07 +00:00
Lukasz Lenart f1a2affae1 WW-4012 Changes order of params evaluation that the expression takes precedence
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457969 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 20:17:24 +00:00
Lukasz Lenart b68257de96 WW-4014 Improves VisitorFieldValidator annotation to match VisitorFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457746 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 13:01:47 +00:00
Lukasz Lenart 878d7e55cb WW-4013 Improves UrlValidator annotation to match UrlValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457744 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 12:54:02 +00:00
Lukasz Lenart cff4d773b4 WW-4012 Improves StringLengthFieldValidator annotation to match StringLengthFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457742 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 12:48:14 +00:00
Lukasz Lenart 4460ddae65 WW-4011 Improves ShortRangeFieldValidator annotation to match ShortRangeFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457733 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 12:28:12 +00:00
Lukasz Lenart 9122aff601 WW-4010 Improves RequiredStringValidator annotation to match RequiredStringValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457728 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 12:12:58 +00:00
Lukasz Lenart a4eb0803dc WW-4009 Improves RequiredFieldValidator annotation to match RequiredFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457722 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 12:00:22 +00:00
Lukasz Lenart 34a10bae06 WW-4008 Improves IntRangeFieldValidator annotation to match IntRangeFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457708 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 11:01:14 +00:00
Lukasz Lenart 8a4c6f9376 WW-4007 Improves FieldExpressionValidator annotation to match FieldExpressionValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457704 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 10:40:08 +00:00
Lukasz Lenart 62d20e0302 WW-4006 Improves ExpressionValidator annotation to match ExpressionValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457703 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 10:30:24 +00:00
Lukasz Lenart 80df6b3065 WW-4005 Improves EmailValidator annotation to match EmailValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457694 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 10:11:36 +00:00
Lukasz Lenart c20ed48c44 Re-formats code and removes empty lines
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457678 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 09:15:07 +00:00
Lukasz Lenart ae90857f11 WW-4004 Improves DoubleRangeFieldValidator annotation to match DoubleRangeFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457672 13f79535-47bb-0310-9956-ffa450edef68
2013-03-18 08:39:53 +00:00
Lukasz Lenart eb988a4b15 WW-4003 Improves DateRangeFieldValidator annotation to match DateRangeFieldValidator class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457552 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 20:22:18 +00:00
Lukasz Lenart 7e61564f82 WW-4002 Improves CustomValidator annotation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457442 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 13:25:41 +00:00
Christian Grobmeier 07c8e20161 WW-4017: Support multiple Action executions and Session values
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457393 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 07:45:59 +00:00
Christian Grobmeier 762cc86714 WW-4017: Support multiple Action executions and Session values
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457392 13f79535-47bb-0310-9956-ffa450edef68
2013-03-17 07:44:54 +00:00
Lukasz Lenart 42d24e190f WW-4001 Improves ConversionErrorFieldValidator annotation to match validator class ConversionErrorFieldValidator
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457267 13f79535-47bb-0310-9956-ffa450edef68
2013-03-16 15:55:48 +00:00
Lukasz Lenart 16fade2857 WW-4000 Improves ConditionalVisitorFieldValidator annotation to match validator class ConditionalVisitorFieldValidator
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457262 13f79535-47bb-0310-9956-ffa450edef68
2013-03-16 15:14:04 +00:00
Lukasz Lenart 9d10ca7a9b WW-3996 Updates RegexFieldValidator annotation to match implementing class and adds test to verify that
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457137 13f79535-47bb-0310-9956-ffa450edef68
2013-03-15 21:44:43 +00:00
Lukasz Lenart c66877c460 Extends logger params support
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457128 13f79535-47bb-0310-9956-ffa450edef68
2013-03-15 21:24:20 +00:00
Lukasz Lenart 34af1cd8a2 WW-3998 Extracts interface and adds default implementation base on existing code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1456961 13f79535-47bb-0310-9956-ffa450edef68
2013-03-15 14:02:12 +00:00
Lukasz Lenart da6fa05ed9 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1453279 13f79535-47bb-0310-9956-ffa450edef68
2013-03-06 10:44:43 +00:00
Lukasz Lenart 0de4b61ff2 [maven-release-plugin] prepare release STRUTS_2_3_12
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1453277 13f79535-47bb-0310-9956-ffa450edef68
2013-03-06 10:44:20 +00:00
Lukasz Lenart 41eb4c2444 WW-3977 Updates version of archetypes to match release version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1453267 13f79535-47bb-0310-9956-ffa450edef68
2013-03-06 10:23:35 +00:00
Lukasz Lenart 9220708b59 WW-3991 Removes one to much call to normalizeToFileProtocol() method
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1452471 13f79535-47bb-0310-9956-ffa450edef68
2013-03-04 19:51:27 +00:00
Lukasz Lenart d89ac943b4 WW-3990 Returns null when trying to escape null value instead of returning an empty string
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1452255 13f79535-47bb-0310-9956-ffa450edef68
2013-03-04 11:17:47 +00:00
Lukasz Lenart 8daf1db8d9 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1451116 13f79535-47bb-0310-9956-ffa450edef68
2013-02-28 06:34:21 +00:00
Lukasz Lenart 8cefc26601 [maven-release-plugin] prepare release STRUTS_2_3_11
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1451114 13f79535-47bb-0310-9956-ffa450edef68
2013-02-28 06:33:55 +00:00
Lukasz Lenart df8f62bb50 WW-3977 Updates version of archetypes to match release version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1451110 13f79535-47bb-0310-9956-ffa450edef68
2013-02-28 06:19:17 +00:00
Lukasz Lenart 890e62bcf8 WW-3977 changes site target
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1451109 13f79535-47bb-0310-9956-ffa450edef68
2013-02-28 06:17:33 +00:00
Lukasz Lenart fb161f5535 Best practise - filters output values
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1448581 13f79535-47bb-0310-9956-ffa450edef68
2013-02-21 11:07:21 +00:00
Lukasz Lenart fe36e8bf08 Changes how links to parent site are generated
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1448580 13f79535-47bb-0310-9956-ffa450edef68
2013-02-21 11:06:22 +00:00
Lukasz Lenart 66e95042ec WW-3984 Adds support for URLs which are already normalized to file protocol
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1447738 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 14:47:00 +00:00
Lukasz Lenart 9d20642ccc WW-3984 Reverts some changes from previous commit
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1447689 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 11:45:45 +00:00
Lukasz Lenart 94c0a6cfdf WW-3984 Adds additional logging to check what is wrong
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1447654 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 10:13:53 +00:00
Lukasz Lenart 1c55798977 WW-3986 Reverts partially changes introduced with WW-3363 to use @Inject MultiPartRequest instead of name of MultiPartRequest
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1447453 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 19:53:42 +00:00
Lukasz Lenart e6e1976f39 WW-3984 Adds support for Convention plugin which based on actions in a Jar file embedded in Ear file on JBoss 5 server
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1447442 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 19:13:44 +00:00
Lukasz Lenart 44615af72b Adjusts website to folder structure
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1445912 13f79535-47bb-0310-9956-ffa450edef68
2013-02-13 20:46:24 +00:00
Lukasz Lenart 0aefd0a8c1 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1443341 13f79535-47bb-0310-9956-ffa450edef68
2013-02-07 07:54:10 +00:00
Lukasz Lenart feafa63d71 [maven-release-plugin] prepare release STRUTS_2_3_10
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1443339 13f79535-47bb-0310-9956-ffa450edef68
2013-02-07 07:53:43 +00:00
Lukasz Lenart fc57c2c242 WW-3977 Updates version of archetypes to match release version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1443329 13f79535-47bb-0310-9956-ffa450edef68
2013-02-07 07:30:00 +00:00
Lukasz Lenart 0c00c11d0b WW-3908 Renames required into requiredLabel to allow support of Html5 required attribute
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1442481 13f79535-47bb-0310-9956-ffa450edef68
2013-02-05 07:08:38 +00:00
Lukasz Lenart a34bb460f5 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1442037 13f79535-47bb-0310-9956-ffa450edef68
2013-02-04 07:11:54 +00:00
151 changed files with 2655 additions and 873 deletions
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
@@ -34,9 +34,9 @@
<name>Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/apps/blank</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jboss-blank</artifactId>
@@ -34,9 +34,9 @@
<name>JBoss Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/jboss-blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/apps/jboss-blank</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
@@ -34,9 +34,9 @@
<name>Mail Reader Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/mailreader</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/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.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
@@ -42,9 +42,9 @@
</modules>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/apps</url>
</scm>
<profiles>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -34,9 +34,9 @@
<name>Portlet Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/apps/portlet</url>
</scm>
<profiles>
+2 -2
View File
@@ -26,13 +26,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.3.9</version>
<version>2.3.14</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
@@ -34,9 +34,9 @@
<name>Showcase Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/apps/showcase</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/apps/showcase</url>
</scm>
@@ -44,19 +44,19 @@ public class Skill implements IdEntity {
}
public String getName() {
return name;
return StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(name));
}
public void setName(String name) {
this.name = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(name));
this.name = name;
}
public String getDescription() {
return description;
return StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(description));
}
public void setDescription(String description) {
this.description = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(description));
this.description = description;
}
public Serializable getId() {
@@ -58,7 +58,7 @@
</field>
<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression">.*\.txt</param>
<param name="regex">.*\.txt</param>
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
</field-validator>
</field>
@@ -52,7 +52,7 @@
</field>
<field name="regexValidatorField">
<field-validator type="regex">
<param name="expression">.*\.txt</param>
<param name="regex"><![CDATA[ [^<>]+ ]]></param>
<message><![CDATA[ regexValidatorField must match a regexp (.*\.txt) if specified ]]></message>
</field-validator>
</field>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Maven Archetypes</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes</url>
</scm>
<modules>
+5 -5
View File
@@ -3,19 +3,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Blank</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-blank</url>
</scm>
<properties>
@@ -1,61 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="struts2-archetype-blank">
<fileSets>
<fileSet filtered="true" packaged="true">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*package*.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*-validation.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false">
<directory>src/main/resources</directory>
<includes>
<include>**/struts.xml</include>
<include>**/example.xml</include>
</includes>
</fileSet>
<fileSets>
<fileSet filtered="true" packaged="true">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp/example</directory>
<includes>
<include>**/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp</directory>
<includes>
<include>**/index.html</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/web.xml</include>
</includes>
</fileSet>
</fileSets>
<fileSet filtered="true" packaged="true">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*package*.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/resources</directory>
<includes>
<include>log4j.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*-validation.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false">
<directory>src/main/resources</directory>
<includes>
<include>**/struts.xml</include>
<include>**/example.xml</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp/example</directory>
<includes>
<include>**/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp</directory>
<includes>
<include>**/index.html</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/web.xml</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
@@ -74,7 +74,7 @@
<systemProperties>
<systemProperty>
<name>log4j.configuration</name>
<value>file:${basedir}/src/main/resources/log4j.properties</value>
<value>file:\${basedir}/src/main/resources/log4j.properties</value>
</systemProperty>
<systemProperty>
<name>slf4j</name>
@@ -82,10 +82,10 @@
</systemProperty>
</systemProperties>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppSourceDirectory>\${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppConfig>
<contextPath>/struts2-blank</contextPath>
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
<descriptor>\${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
</webAppConfig>
</configuration>
<dependencies>
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Blank Convention</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-convention</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-convention</url>
</scm>
<properties>
@@ -23,6 +23,13 @@
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/resources</directory>
<includes>
<include>log4j.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/resources</directory>
<includes>
@@ -88,7 +88,7 @@
<systemProperties>
<systemProperty>
<name>log4j.configuration</name>
<value>file:${basedir}/src/main/resources/log4j.properties</value>
<value>file:\${basedir}/src/main/resources/log4j.properties</value>
</systemProperty>
<systemProperty>
<name>slf4j</name>
@@ -96,10 +96,10 @@
</systemProperty>
</systemProperties>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppSourceDirectory>\${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppConfig>
<contextPath>/struts2-showcase</contextPath>
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
<contextPath>/struts2-convention</contextPath>
<descriptor>\${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
</webAppConfig>
</configuration>
<dependencies>
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Database Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-dbportlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-dbportlet</url>
</scm>
<properties>
+5 -5
View File
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-plugin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-plugin</url>
</scm>
<properties>
+5 -5
View File
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-portlet</url>
</scm>
<properties>
+5 -5
View File
@@ -4,19 +4,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Starter</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/archetypes/struts2-archetype-starter</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/archetypes/struts2-archetype-starter</url>
</scm>
<properties>
@@ -97,7 +97,7 @@
<systemProperties>
<systemProperty>
<name>log4j.configuration</name>
<value>file:${basedir}/src/main/resources/log4j.properties</value>
<value>file:\${basedir}/src/main/resources/log4j.properties</value>
</systemProperty>
<systemProperty>
<name>slf4j</name>
@@ -105,10 +105,10 @@
</systemProperty>
</systemProperties>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppSourceDirectory>\${basedir}/src/main/webapp/</webAppSourceDirectory>
<webAppConfig>
<contextPath>/struts2-showcase</contextPath>
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
<descriptor>\${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
</webAppConfig>
</configuration>
<dependencies>
+4 -4
View File
@@ -11,13 +11,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/assembly</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/assembly</url>
</scm>
<profiles>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-admin-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Admin Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/bundles/admin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/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.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-demo-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Demo Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/bundles/demo</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/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.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
@@ -34,9 +34,9 @@
<name>Struts OSGi Bundles</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/bundles</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/bundles</url>
</scm>
<modules>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Core</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/core</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/core</url>
</scm>
<properties>
@@ -247,4 +247,6 @@ public final class StrutsConstants {
public static final String STRUTS_CONVERTER_CREATOR = "struts.converter.creator";
public static final String STRUTS_CONVERTER_HOLDER = "struts..converter.holder";
public static final String STRUTS_EXPRESSION_PARSER = "struts.expression.parser";
}
@@ -881,7 +881,7 @@ public abstract class UIBean extends Component {
if (name != null) {
return name.replaceAll("[\\/\\.\\[\\]]", "_");
} else {
return "";
return null;
}
}
@@ -895,7 +895,7 @@ public abstract class UIBean extends Component {
if (val != null) {
return val.replaceAll("\"", "&#34;");
} else {
return "";
return null;
}
}
@@ -49,10 +49,7 @@ import com.opensymphony.xwork2.inject.ContainerBuilder;
import com.opensymphony.xwork2.inject.Context;
import com.opensymphony.xwork2.inject.Factory;
import com.opensymphony.xwork2.inject.Scope;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.PatternMatcher;
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.util.*;
import com.opensymphony.xwork2.util.location.LocatableProperties;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
@@ -276,6 +273,13 @@ import java.util.StringTokenizer;
* <td>singleton</td>
* <td>Holds user converters' instances</td>
* </tr>
* <tr>
* <td>com.opensymphony.xwork2.util.TextParser</td>
* <td>struts.expression.parser</td>
* <td>singleton</td>
* <td>Used to parse expressions like ${foo.bar} or %{bar.foo} but it is up tp the TextParser's
* implementation what kind of opening char to use (#, $, %, etc)</td>
* </tr>
* </table>
*
* <!-- END SNIPPET: extensionPoints -->
@@ -355,6 +359,8 @@ public class BeanSelectionProvider implements ConfigurationProvider {
alias(UnknownHandlerManager.class, StrutsConstants.STRUTS_UNKNOWN_HANDLER_MANAGER, builder, props);
alias(UrlHelper.class, StrutsConstants.STRUTS_URL_HELPER, builder, props);
alias(TextParser.class, StrutsConstants.STRUTS_EXPRESSION_PARSER, builder, props);
if ("true".equalsIgnoreCase(props.getProperty(StrutsConstants.STRUTS_DEVMODE))) {
props.setProperty(StrutsConstants.STRUTS_I18N_RELOAD, "true");
props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true");
@@ -139,9 +139,9 @@ public class Dispatcher {
private String multipartSaveDir;
/**
* Stores reference to instance of {@link MultiPartRequest} implementation defined by {@link StrutsConstants#STRUTS_MULTIPART_PARSER}
* Stores the value of StrutsConstants.STRUTS_MULTIPART_HANDLER setting
*/
private MultiPartRequest multipartHandler;
private String multipartHandlerName;
/**
* Provide list of default configuration files.
@@ -252,9 +252,9 @@ public class Dispatcher {
multipartSaveDir = val;
}
@Inject
public void setMultipartHandler(MultiPartRequest multiPartRequest) {
this.multipartHandler = multiPartRequest;
@Inject(StrutsConstants.STRUTS_MULTIPART_PARSER)
public void setMultipartHandler(String val) {
multipartHandlerName = val;
}
@Inject
@@ -774,8 +774,9 @@ public class Dispatcher {
String content_type = request.getContentType();
if (content_type != null && content_type.contains("multipart/form-data")) {
MultiPartRequest mpr = getMultiPartRequest();
LocaleProvider provider = getContainer().getInstance(LocaleProvider.class);
request = new MultiPartRequestWrapper(multipartHandler, request, getSaveDir(servletContext), provider);
request = new MultiPartRequestWrapper(mpr, request, getSaveDir(servletContext), provider);
} else {
request = new StrutsRequestWrapper(request);
}
@@ -783,6 +784,27 @@ public class Dispatcher {
return request;
}
/**
* On each request it must return a new instance as implementation could be not thread safe
* and thus ensure of resource clean up
*
* @return
*/
protected MultiPartRequest getMultiPartRequest() {
MultiPartRequest mpr = null;
//check for alternate implementations of MultiPartRequest
Set<String> multiNames = getContainer().getInstanceNames(MultiPartRequest.class);
for (String multiName : multiNames) {
if (multiName.equals(multipartHandlerName)) {
mpr = getContainer().getInstance(MultiPartRequest.class, multiName);
}
}
if (mpr == null ) {
mpr = getContainer().getInstance(MultiPartRequest.class);
}
return mpr;
}
/**
* Removes all the files created by MultiPartRequestWrapper.
*
@@ -82,6 +82,11 @@ public class HttpHeaderResult implements Result {
private static final long serialVersionUID = 195648957144219214L;
private static final Logger LOG = LoggerFactory.getLogger(HttpHeaderResult.class);
/**
* This result type doesn't have a default param, null is ok to reduce noice in logs
*/
public static final String DEFAULT_PARAM = null;
private boolean parse = true;
private Map<String, String> headers;
private int status = -1;
@@ -198,8 +198,9 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec
if (resultConfig != null) {
Map<String, String> resultConfigParams = resultConfig.getParams();
List<String> prohibitedResultParams = getProhibitedResultParams();
for (Map.Entry<String, String> e : resultConfigParams.entrySet()) {
if (!getProhibitedResultParams().contains(e.getKey())) {
if (!prohibitedResultParams.contains(e.getKey())) {
String potentialValue = e.getValue() == null ? "" : conditionalParse(e.getValue(), invocation);
if (!suppressEmptyParameters || ((potentialValue != null) && (potentialValue.length() > 0))) {
requestParameters.put(e.getKey(), potentialValue);
@@ -227,7 +228,18 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec
}
protected List<String> getProhibitedResultParams() {
return Arrays.asList(DEFAULT_PARAM, "namespace", "method", "encode", "parse", "location", "prependServletContext", "suppressEmptyParameters", "anchor");
return Arrays.asList(
DEFAULT_PARAM,
"namespace",
"method",
"encode",
"parse",
"location",
"prependServletContext",
"suppressEmptyParameters",
"anchor",
"statusCode"
);
}
/**
@@ -197,13 +197,13 @@ public abstract class StrutsResultSupport implements Result, StrutsStatics {
if (parse && param != null && invocation != null) {
return TextParseUtil.translateVariables(param, invocation.getStack(),
new TextParseUtil.ParsedValueEvaluator() {
public Object evaluate(Object parsedValue) {
public Object evaluate(String parsedValue) {
if (encode) {
if (parsedValue != null) {
try {
// use UTF-8 as this is the recommended encoding by W3C to
// avoid incompatibilities.
return URLEncoder.encode(parsedValue.toString(), "UTF-8");
return URLEncoder.encode(parsedValue, "UTF-8");
}
catch(UnsupportedEncodingException e) {
if (LOG.isWarnEnabled()) {
@@ -21,18 +21,16 @@
package org.apache.struts2.dispatcher.mapper;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.StrutsConstants;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.StrutsConstants;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/**
* <!-- START SNIPPET: description -->
@@ -88,12 +86,11 @@ public class CompositeActionMapper implements ActionMapper {
protected Container container;
protected List<ActionMapper> actionMappers = new ArrayList<ActionMapper>();
@Inject
public void setContainer(Container container) {
public CompositeActionMapper(@Inject Container container) {
this.container = container;
}
@Inject(StrutsConstants.STRUTS_MAPPER_COMPOSITE)
public void setActionMappers(String list) {
if (list != null) {
@@ -295,8 +295,7 @@ public class DefaultActionMapper implements ActionMapper {
*
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getMapping(javax.servlet.http.HttpServletRequest)
*/
public ActionMapping getMapping(HttpServletRequest request,
ConfigurationManager configManager) {
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
ActionMapping mapping = new ActionMapping();
String uri = getUri(request);
@@ -309,22 +308,13 @@ public class DefaultActionMapper implements ActionMapper {
}
parseNameAndNamespace(uri, mapping, configManager);
handleSpecialParameters(request, mapping);
// if Action name is empty it can be a request to static resource, return null to handle that case
if (StringUtils.isEmpty(mapping.getName())) {
return null;
}
parseActionName(mapping);
return mapping;
return parseActionName(mapping);
}
protected ActionMapping parseActionName(ActionMapping mapping) {
if (mapping.getName() == null) {
return mapping;
return null;
}
if (allowDynamicMethodCalls) {
// handle "name!method" convention.
@@ -346,8 +336,7 @@ public class DefaultActionMapper implements ActionMapper {
* @param request The request
* @param mapping The action mapping
*/
public void handleSpecialParameters(HttpServletRequest request,
ActionMapping mapping) {
public void handleSpecialParameters(HttpServletRequest request, ActionMapping mapping) {
// handle special parameter prefixes.
Set<String> uniqueParameters = new HashSet<String>();
Map parameterMap = request.getParameterMap();
@@ -377,8 +366,7 @@ public class DefaultActionMapper implements ActionMapper {
* @param uri The uri
* @param mapping The action mapping to populate
*/
protected void parseNameAndNamespace(String uri, ActionMapping mapping,
ConfigurationManager configManager) {
protected void parseNameAndNamespace(String uri, ActionMapping mapping, ConfigurationManager configManager) {
String namespace, name;
int lastSlash = uri.lastIndexOf("/");
if (lastSlash == -1) {
@@ -421,7 +409,7 @@ public class DefaultActionMapper implements ActionMapper {
}
}
if (!allowSlashesInActionNames && name != null) {
if (!allowSlashesInActionNames) {
int pos = name.lastIndexOf('/');
if (pos > -1 && pos < name.length() - 1) {
name = name.substring(pos + 1);
@@ -2,12 +2,14 @@ package org.apache.struts2.util.fs;
import com.opensymphony.xwork2.util.fs.DefaultFileManager;
import com.opensymphony.xwork2.util.fs.FileRevision;
import com.opensymphony.xwork2.util.fs.JarEntryRevision;
import com.opensymphony.xwork2.util.fs.Revision;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
@@ -45,7 +47,7 @@ public class JBossFileManager extends DefaultFileManager {
return true;
} catch (ClassNotFoundException e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Cannot load [#0] class, not a JBoss 5!", VFS_JBOSS7);
LOG.debug("Cannot load [#0] class, not a JBoss 5!", VFS_JBOSS5);
}
return false;
}
@@ -70,7 +72,18 @@ public class JBossFileManager extends DefaultFileManager {
if (LOG.isDebugEnabled()) {
LOG.debug("Creating revision for URL: " + fileName);
}
Revision revision = FileRevision.build(normalizeToFileProtocol(fileUrl));
URL normalizedUrl = normalizeToFileProtocol(fileUrl);
if (LOG.isDebugEnabled()) {
LOG.debug("Normalized URL for [#0] is [#1]", fileName, normalizedUrl.toString());
}
Revision revision;
if ("file".equals(normalizedUrl.getProtocol())) {
revision = FileRevision.build(normalizedUrl);
} else if ("jar".equals(normalizedUrl.getProtocol())) {
revision = JarEntryRevision.build(normalizedUrl);
} else {
revision = Revision.build(normalizedUrl);
}
files.put(fileName, revision);
} else {
super.monitorFile(fileUrl);
@@ -122,43 +135,71 @@ public class JBossFileManager extends DefaultFileManager {
*/
protected URL getJBossPhysicalUrl(URL url) throws IOException {
Object content = url.openConnection().getContent();
try {
String s = content.getClass().toString();
if (s.startsWith("class org.jboss.vfs.VirtualFile")) { // JBoss 7 and probably 6
File physicalFile = readJBossPhysicalFile(content);
return physicalFile.toURI().toURL();
} else if (s.startsWith("class org.jboss.virtual.VirtualFile")) { // JBoss 5
String fileName = url.toExternalForm();
return new URL("file", null, fileName.substring(fileName.indexOf(":") + 1));
}
} catch (Exception e) {
LOG.warn("Error calling getPhysicalFile() on JBoss VirtualFile.", e);
String classContent = content.getClass().toString();
if (LOG.isDebugEnabled()) {
LOG.debug("Reading physical URL for [#0]", url.toString());
}
if (classContent.startsWith("class org.jboss.vfs.VirtualFile")) { // JBoss 7 and probably 6
File physicalFile = readJBossPhysicalFile(content);
return physicalFile.toURI().toURL();
} else if (classContent.startsWith("class org.jboss.virtual.VirtualFile")) { // JBoss 5
return readJBoss5Url(content);
}
return url;
}
private File readJBossPhysicalFile(Object content) throws Exception {
Method method = content.getClass().getDeclaredMethod("getPhysicalFile");
return (File) method.invoke(content);
}
private List<URL> getAllJBossPhysicalUrls(URL url) throws IOException {
List<URL> urls = new ArrayList<URL>();
Object content = url.openConnection().getContent();
try {
if (content.getClass().toString().startsWith("class org.jboss.vfs.VirtualFile")) {
File physicalFile = readJBossPhysicalFile(content);
String classContent = content.getClass().toString();
if (classContent.startsWith("class org.jboss.vfs.VirtualFile")) {
File physicalFile = readJBossPhysicalFile(content);
if (physicalFile != null) {
readFile(urls, physicalFile);
readFile(urls, physicalFile.getParentFile());
} else {
urls.add(url);
}
} catch (Exception e) {
LOG.warn("Error calling getPhysicalFile() on JBoss VirtualFile!", e);
} else if (classContent.startsWith("class org.jboss.virtual.VirtualFile")) {
URL physicalUrl = readJBoss5Url(content);
if (physicalUrl != null) {
urls.add(physicalUrl);
}
} else {
urls.add(url);
}
return urls;
}
private File readJBossPhysicalFile(Object content) {
try {
Method method = content.getClass().getDeclaredMethod("getPhysicalFile");
return (File) method.invoke(content);
} catch (NoSuchMethodException e) {
LOG.error("Provided class content [#0] is not a JBoss VirtualFile, getPhysicalFile() method not found!", e, content.getClass().getSimpleName());
} catch (InvocationTargetException e) {
LOG.error("Cannot invoke getPhysicalFile() method!", e);
} catch (IllegalAccessException e) {
LOG.error("Cannot access getPhysicalFile() method!", e);
}
return null;
}
private URL readJBoss5Url(Object content) {
try {
Method method = content.getClass().getDeclaredMethod("getHandler");
method.setAccessible(true);
Object handler = method.invoke(content);
method = handler.getClass().getMethod("getRealURL");
return (URL) method.invoke(handler);
} catch (NoSuchMethodException e) {
LOG.error("Provided class content [#0] is not a JBoss VirtualFile, getHandler() or getRealURL() method not found!", e, content.getClass().getSimpleName());
} catch (InvocationTargetException e) {
LOG.error("Cannot invoke getHandler() or getRealURL() method!", e);
} catch (IllegalAccessException e) {
LOG.error("Cannot access getHandler() or getRealURL() method!", e);
}
return null;
}
private void readFile(List<URL> urls, File physicalFile) throws MalformedURLException {
File[] files = physicalFile.listFiles();
if (physicalFile.isDirectory() && files != null) {
@@ -26,6 +26,8 @@ import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import freemarker.template.Configuration;
import freemarker.template.ObjectWrapper;
import freemarker.template.Template;
@@ -103,6 +105,8 @@ public class FreemarkerResult extends StrutsResultSupport {
private static final long serialVersionUID = -3778230771704661631L;
private static final Logger LOG = LoggerFactory.getLogger(FreemarkerResult.class);
protected ActionInvocation invocation;
protected Configuration configuration;
protected ObjectWrapper wrapper;
@@ -191,6 +195,16 @@ public class FreemarkerResult extends StrutsResultSupport {
parentCharArrayWriter.flush();
parentCharArrayWriter.writeTo(writer);
}
} catch (TemplateException e) {
if (LOG.isErrorEnabled()) {
LOG.error("Error processing Freemarker result!", e);
}
throw e;
} catch (IOException e) {
if (LOG.isErrorEnabled()){
LOG.error("Error processing Freemarker result!", e);
}
throw e;
} finally {
if (isTopTemplate && parentCharArrayWriter != null) {
req.removeAttribute(PARENT_TEMPLATE_WRITER);
@@ -48,7 +48,7 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
protected String requiredposition;
protected String errorPosition;
protected String name;
protected String required;
protected String requiredLabel;
protected String tabindex;
protected String value;
protected String template;
@@ -100,7 +100,7 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
uiBean.setRequiredPosition(requiredposition);
uiBean.setErrorPosition(errorPosition);
uiBean.setName(name);
uiBean.setRequiredLabel(required);
uiBean.setRequiredLabel(requiredLabel);
uiBean.setTabindex(tabindex);
uiBean.setValue(value);
uiBean.setTemplate(template);
@@ -181,8 +181,8 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
this.name = name;
}
public void setRequired(String required) {
this.required = required;
public void setRequiredLabel(String requiredLabel) {
this.requiredLabel = requiredLabel;
}
public void setTabindex(String tabindex) {
@@ -100,6 +100,8 @@
<bean class="com.opensymphony.xwork2.ognl.OgnlUtil" />
<bean type="com.opensymphony.xwork2.util.TextParser" name="struts" class="com.opensymphony.xwork2.util.OgnlTextParser" scope="singleton"/>
<bean type="ognl.PropertyAccessor" name="com.opensymphony.xwork2.util.CompoundRoot" class="com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor" />
<bean type="ognl.PropertyAccessor" name="java.lang.Object" class="com.opensymphony.xwork2.ognl.accessor.ObjectAccessor" />
<bean type="ognl.PropertyAccessor" name="java.util.Iterator" class="com.opensymphony.xwork2.ognl.accessor.XWorkIteratorPropertyAccessor" />
@@ -183,6 +183,7 @@ public class ServletRedirectResultTest extends StrutsTestCase implements StrutsS
.addParam("location", "someLocation")
.addParam("prependServletContext", "true")
.addParam("method", "someMethod")
.addParam("statusCode", "333")
.addParam("param1", "value 1")
.addParam("param2", "value 2")
.addParam("param3", "value 3")
@@ -221,7 +222,6 @@ public class ServletRedirectResultTest extends StrutsTestCase implements StrutsS
result.setActionMapper(container.getInstance(ActionMapper.class));
result.execute(mockInvocation);
assertEquals("/myNamespace/myAction.action?param1=value+1&param2=value+2&param3=value+3#fragment", res.getRedirectedUrl());
control.verify();
}
@@ -21,23 +21,14 @@
package org.apache.struts2.dispatcher.mapper;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.StrutsConstants;
import org.springframework.mock.web.MockHttpServletRequest;
import com.mockobjects.dynamic.C;
import com.mockobjects.dynamic.Mock;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Scope.Strategy;
import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import javax.servlet.http.HttpServletRequest;
/**
*
@@ -49,9 +40,8 @@ public class CompositeActionMapperTest extends TestCase {
Mock mockContainer;
public void setUp() throws Exception {
compositeActionMapper = new CompositeActionMapper();
mockContainer = new Mock(Container.class);
compositeActionMapper.setContainer((Container)mockContainer.proxy());
compositeActionMapper = new CompositeActionMapper((Container)mockContainer.proxy());
}
@@ -21,17 +21,6 @@
package org.apache.struts2.dispatcher.mapper;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.dispatcher.ServletRedirectResult;
import org.apache.struts2.dispatcher.StrutsResultSupport;
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse;
import com.mockobjects.dynamic.Mock;
import com.mockobjects.servlet.MockHttpServletRequest;
import com.opensymphony.xwork2.ActionContext;
@@ -41,6 +30,16 @@ import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.dispatcher.ServletRedirectResult;
import org.apache.struts2.dispatcher.StrutsResultSupport;
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* DefaultActionMapper test case.
@@ -257,8 +256,7 @@ public class DefaultActionMapperTest extends StrutsTestCase {
public void testGetMappingWithActionName_null() throws Exception {
DefaultActionMapper mapper = new DefaultActionMapper();
ActionMapping mapping = mapper.getMappingFromActionName(null);
assertEquals(null, mapping.getName());
assertEquals(null, mapping.getMethod());
assertNull(mapping);
}
public void testGetUri() throws Exception {
+1 -1
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-codebehind-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Codebehind Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/codebehind</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/codebehind</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/codebehind</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/codebehind</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/codebehind</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/codebehind</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Configuration Browser Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/config-browser</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/config-browser</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/config-browser</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/config-browser</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/config-browser</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/config-browser</url>
</scm>
</project>
+4 -4
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
@@ -11,9 +11,9 @@
<name>Struts 2 Convention Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-convention-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-convention-plugin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-convention-plugin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_14/trunk/struts2-convention-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_14/trunk/struts2-convention-plugin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_14/trunk/struts2-convention-plugin</url>
</scm>
<build>
@@ -757,7 +757,7 @@ public class PackageBasedActionConfigBuilderTest extends TestCase {
((ObjectFactory)obj).setReflectionProvider(new OgnlReflectionProvider() {
@Override
public void setProperties(Map<String, String> properties, Object o) {
public void setProperties(Map<String, ?> properties, Object o) {
}
public void setProperties(Map<String, String> properties, Object o, Map<String, Object> context, boolean throwPropertyExceptions) throws ReflectionException {
+4 -4
View File
@@ -25,7 +25,7 @@
<parent>
<artifactId>struts2-plugins</artifactId>
<groupId>org.apache.struts</groupId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.struts</groupId>
@@ -33,9 +33,9 @@
<name>Struts 2 Dojo Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dojo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dojo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/dojo</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/dojo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/dojo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/dojo</url>
</scm>
<profiles>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dwr-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 DWR Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dwr</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/dwr</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/dwr</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/dwr</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/dwr</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/dwr</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
@@ -35,9 +35,9 @@
<name>Struts 2 Embedded JSP Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/embeddedjsp</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/embeddedjsp</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/embeddedjsp</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/embeddedjsp</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/embeddedjsp</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/embeddedjsp</url>
</scm>
<dependencies>
@@ -25,6 +25,8 @@ import com.opensymphony.xwork2.FileManager;
import com.opensymphony.xwork2.FileManagerFactory;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.TextParser;
import com.opensymphony.xwork2.util.OgnlTextParser;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate;
@@ -275,6 +277,8 @@ public class EmbeddedJSPResultTest extends TestCase {
//mock container
Container container = EasyMock.createNiceMock(Container.class);
EasyMock.expect(container.getInstance(XWorkConverter.class)).andReturn(converter).anyTimes();
TextParser parser = new OgnlTextParser();
EasyMock.expect(container.getInstance(TextParser.class)).andReturn(parser).anyTimes();
EasyMock.expect(container.getInstanceNames(FileManager.class)).andReturn(new HashSet<String>()).anyTimes();
EasyMock.expect(container.getInstance(FileManager.class)).andReturn(fileManager).anyTimes();
+4 -4
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
@@ -13,9 +13,9 @@
<url>http://struts.apache.org</url>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-gxp-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-gxp-plugin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_9/trunk/struts2-gxp-plugin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_14/trunk/struts2-gxp-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/sandbox/tags/STRUTS_2_3_14/trunk/struts2-gxp-plugin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/sandbox/tags/STRUTS_2_3_14/trunk/struts2-gxp-plugin</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jasperreports-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Jasper Reports Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jasperreports</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jasperreports</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/jasperreports</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/jasperreports</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/jasperreports</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/jasperreports</url>
</scm>
<dependencies>
+4 -4
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-javatemplates-plugin</artifactId>
@@ -33,9 +33,9 @@
<name>Struts 2 Java Templates Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/javatemplates</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/javatemplates</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/javatemplates</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/javatemplates</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/javatemplates</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/javatemplates</url>
</scm>
<dependencies>
@@ -24,10 +24,12 @@ package org.apache.struts2.views.java.simple;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.TextParser;
import com.opensymphony.xwork2.util.OgnlTextParser;
import com.opensymphony.xwork2.util.ValueStack;
import junit.framework.TestCase;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.components.Component;
import org.apache.struts2.components.UIBean;
import org.apache.struts2.components.template.Template;
@@ -107,6 +109,8 @@ public abstract class AbstractTest extends TestCase {
XWorkConverter converter = new ConverterEx();
EasyMock.expect(container.getInstance(String.class, StrutsConstants.STRUTS_TAG_ALTSYNTAX)).andReturn("true").anyTimes();
EasyMock.expect(container.getInstance(XWorkConverter.class)).andReturn(converter).anyTimes();
TextParser parser = new OgnlTextParser();
EasyMock.expect(container.getInstance(TextParser.class)).andReturn(parser).anyTimes();
stackContext.put(ActionContext.CONTAINER, container);
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jfreechart-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 JFreeChart Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jfreechart</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jfreechart</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/jfreechart</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/jfreechart</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/jfreechart</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/jfreechart</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jsf-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 JSF Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jsf</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/jsf</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/jsf</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/jsf</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/jsf</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/jsf</url>
</scm>
<dependencies>
@@ -21,15 +21,14 @@
package org.apache.struts2.jsf;
import java.util.Map;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
import java.util.Map;
/**
* Overrides the JFS navigation by delegating the result to handling by the core
* result code lookup and execution. If a result cannot be found, the previous
@@ -60,7 +59,7 @@ public class StrutsNavigationHandler extends NavigationHandler {
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
ActionContext ctx = ActionContext.getContext();
if (outcome != null) {
if (ctx == null && ctx.getActionInvocation() == null) {
if (ctx == null || ctx.getActionInvocation() == null) {
delegateToParentNavigation(facesContext, fromAction, outcome);
} else {
ActionConfig config = ctx.getActionInvocation().getProxy().getConfig();
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 JSON Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/json</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/json</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/json</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/json</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/json</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/json</url>
</scm>
<build>
+13 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 JUnit Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/junit</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/junit</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/junit</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/junit</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/junit</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/junit</url>
</scm>
<dependencies>
@@ -66,6 +66,15 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- Convention Plugin tests -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<!-- Portlet -->
<dependency>
<groupId>javax.portlet</groupId>
@@ -21,7 +21,11 @@
package org.apache.struts2;
import com.opensymphony.xwork2.*;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.ActionProxyFactory;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.XWorkJUnit4TestCase;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.interceptor.annotations.After;
import com.opensymphony.xwork2.interceptor.annotations.Before;
@@ -41,12 +45,18 @@ import org.springframework.mock.web.MockServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.*;
import java.util.logging.ConsoleHandler;
import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import static org.junit.Assert.assertNotNull;
@@ -199,6 +209,23 @@ public abstract class StrutsJUnit4TestCase<T> extends XWorkJUnit4TestCase {
pageContext = new MockPageContext(servletContext, request, response);
}
public void finishExecution() {
HttpSession session = this.request.getSession();
Enumeration attributeNames = session.getAttributeNames();
MockHttpServletRequest nextRequest = new MockHttpServletRequest();
while (attributeNames.hasMoreElements()) {
String key = (String) attributeNames.nextElement();
Object attribute = session.getAttribute(key);
nextRequest.getSession().setAttribute(key, attribute);
}
this.response = new MockHttpServletResponse();
this.request = nextRequest;
this.pageContext = new MockPageContext(servletContext, request, response);
}
/**
* Sets up the configuration settings, XWork configuration, and
* message resources
@@ -0,0 +1,42 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package actions;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
/**
* Example action, which is called by the convention plugin test case
*/
public class ViewAction extends ActionSupport {
private String message;
public String getMessage() {
return message;
}
public String execute() {
message = "Hello World";
return SUCCESS;
}
}
@@ -0,0 +1,46 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.convention;
import actions.ViewAction;
import org.apache.struts2.StrutsJUnit4TestCase;
import org.junit.Assert;
import org.junit.Test;
/**
* Uses the convention plugin to execute actions
*/
public class StrutsJUnit4ConventionTestCaseTest extends StrutsJUnit4TestCase<ViewAction>{
@Test
public void testConventionUrl() throws Exception {
// TODO: Currently output is empty
String output = executeAction("/view.action");
ViewAction action = this.getAction();
Assert.assertEquals("Hello World", action.getMessage());
}
@Override
protected String getConfigPath() {
return "struts-convention-configuration.xml";
}
}
@@ -0,0 +1,35 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.session;
import com.opensymphony.xwork2.ActionSupport;
/**
* An action which reads a value from the session.
* The value is previously set by SessionSetAction.
*/
public class SessionGetAction extends ActionSupport {
private static final long serialVersionUID = 8366502863472148631L;
public String execute() {
return ActionSupport.SUCCESS;
}
}
@@ -0,0 +1,39 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.session;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
/**
* An action which sets a value into the session
*/
public class SessionSetAction extends ActionSupport {
private static final long serialVersionUID = -3097127804272607687L;
public String SESSION_KEY = "sessionKey";
public String SESSION_VALUE = "sessionValue";
public String execute() {
ActionContext.getContext().getSession().put(SESSION_KEY, SESSION_VALUE);
return ActionSupport.SUCCESS;
}
}
@@ -0,0 +1,53 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.session;
import org.apache.struts2.JUnitTestAction;
import org.apache.struts2.StrutsJUnit4TestCase;
import org.junit.Assert;
import org.junit.Test;
/**
* Calls SessionSet which sets a value into the session and afterwards calls SessionGet, which
* should return this session value.
*
* In prior versions only one executeAction() call could happen in a single test case, because
* either the session values were deleted or the wrong result would be returned (always the result of
* the first action execution).
*/
public class StrutsJUnit4SessionTestCaseTest extends StrutsJUnit4TestCase<JUnitTestAction>{
@Test
public void testPersistingSessionValues() throws Exception {
String output = executeAction("/sessiontest/sessionSet.action");
Assert.assertEquals("sessionValue", output);
this.finishExecution();
String output2 = executeAction("/sessiontest/sessionGet.action");
Assert.assertEquals("sessionValue", output2);
}
@Override
protected String getConfigPath() {
return "struts-session-values-test.xml";
}
}
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<bean type="com.opensymphony.xwork2.UnknownHandler" name="convention" class="org.apache.struts2.convention.ConventionUnknownHandler"/>
<bean type="org.apache.struts2.convention.ActionConfigBuilder" name="convention" class="org.apache.struts2.convention.PackageBasedActionConfigBuilder"/>
<bean type="org.apache.struts2.convention.ActionNameBuilder" name="convention" class="org.apache.struts2.convention.SEOActionNameBuilder"/>
<bean type="org.apache.struts2.convention.ResultMapBuilder" name="convention" class="org.apache.struts2.convention.DefaultResultMapBuilder"/>
<bean type="org.apache.struts2.convention.InterceptorMapBuilder" name="convention" class="org.apache.struts2.convention.DefaultInterceptorMapBuilder"/>
<bean type="org.apache.struts2.convention.ConventionsService" name="convention" class="org.apache.struts2.convention.ConventionsServiceImpl"/>
<bean type="com.opensymphony.xwork2.config.PackageProvider" name="convention.packageProvider" class="org.apache.struts2.convention.ClasspathPackageProvider"/>
<bean type="com.opensymphony.xwork2.config.PackageProvider" name="convention.containerProvider" class="org.apache.struts2.convention.ClasspathConfigurationProvider"/>
<constant name="struts.convention.actionConfigBuilder" value="convention"/>
<constant name="struts.convention.actionNameBuilder" value="convention"/>
<constant name="struts.convention.resultMapBuilder" value="convention"/>
<constant name="struts.convention.interceptorMapBuilder" value="convention"/>
<constant name="struts.convention.conventionsService" value="convention"/>
<constant name="struts.convention.result.path" value="/"/>
<constant name="struts.convention.result.flatLayout" value="true"/>
<constant name="struts.convention.action.suffix" value="Action"/>
<constant name="struts.convention.action.disableScanning" value="false"/>
<constant name="struts.convention.action.mapAllMatches" value="false"/>
<constant name="struts.convention.action.checkImplementsAction" value="true"/>
<constant name="struts.convention.default.parent.package" value="convention-default"/>
<constant name="struts.convention.action.name.lowercase" value="true"/>
<constant name="struts.convention.action.name.separator" value="-"/>
<constant name="struts.convention.package.locators" value="action,actions,struts,struts2"/>
<constant name="struts.convention.package.locators.disable" value="false"/>
<constant name="struts.convention.package.locators.basePackage" value=""/>
<constant name="struts.convention.exclude.packages" value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"/>
<constant name="struts.convention.relative.result.types" value="dispatcher,velocity,freemarker"/>
<constant name="struts.convention.redirect.to.slash" value="true"/>
<constant name="struts.convention.action.alwaysMapExecute" value="true"/>
<constant name="struts.mapper.alwaysSelectFullNamespace" value="true"/>
<!-- <constant name="struts.convention.action.includeJars" /> -->
<constant name="struts.convention.action.fileProtocols" value="jar" />
<constant name="struts.convention.classes.reload" value="false" />
<constant name="struts.convention.exclude.parentClassLoader" value="true" />
<package name="convention-default" extends="struts-default">
</package>
</struts>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ $Id$
~
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="test" namespace="/sessiontest" extends="struts-default">
<action name="sessionSet" class="org.apache.struts2.session.SessionSetAction">
<result type="freemarker">/template-session.ftl</result>
</action>
<action name="sessionGet" class="org.apache.struts2.session.SessionGetAction">
<result type="freemarker">/template-session.ftl</result>
</action>
</package>
</struts>
@@ -0,0 +1,21 @@
<#--
~ $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.
-->
${Session.sessionKey}
@@ -0,0 +1,25 @@
<%--
~ $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.
--%>
<html>
<body>
This is the view
</body>
</html>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/osgi</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/osgi</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/osgi</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/osgi</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/osgi</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/osgi</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-oval-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 OVal Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/oval</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/oval</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/oval</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/oval</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/oval</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/oval</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-pell-multipart-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Pell Multipart Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/pell-multipart</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/pell-multipart</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/pell-multipart</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/pell-multipart</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/pell-multipart</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/pell-multipart</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plexus-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Plexus Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/plexus</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/plexus</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/plexus</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/plexus</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/plexus</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/plexus</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
@@ -34,9 +34,9 @@
<name>Struts Plugins</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins</url>
</scm>
<modules>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-tiles-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Portlet Tiles Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet-tiles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet-tiles</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet-tiles</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/portlet-tiles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/portlet-tiles</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/portlet-tiles</url>
</scm>
<dependencies>
+4 -4
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
@@ -11,9 +11,9 @@
<name>Struts 2 Portlet Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/portlet</url>
</scm>
<dependencies>
+2 -2
View File
@@ -26,11 +26,11 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<name>Struts 2 REST Plugin</name>
<properties>
@@ -78,24 +78,28 @@ public class DefaultContentTypeHandlerManager implements ContentTypeHandlerManag
}
}
}
/**
* Gets the handler for the request by looking at the request content type and extension
* @param req The request
* @param request The request
* @return The appropriate handler
*/
public ContentTypeHandler getHandlerForRequest(HttpServletRequest req) {
public ContentTypeHandler getHandlerForRequest(HttpServletRequest request) {
ContentTypeHandler handler = null;
String contentType = req.getContentType();
String contentType = request.getContentType();
if (contentType != null) {
int index = contentType.indexOf(';');
if( index != -1)
contentType = contentType.substring(0,index).trim();
handler = handlersByContentType.get(contentType);
if (handler == null) {
// strip off encoding and search again (e.g., application/json;charset=ISO-8859-1)
int index = contentType.indexOf(';');
if (index != -1) {
contentType = contentType.substring(0, index).trim();
}
handler = handlersByContentType.get(contentType);
}
}
if (handler == null) {
String extension = findExtension(req.getRequestURI());
String extension = findExtension(request.getRequestURI());
handler = handlersByExtension.get(extension);
}
return handler;
@@ -0,0 +1,126 @@
package org.apache.struts2.rest;
import com.opensymphony.xwork2.XWorkTestCase;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Scope;
import org.apache.struts2.rest.handler.ContentTypeHandler;
import org.springframework.mock.web.MockHttpServletRequest;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.HashSet;
import java.util.Set;
public class DefaultContentTypeHandlerManagerTest extends XWorkTestCase {
public void testObtainingHandlerForRequestWithEncoding() throws Exception {
// given
DefaultContentTypeHandlerManager handlerManager = new DefaultContentTypeHandlerManager();
handlerManager.setContainer(new DummyContainer("application/json;charset=UTF-8", null));
MockHttpServletRequest request = new MockHttpServletRequest();
request.setContentType("application/json;charset=UTF-8");
// when
ContentTypeHandler handler = handlerManager.getHandlerForRequest(request);
// then
assertNotNull(handler);
assertEquals("application/json;charset=UTF-8", handler.getContentType());
}
public void testObtainingHandlerForRequestWithoutEncoding() throws Exception {
// given
DefaultContentTypeHandlerManager handlerManager = new DefaultContentTypeHandlerManager();
handlerManager.setContainer(new DummyContainer("application/json", null));
MockHttpServletRequest request = new MockHttpServletRequest();
request.setContentType("application/json;charset=UTF-8");
// when
ContentTypeHandler handler = handlerManager.getHandlerForRequest(request);
// then
assertNotNull(handler);
assertEquals("application/json", handler.getContentType());
}
public void testObtainingHandlerForRequestByExtension() throws Exception {
// given
DefaultContentTypeHandlerManager handlerManager = new DefaultContentTypeHandlerManager();
handlerManager.setContainer(new DummyContainer("text/html", "json"));
MockHttpServletRequest request = new MockHttpServletRequest();
request.setContentType("application/json;charset=UTF-8");
request.setRequestURI("/index.json");
// when
ContentTypeHandler handler = handlerManager.getHandlerForRequest(request);
// then
assertNotNull(handler);
assertEquals("text/html", handler.getContentType());
assertEquals("json", handler.getExtension());
}
}
class DummyContainer implements Container {
private ContentTypeHandler handler;
DummyContainer(final String contentType, final String extension) {
handler = new ContentTypeHandler() {
public void toObject(Reader in, Object target) throws IOException {
}
public String fromObject(Object obj, String resultCode, Writer stream) throws IOException {
return null;
}
public String getContentType() {
return contentType;
}
public String getExtension() {
return extension;
}
};
}
public void inject(Object o) {
}
public <T> T inject(Class<T> implementation) {
return null;
}
public <T> T getInstance(Class<T> type, String name) {
if (name.startsWith(DefaultContentTypeHandlerManager.STRUTS_REST_HANDLER_OVERRIDE_PREFIX)) {
return null;
}
return (T) handler;
}
public <T> T getInstance(Class<T> type) {
return null;
}
public Set<String> getInstanceNames(Class<?> type) {
Set<String> handlers = new HashSet<String>();
handlers.add("handler");
return handlers;
}
public void setScopeStrategy(Scope.Strategy scopeStrategy) {
}
public void removeScopeStrategy() {
}
}
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitegraph-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Sitegraph Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitegraph</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitegraph</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/sitegraph</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/sitegraph</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/sitegraph</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/sitegraph</url>
</scm>
<build>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Sitemesh Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitemesh</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/sitemesh</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/sitemesh</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/sitemesh</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/sitemesh</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/sitemesh</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Spring Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/spring</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/spring</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/spring</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/spring</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/spring</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/spring</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-struts1-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Struts 1 Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/struts1</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/struts1</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/struts1</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/struts1</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/struts1</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/struts1</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-testng-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 TestNG Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/testng</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/testng</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/testng</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/testng</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/testng</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/testng</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Tiles Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/tiles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/tiles</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/tiles</url>
</scm>
<dependencies>
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<artifactId>struts2-tiles3-plugin</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Tiles 3 Plugin</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles3</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles3</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9/plugins/tiles3</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/tiles3</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/plugins/tiles3</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/plugins/tiles3</url>
</scm>
<dependencies>
+6 -5
View File
@@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-parent</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<packaging>pom</packaging>
<name>Struts 2</name>
<url>http://struts.apache.org/2.x/</url>
@@ -28,9 +28,9 @@
-->
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_9</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14</url>
</scm>
<issueManagement>
@@ -89,7 +89,7 @@
<tiles.version>2.0.6</tiles.version>
<!-- SCM Site Configuration -->
<site.mainDirectory>${user.home}/struts2-site</site.mainDirectory>
<site.mainDirectory>${project.build.directory}/site</site.mainDirectory>
<siteContent.path>${site.mainDirectory}/staging</siteContent.path>
<scmCheckout.path>${site.mainDirectory}/scm</scmCheckout.path>
<siteDeploy.url>file://${siteContent.path}</siteDeploy.url>
@@ -315,6 +315,7 @@
<version>3.1</version>
<configuration>
<stagingSiteURL>${siteDeploy.url}</stagingSiteURL>
<relativizeDecorationLinks>false</relativizeDecorationLinks>
</configuration>
</plugin>
</plugins>
+6 -6
View File
@@ -7,42 +7,42 @@
<archetype>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<repository>http://repo1.maven.org/maven2/</repository>
<description>Struts 2 Archetypes - Blank</description>
</archetype>
<archetype>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<repository>http://repo1.maven.org/maven2/</repository>
<description>Struts 2 Archetypes - Blank Convention</description>
</archetype>
<archetype>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<repository>http://repo1.maven.org/maven2/</repository>
<description>Struts 2 Archetypes - Database Portlet</description>
</archetype>
<archetype>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<repository>http://repo1.maven.org/maven2/</repository>
<description>Struts 2 Archetypes - Plugin</description>
</archetype>
<archetype>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<repository>http://repo1.maven.org/maven2/</repository>
<description>Struts 2 Archetypes - Portlet</description>
</archetype>
<archetype>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
<repository>http://repo1.maven.org/maven2/</repository>
<description>Struts 2 Archetypes - Starter</description>
</archetype>
+7 -4
View File
@@ -30,14 +30,14 @@
<bannerRight>
<name>Apache Struts</name>
<src>images/struts2.png</src>
<href>http://struts.apache.org/2.x/index.html</href>
<href>2.x/index.html</href>
</bannerRight>
<body>
<links>
<item name="Apache"
href="http://www.apache.org/"/>
<item name="Struts"
href="http://struts.apache.org/index.html"/>
href="http://struts.apache.org/"/>
</links>
<menu name="Struts 2">
<item name="Welcome"
@@ -50,7 +50,10 @@
href="http://apache.org/foundation/sponsorship.html"/>
</menu>
<menu ref="parent" inherit="bottom" />
<menu name="Parent project">
<item name="Apache Struts"
href="http://struts.apache.org/"/>
</menu>
<menu name="Documentation">
<item name="Getting Started"
@@ -134,7 +137,7 @@
<menu name="Development">
<item name="Struts 2.x Draft Docs"
href="http://struts.apache.org/2.x/index.html"/>
href="index.html"/>
<item name="How to Help FAQ"
href="http://struts.apache.org/helping.html"/>
<item name="Development Lists"
+1 -1
View File
@@ -183,7 +183,7 @@
<subsection>
<p>
To download the framework, visit
<a href="http://struts.apache.org/download.cgi#struts210">
<a href="http://struts.apache.org/download.cgi#struts${aname}">
Apache Struts Distributions.
</a>
For more about Apache Struts 2, visit
+4 -4
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.9</version>
<version>2.3.14</version>
</parent>
<groupId>org.apache.struts.xwork</groupId>
@@ -15,9 +15,9 @@
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/xwork-core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/xwork-core</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_9/xwork-core</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/xwork-core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/xwork-core</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/xwork-core</url>
</scm>
<properties>
@@ -40,14 +40,8 @@ import java.util.Map;
* @author Bill Lynch (docs)
*/
public class ActionContext implements Serializable {
static ThreadLocal actionContext = new ThreadLocal();
/**
* Constant that indicates the action is running under a "development mode".
* This mode provides more feedback that is useful for developers but probably
* too verbose/error prone for production.
*/
//public static final String DEV_MODE = "__devMode";
static ThreadLocal<ActionContext> actionContext = new ThreadLocal<ActionContext>();
/**
* Constant for the name of the action being executed.
@@ -100,8 +94,7 @@ public class ActionContext implements Serializable {
*/
public static final String CONTAINER = "com.opensymphony.xwork2.ActionContext.container";
Map<String, Object> context;
private Map<String, Object> context;
/**
* Creates a new ActionContext initialized with another context.
@@ -164,16 +157,7 @@ public class ActionContext implements Serializable {
* @return the ActionContext for the current thread, is never <tt>null</tt>.
*/
public static ActionContext getContext() {
return (ActionContext) actionContext.get();
// Don't do lazy context creation, as it requires container; the creation of which may
// precede the context creation
//if (context == null) {
// ValueStack vs = ValueStackFactory.getFactory().createValueStack();
// context = new ActionContext(vs.getContext());
// setContext(context);
//}
return actionContext.get();
}
/**
@@ -250,7 +250,7 @@ public class ObjectFactory implements Serializable {
* @param params property name -> value Map to set onto the Validator instance
* @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
*/
public Validator buildValidator(String className, Map<String, String> params, Map<String, Object> extraContext) throws Exception {
public Validator buildValidator(String className, Map<String, Object> params, Map<String, Object> extraContext) throws Exception {
Validator validator = (Validator) buildBean(className, null);
reflectionProvider.setProperties(params, validator);
@@ -15,4 +15,5 @@ public final class XWorkConstants {
public static final String ENABLE_OGNL_EXPRESSION_CACHE = "enableOGNLExpressionCache";
public static final String RELOAD_XML_CONFIGURATION = "reloadXmlConfiguration";
public static final String ALLOW_STATIC_METHOD_ACCESS = "allowStaticMethodAccess";
public static final String XWORK_LOGGER_FACTORY = "xwork.loggerFactory";
}
@@ -1,3 +1,18 @@
/*
* Copyright 2002-2006,2009 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.opensymphony.xwork2;
import com.opensymphony.xwork2.config.Configuration;
@@ -52,10 +52,7 @@ import com.opensymphony.xwork2.ognl.accessor.XWorkIteratorPropertyAccessor;
import com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor;
import com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor;
import com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor;
import com.opensymphony.xwork2.util.CompoundRoot;
import com.opensymphony.xwork2.util.PatternMatcher;
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.util.WildcardHelper;
import com.opensymphony.xwork2.util.*;
import com.opensymphony.xwork2.util.fs.DefaultFileManager;
import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
import com.opensymphony.xwork2.util.location.LocatableProperties;
@@ -137,6 +134,8 @@ public class XWorkConfigurationProvider implements ConfigurationProvider {
.factory(MethodAccessor.class, Object.class.getName(), XWorkMethodAccessor.class, Scope.SINGLETON)
.factory(MethodAccessor.class, CompoundRoot.class.getName(), CompoundRootAccessor.class, Scope.SINGLETON)
.factory(TextParser.class, OgnlTextParser.class, Scope.SINGLETON)
.factory(NullHandler.class, Object.class.getName(), InstantiatingNullHandler.class, Scope.SINGLETON)
.factory(ActionValidatorManager.class, AnnotationActionValidatorManager.class, Scope.SINGLETON)
.factory(ActionValidatorManager.class, "no-annotations", DefaultActionValidatorManager.class, Scope.SINGLETON)
@@ -245,7 +245,7 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
throw new ConfigurationException("Unable to load bean: type:" + type + " class:" + impl, ex, childNode);
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("Unable to load optional class: #0", ex, impl);
LOG.debug("Unable to load optional class: #0", impl);
}
}
}
@@ -567,10 +567,9 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
String paramName = null;
try {
paramName = (String) clazz.getField("DEFAULT_PARAM").get(null);
}
catch (Throwable t) {
} catch (Throwable t) {
if (LOG.isDebugEnabled()) {
LOG.debug("The result type #0 doesn't have a default param [DEFAULT_PARAM] defined", t, className);
LOG.debug("The result type [#0] doesn't have a default param [DEFAULT_PARAM] defined!", t, className);
}
}
ResultTypeConfig.Builder resultType = new ResultTypeConfig.Builder(name, className).defaultResultParam(paramName)
@@ -394,6 +394,13 @@ public class XWorkConverter extends DefaultTypeConverter {
* @return a TypeConverter to handle the specified class or null if none can be found
*/
public TypeConverter lookup(Class clazz) {
if (clazz.isPrimitive()) {
/**
* if it is primitive use default converter which allows to define different converters per type
* @see XWorkBasicConverter
*/
return defaultTypeConverter;
}
return lookup(clazz.getName());
}

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