Compare commits

..

222 Commits

Author SHA1 Message Date
Lukasz Lenart afc9238f5a [maven-release-plugin] copy for tag STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0@958825 13f79535-47bb-0310-9956-ffa450edef68
2010-06-29 04:54:59 +00:00
Lukasz Lenart c4d3f364f5 [maven-release-plugin] prepare release STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@958746 13f79535-47bb-0310-9956-ffa450edef68
2010-06-28 21:22:31 +00:00
Lukasz Lenart 7f440efbab Changed groupId to allow deploy to Nexus repository
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@958702 13f79535-47bb-0310-9956-ffa450edef68
2010-06-28 20:20:28 +00:00
Lukasz Lenart 397a85d37a [maven-release-plugin] rollback the release of STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@958687 13f79535-47bb-0310-9956-ffa450edef68
2010-06-28 19:28:31 +00:00
Lukasz Lenart 8176594c00 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@958379 13f79535-47bb-0310-9956-ffa450edef68
2010-06-27 12:52:20 +00:00
Lukasz Lenart 44705e614f [maven-release-plugin] copy for tag STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0@958378 13f79535-47bb-0310-9956-ffa450edef68
2010-06-27 12:49:47 +00:00
Lukasz Lenart 19c34390e2 [maven-release-plugin] prepare release STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@958377 13f79535-47bb-0310-9956-ffa450edef68
2010-06-27 12:45:42 +00:00
Lukasz Lenart 7462c5ff2c Removed release profile as Apache Parent pom is defining new apache-release profile to work with Nexus
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957904 13f79535-47bb-0310-9956-ffa450edef68
2010-06-25 12:01:40 +00:00
Lukasz Lenart 9e76698946 Removed staging repos - not needed when using Nexus
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957888 13f79535-47bb-0310-9956-ffa450edef68
2010-06-25 10:48:07 +00:00
Lukasz Lenart f5b79a021d [maven-release-plugin] rollback the release of STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957885 13f79535-47bb-0310-9956-ffa450edef68
2010-06-25 10:44:29 +00:00
Lukasz Lenart 49c997cdad [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957851 13f79535-47bb-0310-9956-ffa450edef68
2010-06-25 08:51:37 +00:00
Lukasz Lenart 86b69d7d5a [maven-release-plugin] copy for tag STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0@957848 13f79535-47bb-0310-9956-ffa450edef68
2010-06-25 08:50:02 +00:00
Lukasz Lenart 24f9d53966 [maven-release-plugin] prepare release STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957845 13f79535-47bb-0310-9956-ffa450edef68
2010-06-25 08:46:55 +00:00
Lukasz Lenart 98700008e8 Solving problem with OSGi bundle
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957696 13f79535-47bb-0310-9956-ffa450edef68
2010-06-24 19:49:50 +00:00
Lukasz Lenart ea6ae0ac54 Solving problem with OSGi bundle
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957695 13f79535-47bb-0310-9956-ffa450edef68
2010-06-24 19:44:36 +00:00
Lukasz Lenart c514a7d9b6 [maven-release-plugin] rollback the release of STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957671 13f79535-47bb-0310-9956-ffa450edef68
2010-06-24 18:31:24 +00:00
Lukasz Lenart e7aa51ea2c [maven-release-plugin] prepare release STRUTS_2_2_0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957360 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 21:41:43 +00:00
Lukasz Lenart 749a4a5410 Solved problem with OSGi bundles
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957330 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 20:30:38 +00:00
Lukasz Lenart 4d62b172c2 Solved problem with huge assembly
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957325 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 19:56:27 +00:00
Lukasz Lenart e776cec527 Solved problem with huge assembly
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957323 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 19:54:44 +00:00
Lukasz Lenart 014e9b5b92 Workaround for issue MRRESOURCES-6
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957125 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 06:45:03 +00:00
Lukasz Lenart 53a1210c67 Workaround for issue MRRESOURCES-6
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957124 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 06:44:48 +00:00
Lukasz Lenart f8b40f608d Workaround for issue MRRESOURCES-6
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957123 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 06:44:27 +00:00
Lukasz Lenart bb133b8a19 Workaround for issue MRRESOURCES-6
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957122 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 06:44:08 +00:00
Lukasz Lenart cbe66ffbcc Workaround for issue MRRESOURCES-6
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957121 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 06:43:47 +00:00
Lukasz Lenart 4c23c3aa6e Workaround for issue MRRESOURCES-6
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@957120 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 06:43:17 +00:00
Lukasz Lenart 7779e7630d Upgrade to latest Struts Annotations
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956905 13f79535-47bb-0310-9956-ffa450edef68
2010-06-22 14:34:41 +00:00
Lukasz Lenart f6a37f08fc Added Confluence javadoc snippet
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956837 13f79535-47bb-0310-9956-ffa450edef68
2010-06-22 10:03:26 +00:00
Lukasz Lenart 2a0b629e79 Solved WW-3260 - added prefix base mapper
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956835 13f79535-47bb-0310-9956-ffa450edef68
2010-06-22 09:37:57 +00:00
Lukasz Lenart 38ec7d327e Updraded to Struts Master 7 to allow to use Nexus
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956399 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 19:51:54 +00:00
Lukasz Lenart ac3c9766da Solved WW-2869 - Actions invoked with <s:action..> gets actionErrors copied from main action
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956398 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 19:49:35 +00:00
Lukasz Lenart 3008f2609e Slight update to accepted parameters name pattern to accept also ( and )
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956397 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 19:48:18 +00:00
Lukasz Lenart 0c36777676 Resolved critical Xwork vulnerability
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@956389 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 19:20:11 +00:00
Lukasz Lenart 53cd530968 Solved WW-3457 - use BeanWrapper.getDefaultInstance() instead creating each time a new class
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@953221 13f79535-47bb-0310-9956-ffa450edef68
2010-06-10 05:45:49 +00:00
Lukasz Lenart cede6d46c1 Correct link ro Wiki Pages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@949118 13f79535-47bb-0310-9956-ffa450edef68
2010-05-28 07:05:15 +00:00
Wesley Wannemacher d609feaadd fixing assembly build
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941778 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 15:24:05 +00:00
Lukasz Lenart 7375e6ea7d Added --no-check-certificate for wget
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941758 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 14:42:25 +00:00
Lukasz Lenart 5fa5f513b4 Commented out ssh task
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941743 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 14:05:50 +00:00
Lukasz Lenart 38ce52ebaa Clean up Velocity version and dependency
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941709 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 13:08:16 +00:00
Lukasz Lenart df55c78fc4 Removed additional space in wget argument definition
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941652 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 10:50:43 +00:00
Lukasz Lenart 4122be626f Downgraded javassist version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941605 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 08:07:33 +00:00
Lukasz Lenart 9651ef6716 Added javassist as a test dependency
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941604 13f79535-47bb-0310-9956-ffa450edef68
2010-05-06 08:07:00 +00:00
Lukasz Lenart 72704ff7e3 Switched to PatternMatcher bean
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941483 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 20:59:19 +00:00
Lukasz Lenart dfa8ebd69b Renamed to follow standard layout
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941381 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 16:53:43 +00:00
Lukasz Lenart b547bbc0a3 Added GXP plugin to repo
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941380 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 16:51:05 +00:00
Lukasz Lenart 053421a55c Clean up Assembly to include Xwork Core
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941378 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 16:45:20 +00:00
Lukasz Lenart f0104c84b3 Upgraded OGNL to version 3.0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941370 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 16:28:30 +00:00
Lukasz Lenart 8c3737ce4b Solved WW-3250 - added wildcard support for Content type and test case
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941368 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 16:25:09 +00:00
Lukasz Lenart 0387f40e65 resolved WW-3426 - added posibility to define anchor for result
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941355 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 15:44:28 +00:00
Lukasz Lenart c7757ae1ef Solved WW-3309 - used FileUtils to decode URLs and XW-378 - upgraded OGNL to version 3.0
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@941352 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 15:35:52 +00:00
Lukasz Lenart e04cbca2a1 Resolved WW-3300 - added missed css elements
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@933218 13f79535-47bb-0310-9956-ffa450edef68
2010-04-12 12:52:41 +00:00
Lukasz Lenart 0642e6c46c Resolved WW-3322 - proper way for handling missing values in text formatting messages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@933195 13f79535-47bb-0310-9956-ffa450edef68
2010-04-12 11:28:09 +00:00
Lukasz Lenart bb73575cc7 Resolved WW-3361 - proper handling for expression validators and arrays
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@933175 13f79535-47bb-0310-9956-ffa450edef68
2010-04-12 10:23:23 +00:00
Lukasz Lenart a8727ee854 Resolved WW-3182 - reimplemented removeOption()
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932721 13f79535-47bb-0310-9956-ffa450edef68
2010-04-10 13:52:09 +00:00
Lukasz Lenart 364ef85a4e Resolved WW-3325 - do not serialize added by Javassist properties
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932712 13f79535-47bb-0310-9956-ffa450edef68
2010-04-10 12:47:01 +00:00
Lukasz Lenart a127d5dbdb Removed hardcoded XWork version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932462 13f79535-47bb-0310-9956-ffa450edef68
2010-04-09 15:26:28 +00:00
Lukasz Lenart 4d49a3bd85 Resolved WW-3299 - tlib-version bases on Struts version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932295 13f79535-47bb-0310-9956-ffa450edef68
2010-04-09 08:10:04 +00:00
Lukasz Lenart 62a94ea160 Resolved WW-2624 - added src attribute to reset tag to generate reset button as a image
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932294 13f79535-47bb-0310-9956-ffa450edef68
2010-04-09 08:07:14 +00:00
Lukasz Lenart dba9b50934 Huge parse method refactoring and generifying
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932009 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 17:01:16 +00:00
Lukasz Lenart fe913da35f Removed unneeded statics
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932008 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 16:59:51 +00:00
Lukasz Lenart 2cb553082e Resolved WW-3237 - added special parameter to disable setting up character encoding on response - especialy needed in portlet environment
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@931994 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 16:33:14 +00:00
Lukasz Lenart b8772583f9 Improved log message
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@931829 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 08:21:00 +00:00
Lukasz Lenart f90d2ce991 Improved log message
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@931828 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 08:18:25 +00:00
Lukasz Lenart 69351a0576 Resolved WW-2624 - added src attribute to reset tag to generate reset button as a image
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@930097 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 21:04:39 +00:00
Lukasz Lenart 6f65e31a30 Resolved WW-3424 - added expression evaluation for timezone attribute
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@929448 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 09:53:00 +00:00
Lukasz Lenart 6e2536b14d Resolved WW-2174 - added flag to control order of called prepare methods
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927778 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 11:35:21 +00:00
Lukasz Lenart 9c9eb48b2d Added scope test for struts2-junit-plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927754 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 10:02:46 +00:00
Lukasz Lenart 7cb1991e1b Resolved WW-3422 - upgrade Velocity Engine to version 1.6.3
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927750 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 09:51:21 +00:00
Lukasz Lenart b4a1f786a1 Resolved WW-3421 - upgrade FreeMarker to 2.3.16
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927743 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 09:21:01 +00:00
Lukasz Lenart 824bf75e56 Resolved WW-3295 - display of Ajax-Validation-Errors may fail on Internet Explore
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927727 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 08:24:21 +00:00
Lukasz Lenart 4295401199 Added archetypes as a module
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927534 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 18:39:23 +00:00
Lukasz Lenart d62b895649 Corrected misspeling
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927527 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 18:20:17 +00:00
Lukasz Lenart 12a17aef36 Adding archetypes as a new Maven module
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927432 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:50:54 +00:00
Lukasz Lenart 2c920a2e8f Moving Struts 2 starter archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927413 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:10:24 +00:00
Lukasz Lenart 644e35f4d3 Moving Struts 2 portlet archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927411 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:09:26 +00:00
Lukasz Lenart 3f2c805807 Moving Struts 2 plugin archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927410 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:07:37 +00:00
Lukasz Lenart 57404c4a8a Moving Struts 2 dbportlet archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927409 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:06:23 +00:00
Lukasz Lenart 35a016b0ec Moving Struts 2 convention archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927408 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:04:59 +00:00
Lukasz Lenart 78cb56dbbf Moving Struts 2 blank archetype
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927407 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 14:03:49 +00:00
Lukasz Lenart 72dbe534f6 Resolved WW-3411 - query string decoding error in URLHelper.parseQueryString
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927363 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 12:14:50 +00:00
Lukasz Lenart 1320f00ed0 Resolved WW-3410 - XSS vulnerability in UrlHelper.java
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927358 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 12:02:05 +00:00
Lukasz Lenart 7bb2c4d5a7 Resolved WW-3405 - escape values in error messages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927354 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 11:41:30 +00:00
Lukasz Lenart 5c77a3f94b Resolved WW-3409 - OSGi plugin not properly loading freemarker results from bundles
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@926062 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 13:13:35 +00:00
Lukasz Lenart 9b495f00b7 Resolved WW-2326 - add timezone attribute to Date tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@923696 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 11:24:41 +00:00
Lukasz Lenart a2f8645555 Removed Struts Core direct dependency
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@922812 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 10:51:29 +00:00
Lukasz Lenart 4f0fedabbe Resolved WW-3407 - added flag to turn off eager loading of actioon classess
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@922811 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 10:50:19 +00:00
Lukasz Lenart 587b06f074 Resolved WW-3294 - missing property for rethrowException
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@922572 13f79535-47bb-0310-9956-ffa450edef68
2010-03-13 13:57:27 +00:00
Lukasz Lenart 569a066d11 Use Maven variable for XWork version instead of hard coded value
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@922566 13f79535-47bb-0310-9956-ffa450edef68
2010-03-13 13:45:08 +00:00
Lukasz Lenart 533863a279 Solved XW-737 - do not set defaultMessage with null or with empty message
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@921702 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 06:32:05 +00:00
Lukasz Lenart e0f3e7f073 Solved WW-3402 - memory leak
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@920892 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 14:23:07 +00:00
Lukasz Lenart 1cad6648ea Solved WW-3393 - rewritten findWWCtrlNode() function
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@912543 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 12:14:13 +00:00
Lukasz Lenart 9dc13526e5 Solved WW-3355 - handling empty action extensiomn in proper way
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@911403 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 13:52:47 +00:00
Lukasz Lenart ae4959b4f0 Solved WW-3385 - proper implementation of put() method to reflect Map interface specification
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@911398 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 13:45:08 +00:00
Lukasz Lenart c3e5d29c5a Changed poms to reflect new directory structure after moving XWork-core inside Struts 2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@911396 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 13:39:29 +00:00
Lukasz Lenart fa1278d74e Updated svn:ignore list
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@911291 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 09:11:17 +00:00
Lukasz Lenart 0c543aef31 Move XWork core under Struts 2 to simplify relese proces
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@911280 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 08:22:46 +00:00
Musachy Barroso 053dfd2b05 WW-3329 ${Parameters.xxx} in freemarker view is broken
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@899763 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 19:16:09 +00:00
Lukasz Lenart 430b7aa22a Solved WW-3368 - return null instead throw NoSuchMethodException
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@896151 13f79535-47bb-0310-9956-ffa450edef68
2010-01-05 17:56:37 +00:00
Lukasz Lenart 027780b3c8 Removed javassist exclusion from ognl
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@884452 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 08:01:33 +00:00
Wesley Wannemacher 2abed0b26a fixing build
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@883864 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 20:41:13 +00:00
Musachy Barroso b016c1232e WW-3330 <@s.action> broken in sitemesh freemarker decorator page. Add a request attribute that marks a request as a request from an action tag., so other parts of the framework can act accordingly. I think this is not good, but this whole "action" tag is an antipattern, so some hacks are needed to get it to work.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@880928 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 19:42:15 +00:00
Musachy Barroso 7ff55983f7 WW-3333 deprecate "escape" attribute of "property" tagm and add a "escapeHtml" which is more explicit (and self documenting)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@880907 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 18:46:45 +00:00
Musachy Barroso 231c425b04 WW-3332 Add "escapeXml" and "escapeCsv" to the "property" tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@880897 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 18:35:06 +00:00
Musachy Barroso 020ac20829 WW-3329 change params attribute to what it was before
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@836247 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 19:12:55 +00:00
Musachy Barroso a31fa103f6 update javadocs to sound less scary
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@835437 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 16:39:18 +00:00
Musachy Barroso 1e21c51890 remove duplicated file (thanks to windows)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@835433 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 16:32:24 +00:00
Wesley Wannemacher 04766584a5 WW-3291
- fixed compiler errors
- updated svn:ignore on a few dirs

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@835414 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 15:27:45 +00:00
Musachy Barroso 36b2ff880f WW-3291 Update sitemesh-plugin to use version 2.4.2 patch provided by Christian Wolfgang Stone
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@835251 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 06:11:13 +00:00
Musachy Barroso 7fd1ed3068 WW-3291 Update sitemesh-plugin to use version 2.4.2 patch provided by Christian Wolfgang Stone
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@835249 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 06:08:49 +00:00
Musachy Barroso c1b1b0326c WW-3291 Update sitemesh-plugin to use version 2.4.2 patch provided by Christian Wolfgang Stone
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@835248 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 06:06:40 +00:00
Musachy Barroso de0db3b34f delegate to jasper Jspfactory when the jsp is not getting handled by the embeddedjsp plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@834630 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 19:50:37 +00:00
Musachy Barroso 131f26544f remove "model." from the key fields only if they do start with that, and the action is modeldriven (assuming that because it is model driven the error keys will start with "model." is not ok)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@834575 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 18:10:53 +00:00
Lukasz Lenart edcb5ebc73 Solved problem with wrong filter package name in JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@834030 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 12:24:17 +00:00
Musachy Barroso 3b9344985e rollback simple parameter binding changes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@833563 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 21:37:19 +00:00
René Gielen 0a9d305758 WW-3316:
- remove unconditional LOG.debug calls
- import fixes
- drop pre Java 5 constructs


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@833239 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 23:46:50 +00:00
René Gielen fe0bd75086 WW-3315:
Align all easymock dependencies to version 2.4

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@833169 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 21:07:58 +00:00
Musachy Barroso 31de98e184 Add flags and beans for parameter binder
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@832623 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 23:58:53 +00:00
Musachy Barroso 2021cfa43d WW-3305 FreemarkerResult tamper Content-Type
patch provided by zhouyanming

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@832148 13f79535-47bb-0310-9956-ffa450edef68
2009-11-02 22:23:28 +00:00
Musachy Barroso 83d3cf2df4 WW-3312 Add "includeContext" to Form tag, like the Url tag does (default to true)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@832087 13f79535-47bb-0310-9956-ffa450edef68
2009-11-02 20:24:12 +00:00
Musachy Barroso 6adf71480a WW-3195 When FreemarkerResult isn't writing directly to Response, s.action tag is broken
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@830250 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 17:03:50 +00:00
Musachy Barroso a0e3a4950e add test for the key in the servlet context
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@828096 13f79535-47bb-0310-9956-ffa450edef68
2009-10-21 16:38:06 +00:00
Musachy Barroso 9c10bbb895 make key depend on context loader, so they don't get shared between apps
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@827757 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 18:12:08 +00:00
Musachy Barroso fd2d60ad44 WW-3274 doubleSelect does not use parameter doubleDisabled in doubleselect.ftl
patch provided by Lee Clemens

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@825576 13f79535-47bb-0310-9956-ffa450edef68
2009-10-15 17:19:21 +00:00
Musachy Barroso 9756f21e93 WW-3234 Update ClassFinder and PackageBasedActionConfigBuilder to avoid loading unnecessary classes in package scan, avoid spurious warnings and other benefits
patch provided by Brian Ferris

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@823261 13f79535-47bb-0310-9956-ffa450edef68
2009-10-08 18:36:52 +00:00
Musachy Barroso e13ba8c8f5 update version to 2.2.0-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@820737 13f79535-47bb-0310-9956-ffa450edef68
2009-10-01 18:03:21 +00:00
Musachy Barroso 15263d17ae Ignore potential results that start with "."
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@820727 13f79535-47bb-0310-9956-ffa450edef68
2009-10-01 17:41:57 +00:00
Musachy Barroso 2d6508cb73 Ignore potential results that start with "."
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@820353 13f79535-47bb-0310-9956-ffa450edef68
2009-09-30 17:29:07 +00:00
Musachy Barroso 491af32e40 prevent NPE when value is null
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819639 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 16:50:21 +00:00
Musachy Barroso bd48ea0521 Update to Jasper 6.0.20
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819444 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 01:55:26 +00:00
Musachy Barroso e149d3daeb remove jasper source
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819443 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 01:46:14 +00:00
Musachy Barroso 57eed18d14 importing jasper 6.0.20, this code will not compile
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819435 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 00:43:34 +00:00
Musachy Barroso 5dc1101021 removing jasper 5
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819434 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 00:41:18 +00:00
Musachy Barroso 20ab315367 add commons-el dep and remove jsp-api dep
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819433 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 00:40:39 +00:00
Musachy Barroso 136bd8f6ca Remove references to commons-logging
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@819369 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 18:41:02 +00:00
Musachy Barroso c182a130c5 WW-3262 improve wildcard to support regular expressions
bump xwork version

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@818958 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 19:08:38 +00:00
Musachy Barroso 986e389a18 WW-3263 Convention does not check for "struts.enable.SlashesInActionNames"
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@818953 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 18:52:26 +00:00
Musachy Barroso c92c752ec1 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817916 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 00:39:08 +00:00
Musachy Barroso e2afe049a6 [maven-release-plugin] prepare release STRUTS_2_1_8
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817914 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 00:38:36 +00:00
Musachy Barroso 3af372b06e WW-3253 rollback changes for 2.1.8 attempt
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817909 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 00:11:27 +00:00
Musachy Barroso f127bc7286 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817883 13f79535-47bb-0310-9956-ffa450edef68
2009-09-22 22:54:10 +00:00
Musachy Barroso c6fb6d144f [maven-release-plugin] prepare release STRUTS_2_1_8
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817881 13f79535-47bb-0310-9956-ffa450edef68
2009-09-22 22:53:35 +00:00
Wesley Wannemacher f7dba7b853 WW-3253 tweaking the docs download part
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817849 13f79535-47bb-0310-9956-ffa450edef68
2009-09-22 21:34:53 +00:00
Musachy Barroso 6f47a77d72 change the docs dir
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817819 13f79535-47bb-0310-9956-ffa450edef68
2009-09-22 20:22:27 +00:00
Musachy Barroso 184ded056d change where the docs are pulled from
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817800 13f79535-47bb-0310-9956-ffa450edef68
2009-09-22 19:49:57 +00:00
Musachy Barroso 27f9f37eb7 Use lookup instead if injection for this constants. This should work, but for some reason it fails in the apache zone and it was reported in dev@ also. I am clueless about it.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817418 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 21:36:17 +00:00
Wesley Wannemacher 9277a16673 WW-3253
updating to point to latest struts-master

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817379 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 19:17:16 +00:00
Wesley Wannemacher f01991d171 WW-3187
Small refactoring

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817366 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 18:40:56 +00:00
Wesley Wannemacher 96768e036d WW-3187
Users can now specify a charset on the stream result

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817363 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 18:32:16 +00:00
Wesley Wannemacher f19092287a ww-3215
ActionComponent will now swallow exceptions by default, but if you want to see them, you can specify rethrowException=true

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817334 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 17:31:37 +00:00
Wesley Wannemacher a36bb71940 ww-3215
ActionComponent will now swallow exceptions by default, but if you want to see them, you can specify rethrowException=true

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817333 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 17:29:44 +00:00
Musachy Barroso 6fb02f2f1b WW-3210 JFreeChart plugin not setting correct mime type
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817318 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 16:55:09 +00:00
Wesley Wannemacher 9bc7147442 ww-3230
Rich, you're the man, thanks for the patch!

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817287 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 15:22:08 +00:00
Wesley Wannemacher 50f4589980 ww-3246
fixing OptGroup so that it escapes html entities the way the select tag does

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817282 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 15:07:03 +00:00
Wesley Wannemacher ebdbc16d59 WW-3253
updating poms to point to xwork-core 2.1.6 release

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817269 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 14:27:43 +00:00
Musachy Barroso 16cf4d70e9 organize imports, fix some typos
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@816817 13f79535-47bb-0310-9956-ffa450edef68
2009-09-18 23:58:21 +00:00
Musachy Barroso f36a3a6d42 reuse existing method.
patch provided by Alex Siman

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@816445 13f79535-47bb-0310-9956-ffa450edef68
2009-09-18 02:52:22 +00:00
Wesley Wannemacher 5a758b8e8b a little cleanup (no @Override on interface method implementations) and trying to make hudson/bamboo happy
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@816342 13f79535-47bb-0310-9956-ffa450edef68
2009-09-17 19:20:19 +00:00
Wesley Wannemacher 3a4abdf91d moving resource files into src/main/resources
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@816314 13f79535-47bb-0310-9956-ffa450edef68
2009-09-17 18:07:52 +00:00
Musachy Barroso 1994d0549d throw exception when class name equals the action suffix
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@816008 13f79535-47bb-0310-9956-ffa450edef68
2009-09-16 23:36:03 +00:00
Musachy Barroso d95d3cb354 add log statement
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@811701 13f79535-47bb-0310-9956-ffa450edef68
2009-09-05 19:07:51 +00:00
Musachy Barroso d404748283 Add constant to reload config when a change is detected
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@811700 13f79535-47bb-0310-9956-ffa450edef68
2009-09-05 19:06:34 +00:00
Musachy Barroso 6f40619bd2 WW-3227 struts.action.excludePattern does not work as expected
thanks to Andreas Joseph Krogh for the patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@806670 13f79535-47bb-0310-9956-ffa450edef68
2009-08-21 18:36:40 +00:00
Wesley Wannemacher e4700527af You can't use ";" on non-windows systems
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@806658 13f79535-47bb-0310-9956-ffa450edef68
2009-08-21 17:59:54 +00:00
Musachy Barroso d4f360efda update poms for embedded jsp plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805874 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 16:40:04 +00:00
Musachy Barroso 46293f9ce8 update poms for embedded jsp plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805870 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 16:33:09 +00:00
Musachy Barroso 730abcdfb9 bring embedded jsp plugin into trunk
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805867 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 16:26:17 +00:00
Musachy Barroso cc423fc301 WW-3121 IllegalArgumentException using struts2-convention-plugin-2.1.6.jar on JBoss
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805664 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 05:13:48 +00:00
Musachy Barroso 8325875695 WW-3142 Convention plugin support for default actionless dispatcher results exposes raw source code of index.jsp files on Google AppEngine
Thanks to Kent R. Spillner for the patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805661 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 04:23:45 +00:00
Musachy Barroso 81b7a53826 update xwork dep
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805654 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 03:48:51 +00:00
Musachy Barroso 0bf060b69c WW-3224 fix possible cross site scripting
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805635 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19 00:18:54 +00:00
Musachy Barroso c9d10a6b05 Fix tests
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805238 13f79535-47bb-0310-9956-ffa450edef68
2009-08-18 00:39:34 +00:00
Musachy Barroso ca8f4918ff Fix tests
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805237 13f79535-47bb-0310-9956-ffa450edef68
2009-08-18 00:36:15 +00:00
Musachy Barroso bebf30f3d1 remove explicit dependency on core from poms
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@805223 13f79535-47bb-0310-9956-ffa450edef68
2009-08-17 23:50:38 +00:00
Musachy Barroso 00e0774c53 WW-3222 Remove "profiling" interceptor from the "defaultStack"
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@804735 13f79535-47bb-0310-9956-ffa450edef68
2009-08-16 18:07:10 +00:00
Musachy Barroso c1217a062a WW-2802 Unselected multi-select boxes do not post back request parameters, therefore the associated attributes do not get cleared
thanks to Tim Stavenger for the patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@804072 13f79535-47bb-0310-9956-ffa450edef68
2009-08-14 03:16:35 +00:00
Musachy Barroso d3e8df9120 Fix failing test
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@803974 13f79535-47bb-0310-9956-ffa450edef68
2009-08-13 18:11:52 +00:00
Musachy Barroso cafd919f15 WW-3077 StrutsPrepareAndExecuteFilter: infinite loop in filter chain with dispatcher FORWARD
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@803625 13f79535-47bb-0310-9956-ffa450edef68
2009-08-12 17:33:44 +00:00
Musachy Barroso 46ba2d10c5 WW-3158 XSLT cannot render a collection that contains a null value.
thanks to Steve Wolke for the patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@803589 13f79535-47bb-0310-9956-ffa450edef68
2009-08-12 16:37:46 +00:00
Musachy Barroso 7a8c0fee0c WW-3138 Fix DWRValidator
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@803360 13f79535-47bb-0310-9956-ffa450edef68
2009-08-12 03:59:51 +00:00
Musachy Barroso 5fdcb87b42 make jsp api dep provided
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@803356 13f79535-47bb-0310-9956-ffa450edef68
2009-08-12 03:02:01 +00:00
Musachy Barroso e0e2c4fbb8 WW-3121 IllegalArgumentException using struts2-convention-plugin-2.1.6.jar on JBoss
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@803335 13f79535-47bb-0310-9956-ffa450edef68
2009-08-12 00:28:59 +00:00
Musachy Barroso 31fde5a067 WW-2807 Improve Velocity tag syntax and performance
thanks to Christopher Schultz for patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802956 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 23:30:03 +00:00
Musachy Barroso af7ba45753 WW-3189 add a way to clear FreeMarker templates
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802949 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 22:40:51 +00:00
Musachy Barroso c09ec96da2 WW-3189 Make fields protected
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802948 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 22:38:40 +00:00
Musachy Barroso ebe522c6e9 WW-3188 Don't render action errors/messages when have null message
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802947 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 22:35:06 +00:00
Musachy Barroso e957eedb95 WW-3155 RestfulActionMapper iterates a map where it should only just do a lookup
thanks to Dion Sasmito for patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802942 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 22:06:48 +00:00
Musachy Barroso 9f6c296d42 WW-3166 Prevent NPE when there is a null element in an array
thanks to Zoran Avtarovski for the patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802937 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 21:57:37 +00:00
Musachy Barroso 353c2f2033 WW-3217 Bring JSON plugin into trunk
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802900 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 19:00:38 +00:00
Musachy Barroso 19b1bbba27 WW-3217 Bring JSON plugin into trunk
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802897 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 18:54:20 +00:00
Musachy Barroso d04a467f58 Make the dep on spring plugin optional (so the objectFactory is not set to "spring")
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802891 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 18:44:53 +00:00
Musachy Barroso 60fdb065c5 WW-3217 Bring JSON plugin into trunk
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802878 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 18:19:48 +00:00
Musachy Barroso 2f7177ce8f Add a class loader interface (bundle based) to the ServletContext so it cann be used by other plugins to lookup resources
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802870 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 17:40:46 +00:00
Musachy Barroso 7e0ad932de fix log message
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802862 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 17:00:49 +00:00
Musachy Barroso d89c7186a1 minor formatting thingy
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802133 13f79535-47bb-0310-9956-ffa450edef68
2009-08-07 18:24:45 +00:00
Musachy Barroso a5d0e408c6 organize imports
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802129 13f79535-47bb-0310-9956-ffa450edef68
2009-08-07 18:14:48 +00:00
Musachy Barroso 81fee36664 remove commented code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802126 13f79535-47bb-0310-9956-ffa450edef68
2009-08-07 18:11:39 +00:00
Musachy Barroso 976863cfb7 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@802124 13f79535-47bb-0310-9956-ffa450edef68 2009-08-07 18:11:11 +00:00
Musachy Barroso 51a68818dc WW-3208 Spring Plugin using commons.lang.StringUtils instead of shaded class in xwork library
thanks to  Tom Terrace for the patch

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@799123 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 23:27:25 +00:00
Lukasz Lenart c1c5c44897 Keep in sync source and dependency for Xwork - upgraded to version 2.1.5-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@798999 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 18:17:14 +00:00
Wesley Wannemacher 9159be55cd adding ignores for target dir and IDE artifacts
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@798892 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 13:24:43 +00:00
Musachy Barroso 4593090a00 WW-3196 Add post init hook, and change fields visibility to protected
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@798341 13f79535-47bb-0310-9956-ffa450edef68
2009-07-28 00:12:12 +00:00
Musachy Barroso a6f1e0d755 fix build
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@796774 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22 15:48:06 +00:00
Musachy Barroso 17ea15b208 XW-710 update to OGNL 2.7.3
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@796082 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 00:05:16 +00:00
Musachy Barroso b92fae8200 WW-3198 Upgrade to FreeMarker 2.3.15
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@795455 13f79535-47bb-0310-9956-ffa450edef68
2009-07-19 00:42:10 +00:00
Musachy Barroso fe7a12574b fix bug that added all the watched dirs as stores to the reloading classloader
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@794418 13f79535-47bb-0310-9956-ffa450edef68
2009-07-15 21:07:45 +00:00
Musachy Barroso 0fd40525cd Make the class reloading implementation work with convention. (use the reloading class loader when an instance is requested using the class name)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@794116 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14 23:44:43 +00:00
Musachy Barroso 4eb9f31c67 init reloading class loader before calling setApplication
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@794105 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14 22:45:13 +00:00
Musachy Barroso 125522566e add some logging to class reloading
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@794094 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14 22:24:56 +00:00
Musachy Barroso 49e5110dd4 define constants as empty as a workaround to the IoC container limitation ("required" is ignored in @Inject in constructor params)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@793692 13f79535-47bb-0310-9956-ffa450edef68
2009-07-13 20:08:21 +00:00
Musachy Barroso 577840562a fix broken build
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@793636 13f79535-47bb-0310-9956-ffa450edef68
2009-07-13 17:35:54 +00:00
Musachy Barroso 6539d0dd80 add a constant to limit the classes that can be loaded by the reloading class loader, support relative paths
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@793626 13f79535-47bb-0310-9956-ffa450edef68
2009-07-13 16:58:08 +00:00
Musachy Barroso b2cf05e87a WW-3183 Add class reloading to the Spring plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@793388 13f79535-47bb-0310-9956-ffa450edef68
2009-07-12 18:17:55 +00:00
Musachy Barroso 3959fe30f4 move ReloadingClassLoader impl to XWork
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@793257 13f79535-47bb-0310-9956-ffa450edef68
2009-07-12 01:47:44 +00:00
Musachy Barroso 22949c709d Fix NPE from class loader and add a JarResourceStore
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@793255 13f79535-47bb-0310-9956-ffa450edef68
2009-07-12 01:36:27 +00:00
Musachy Barroso 5448b55542 fix typo
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@791919 13f79535-47bb-0310-9956-ffa450edef68
2009-07-07 17:47:34 +00:00
Wesley Wannemacher 350acd8bc9 WW-3128, screwed up originally, forgot to svn add this file after applying the patch
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@791565 13f79535-47bb-0310-9956-ffa450edef68
2009-07-06 19:01:15 +00:00
Musachy Barroso 813ea065ad fix typo
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@789467 13f79535-47bb-0310-9956-ffa450edef68
2009-06-29 22:11:12 +00:00
Musachy Barroso ccbc28feee bump xwork version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@789434 13f79535-47bb-0310-9956-ffa450edef68
2009-06-29 20:17:20 +00:00
Musachy Barroso a94d6c0dca WW-3172 Add a flag to disable OGNL cache, which can cause memory leaks
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@789432 13f79535-47bb-0310-9956-ffa450edef68
2009-06-29 20:15:24 +00:00
Nils-Helge Garli eca561c674 WW-3164
Need to inject ActionMapper in PortletUrlRenderer to avoid NPE when passing through to ServletUrlRenderer.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@788633 13f79535-47bb-0310-9956-ffa450edef68
2009-06-26 08:43:42 +00:00
Wesley Wannemacher eae2fc668a putting wget mirror back in place now that release has been tagged, this way we can still generate nightlies through CI
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@786912 13f79535-47bb-0310-9956-ffa450edef68
2009-06-20 22:00:23 +00:00
Wesley Wannemacher 3e33a7b70c [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@786191 13f79535-47bb-0310-9956-ffa450edef68
2009-06-18 18:09:00 +00:00
1347 changed files with 148881 additions and 1964 deletions
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.7</version>
<version>2.2.0</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_1_7/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_7/apps/blank</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/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.1.7</version>
<version>2.2.0</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
@@ -34,9 +34,9 @@
<name>Starter Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_7/apps/mailreader</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/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.1.7</version>
<version>2.2.0</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
@@ -41,9 +41,9 @@
</modules>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_7/apps</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/apps</url>
</scm>
<distributionManagement>
+13 -9
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.7</version>
<version>2.2.0</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_1_7/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_7/apps/portlet</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/apps/portlet</url>
</scm>
<profiles>
@@ -122,7 +122,7 @@
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
<version>1.6.3</version>
</dependency>
<dependency>
@@ -130,6 +130,10 @@
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -166,14 +170,14 @@
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.4rc0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
@@ -186,14 +190,14 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
+2 -2
View File
@@ -26,13 +26,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.7</version>
<version>2.2.0</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.1.7</version>
<version>2.2.0</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>
+9 -5
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.7</version>
<version>2.2.0</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_1_7/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_7/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_7/apps/showcase</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/apps/showcase</url>
</scm>
@@ -125,7 +125,7 @@
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
<version>1.6.3</version>
</dependency>
<dependency>
@@ -133,6 +133,10 @@
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -19,6 +19,8 @@
<constant name="struts.serve.static" value="true" />
<constant name="struts.serve.static.browserCache" value="false" />
<constant name="actionPackages" value="org.apache.struts2.showcase.person"/>
<include file="struts-chat.xml" />
<include file="struts-interactive.xml" />
+41 -5
View File
@@ -20,10 +20,11 @@
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-prepare</filter-name>
@@ -62,6 +63,10 @@
org.apache.struts2.showcase.chat.ChatSessionListener
</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>
</listener>
<!-- SNIPPET START: dwr -->
@@ -86,9 +91,30 @@
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Sitemesh Freemarker and Velocity Decorator Servlets. Shares configuration with Struts.-->
<servlet>
<servlet-name>sitemesh-freemarker</servlet-name>
<servlet-class>org.apache.struts2.sitemesh.FreemarkerDecoratorServlet</servlet-class>
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>sitemesh-velocity</servlet-name>
<servlet-class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-class>
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- JavaServer Faces Servlet Mapping, not called directly -->
<servlet-mapping>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
@@ -98,6 +124,16 @@
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sitemesh-freemarker</servlet-name>
<url-pattern>*.ftl</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sitemesh-velocity</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
<!-- END SNIPPET: dwr -->
<!-- SNIPPET START: example.velocity.filter.chain
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* $Id: pom.xml 820737 2009-10-01 18:03:21Z musachy $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.0</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<packaging>pom</packaging>
<name>Struts 2 Maven Archetypes</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes</url>
</scm>
<modules>
<module>struts2-archetype-blank</module>
<module>struts2-archetype-convention</module>
<module>struts2-archetype-dbportlet</module>
<module>struts2-archetype-plugin</module>
<module>struts2-archetype-portlet</module>
<module>struts2-archetype-starter</module>
</modules>
</project>
@@ -0,0 +1,48 @@
INFORMATION
===========
- This is Struts 2's "Blank" Maven Archetype
USAGE
=====
- change directory to where the web app template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample web app template, assuming :-
- root java package -> com.myCompany.mySystem
- the webapp war name -> myWebApp
mvn archetype:create -DgroupId=com.myCompany.mySystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-blank \
-DarchetypeVersion=2.0.9-SNAPSHOT \
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
IMPORTANT:
==========
- The generated template uses the 'example' package, regardless of what you
specify during mvn archetype:create.
Unfortunately, the Maven Archetype plugin does not currently provide a way to
move resource files into a package structure.
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty6 execute
mvn jetty:run
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.2.0</version>
<name>Struts 2 Archetypes - Blank</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-blank</url>
</scm>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-blank</id>
<!--
<sources>
<source>src/main/java/example/ExampleSupport.java</source>
<source>src/main/java/example/HelloWorld.java</source>
<source>src/main/java/example/Login.java</source>
</sources>
<resources>
<resource>src/main/resources/example/Login-validation.xml</resource>
<resource filtered="false">src/main/resources/example/package.properties</resource>
<resource filtered="false">src/main/resources/example/package_es.properties</resource>
<resource>src/main/resources/example.xml</resource>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/index.html</resource>
<resource>src/main/webapp/example/HelloWorld.jsp</resource>
<resource>src/main/webapp/example/Login.jsp</resource>
<resource>src/main/webapp/example/Menu.jsp</resource>
<resource>src/main/webapp/example/Missing.jsp</resource>
<resource>src/main/webapp/example/Register.jsp</resource>
<resource>src/main/webapp/example/Welcome.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
</resources>
<testSources>
<source>src/test/java/example/ConfigTest.java</source>
<source>src/test/java/example/HelloWorldTest.java</source>
<source>src/test/java/example/LoginTest.java</source>
</testSources>
-->
</archetype>
@@ -0,0 +1,61 @@
<?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>
<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>
@@ -0,0 +1,174 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -0,0 +1,6 @@
Apache Struts
Copyright 2006 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -0,0 +1,10 @@
README.txt - blank
This is an "empty" application that you can deploy as the basis of your own
application.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
----------------------------------------------------------------------------
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Webapp</name>
<properties>
<struts2.version>2.1.8.1</struts2.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${struts2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -18,15 +18,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.convention.classloader;
package ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
/**
* *interface taken from Apache JCI
* Base Action class for the Tutorial package.
*/
public interface ResourceStore {
void write(final String pResourceName, final byte[] pResourceData);
byte[] read(final String pResourceName);
public class ExampleSupport extends ActionSupport {
}
@@ -0,0 +1,61 @@
/*
* $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 ${package}.example;
/**
* <code>Set welcome message.</code>
*/
public class HelloWorld extends ExampleSupport {
public String execute() throws Exception {
setMessage(getText(MESSAGE));
return SUCCESS;
}
/**
* Provide default valuie for Message property.
*/
public static final String MESSAGE = "HelloWorld.message";
/**
* Field for Message property.
*/
private String message;
/**
* Return Message property.
*
* @return Message property
*/
public String getMessage() {
return message;
}
/**
* Set Message property.
*
* @param message Text to display on HelloWorld page.
*/
public void setMessage(String message) {
this.message = message;
}
}
@@ -0,0 +1,59 @@
/*
* $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 ${package}.example;
public class Login extends ExampleSupport {
public String execute() throws Exception {
if (isInvalid(getUsername())) return INPUT;
if (isInvalid(getPassword())) return INPUT;
return SUCCESS;
}
private boolean isInvalid(String value) {
return (value == null || value.length() == 0);
}
private String username;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
private String password;
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!--
- This file is included by the struts.xml file as an example
- of how to break up the configuration file into multiple files.
-->
<struts>
<package name="example" namespace="/example" extends="struts-default">
<action name="HelloWorld" class="${package}.example.HelloWorld">
<result>/example/HelloWorld.jsp</result>
</action>
<action name="Login_*" method="{1}" class="${package}.example.Login">
<result name="input">/example/Login.jsp</result>
<result type="redirectAction">Menu</result>
</action>
<action name="*" class="${package}.example.ExampleSupport">
<result>/example/{1}.jsp</result>
</action>
<!-- Add additional "example" package actions here. -->
</package>
</struts>
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="username">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
</validators>
@@ -0,0 +1,5 @@
HelloWorld.message = Struts is up and running...
requiredstring= ${getText(fieldName)} is required.
password = Password
username = User Name
Missing.message = This feature is under construction. Please try again in the next iteration.
@@ -0,0 +1,5 @@
HelloWorld.message = ¡Struts está bien!...
requiredstring = ${getText(fieldName)} es requerido.
password = Contraseña
username = Nombre de Usuario
Missing.message = Página bajo construcción, trate de nuevo en la proxima versión
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
<include file="example.xml"/>
<!-- Add addition packages and configuration here. -->
</struts>
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="struts_blank" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts Blank</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1,28 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title><s:text name="HelloWorld.message"/></title>
</head>
<body>
<h2><s:property value="message"/></h2>
<h3>Languages</h3>
<ul>
<li>
<s:url id="url" action="HelloWorld">
<s:param name="request_locale">en</s:param>
</s:url>
<s:a href="%{url}">English</s:a>
</li>
<li>
<s:url id="url" action="HelloWorld">
<s:param name="request_locale">es</s:param>
</s:url>
<s:a href="%{url}">Espanol</s:a>
</li>
</ul>
</body>
</html>
@@ -0,0 +1,15 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Sign On</title>
</head>
<body>
<s:form action="Login">
<s:textfield key="username"/>
<s:password key="password" />
<s:submit/>
</s:form>
</body>
</html>
@@ -0,0 +1,3 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:include value="Missing.jsp"/>
@@ -0,0 +1,11 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head><title>Missing Feature</title></head>
<body>
<p>
<s:text name="Missing.message"/>
</p>
</body>
</html>
@@ -0,0 +1,3 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:include value="Missing.jsp"/>
@@ -0,0 +1,18 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Welcome</title>
<link href="<s:url value="/css/examplecss"/>" rel="stylesheet"
type="text/css"/>
</head>
<body>
<h3>Commands</h3>
<ul>
<li><a href="<s:url action="Login_input"/>">Sign On</a></li>
<li><a href="<s:url action="Register"/>">Register</a></li>
</ul>
</body>
</html>
@@ -0,0 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=example/HelloWorld.action">
</head>
<body>
<p>Loading ...</p>
</body>
</html>
@@ -0,0 +1,97 @@
/*
* $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 ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.config.RuntimeConfiguration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import java.util.Map;
import java.util.List;
import org.apache.struts2.StrutsTestCase;
public class ConfigTest extends StrutsTestCase {
protected void assertSuccess(String result) throws Exception {
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
}
protected void assertInput(String result) throws Exception {
assertTrue("Expected an input result!",
ActionSupport.INPUT.equals(result));
}
protected Map assertFieldErrors(ActionSupport action) throws Exception {
assertTrue(action.hasFieldErrors());
return action.getFieldErrors();
}
protected void assertFieldError(Map field_errors, String field_name, String error_message) {
List errors = (List) field_errors.get(field_name);
assertNotNull("Expected errors for " + field_name, errors);
assertTrue("Expected errors for " + field_name, errors.size()>0);
// TODO: Should be a loop
assertEquals(error_message,errors.get(0));
}
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider c = new XmlConfigurationProvider("struts.xml");
configurationManager.addConfigurationProvider(c);
configurationManager.reload();
}
protected ActionConfig assertClass(String namespace, String action_name, String class_name) {
RuntimeConfiguration configuration = configurationManager.getConfiguration().getRuntimeConfiguration();
ActionConfig config = configuration.getActionConfig(namespace, action_name);
assertNotNull("Mssing action", config);
assertTrue("Wrong class name: [" + config.getClassName() + "]",
class_name.equals(config.getClassName()));
return config;
}
protected ActionConfig assertClass(String action_name, String class_name) {
return assertClass("", action_name, class_name);
}
protected void assertResult(ActionConfig config, String result_name, String result_value) {
Map results = config.getResults();
ResultConfig result = (ResultConfig) results.get(result_name);
Map params = result.getParams();
String value = (String) params.get("actionName");
if (value == null)
value = (String) params.get("location");
assertTrue("Wrong result value: [" + value + "]",
result_value.equals(value));
}
public void testConfig() throws Exception {
assertNotNull(configurationManager);
}
}
@@ -0,0 +1,37 @@
/*
* $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 ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;
public class HelloWorldTest extends StrutsTestCase {
public void testHelloWorld() throws Exception {
HelloWorld hello_world = new HelloWorld();
String result = hello_world.execute();
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the default message!",
hello_world.getText(HelloWorld.MESSAGE).equals(hello_world.getMessage()));
}
}
@@ -0,0 +1,55 @@
/*
* $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 ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import java.util.Map;
public class LoginTest extends ConfigTest {
public void FIXME_testLoginConfig() throws Exception {
ActionConfig config = assertClass("example", "Login_input", "example.Login");
assertResult(config, ActionSupport.SUCCESS, "Menu");
assertResult(config, ActionSupport.INPUT, "/example/Login.jsp");
}
public void testLoginSubmit() throws Exception {
Login login = new Login();
login.setUsername("username");
login.setPassword("password");
String result = login.execute();
assertSuccess(result);
}
// Needs access to an envinronment that includes validators
public void FIXME_testLoginSubmitInput() throws Exception {
Login login = new Login();
String result = login.execute();
assertInput(result);
Map errors = assertFieldErrors(login);
assertFieldError(errors,"username","Username is required.");
assertFieldError(errors,"password","Password is required.");
}
}
@@ -0,0 +1,48 @@
INFORMATION
===========
- This is Struts 2's "Blank Convetion" Maven Archetype
USAGE
=====
- change directory to where the web app template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample web app template, assuming :-
- root java package -> com.mycompany.mysystem
- the webapp war name -> myWebApp
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-convention \
-DarchetypeVersion=2.1.8 \
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
IMPORTANT:
==========
- The generated template uses the 'example' package, regardless of what you
specify during mvn archetype:create.
Unfortunately, the Maven Archetype plugin does not currently provide a way to
move resource files into a package structure.
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty6 execute
mvn jetty:run
@@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.2.0</version>
<name>Struts 2 Archetypes - Blank Convention</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-convention</url>
</scm>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-convention</id>
</archetype>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="struts2-archetype-convention">
<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="false">
<directory>src/main/webapp</directory>
<includes>
<include>**/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false">
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
@@ -0,0 +1,174 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -0,0 +1,6 @@
Apache Struts
Copyright 2006 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -0,0 +1,10 @@
README.txt - blank convention
This is an "empty" Google App Engine aware application that you can deploy as the basis of your own
application.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
----------------------------------------------------------------------------
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Convention Webapp</name>
<properties>
<struts2.version>2.1.8.1</struts2.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${struts2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,25 @@
package ${package};
import ognl.OgnlRuntime;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.logging.Logger;
/**
* To allow works Struts 2 with Google App Engine
*/
public class InitListener implements ServletContextListener {
public InitListener() {
}
public void contextInitialized(ServletContextEvent sce) {
OgnlRuntime.setSecurityManager(null);
}
public void contextDestroyed(ServletContextEvent sce) {
}
}
@@ -0,0 +1,42 @@
package ${package}.actions;
import com.opensymphony.xwork2.ActionSupport;
/**
* <code>Set welcome message.</code>
*/
public class HelloAction extends ActionSupport {
public String execute() throws Exception {
setMessage(getText(MESSAGE));
return SUCCESS;
}
/**
* Provide default valuie for Message property.
*/
public static final String MESSAGE = "hello.message";
/**
* Field for Message property.
*/
private String message;
/**
* Return Message property.
*
* @return Message property
*/
public String getMessage() {
return message;
}
/**
* Set Message property.
*
* @param message Text to display on HelloWorld page.
*/
public void setMessage(String message) {
this.message = message;
}
}
@@ -0,0 +1,24 @@
package ${package}.actions;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
@Results({
@Result(name = Action.SUCCESS, location = "${redirectName}", type = "redirectAction")
})
public class Index extends ActionSupport {
private String redirectName;
public String execute() {
redirectName = "hello";
return Action.SUCCESS;
}
public String getRedirectName() {
return redirectName;
}
}
@@ -0,0 +1,2 @@
hello.message = Struts is up and running...
requiredstring= ${getText(fieldName)} is required.
@@ -0,0 +1,2 @@
hello.message = ¡Struts está bien!...
requiredstring = ${getText(fieldName)} es requerido.
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>${artifactId}</application>
<version>1</version>
<sessions-enabled>true</sessions-enabled>
</appengine-web-app>
@@ -0,0 +1,28 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title><s:text name="hello.message"/></title>
</head>
<body>
<h2><s:property value="message"/></h2>
<h3>Languages</h3>
<ul>
<li>
<s:url id="url" action="hello">
<s:param name="request_locale">en</s:param>
</s:url>
<s:a href="%{url}">English</s:a>
</li>
<li>
<s:url id="url" action="hello">
<s:param name="request_locale">es</s:param>
</s:url>
<s:a href="%{url}">Espanol</s:a>
</li>
</ul>
</body>
</html>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="struts_blank" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts Blank Convention</display-name>
<listener>
<listener-class>${package}.InitListener</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1 @@
<% response.sendRedirect("hello"); %>
@@ -0,0 +1,16 @@
package ${package}.actions;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;
public class HelloActionTest extends StrutsTestCase {
public void testHelloAction() throws Exception {
HelloAction hello = new HelloAction();
String result = hello.execute();
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the default message!",
hello.getText(HelloAction.MESSAGE).equals(hello.getMessage()));
}
}
@@ -0,0 +1,14 @@
package ${package}.actions;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;
public class IndexTest extends StrutsTestCase {
public void testIndex() throws Exception {
Index index = new Index();
String result = index.execute();
assertTrue("Expected a success result!", ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the 'hello' action name!!", "hello".equals(index.getRedirectName()));
}
}
@@ -0,0 +1,42 @@
INFORMATION
===========
- This is Struts 2's "Database Portlet" Maven Archetype
- To be used to create a simple portlet that displays information in a database and can be deployed as a webapp or JSR168 portlet.
USAGE
=====
- change directory to where the portlet template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample portlet template, assuming :-
- root java package -> com.myCompany.myPortlet
- the portlet war name -> myWebApp
mvn archetype:create -DgroupId=com.myCompany.myPortlet \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-dbportlet \
-DarchetypeVersion=2.0.9-SNAPSHOT \
-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty execute as a servlet
mvn jetty:run
@@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.2.0</version>
<name>Struts 2 Archetypes - Database Portlet</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-dbportlet</url>
</scm>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-dbblank</id>
<sources>
<source>src/main/java/view/IndexAction.java</source>
<source>src/main/java/edit/IndexAction.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
<resource>src/main/webapp/WEB-INF/applicationContext.xml</resource>
<resource>src/main/webapp/WEB-INF/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/help/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-input.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-success.jsp</resource>
</resources>
</archetype>
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${version}</version>
<name>Struts 2 Database Portlet</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Database Portlet</description>
<properties>
<struts2.version>2.1.8.1</struts2.version>
</properties>
<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>2.5.6</version>
</dependency>
<!-- Database driver (change for your specific database) -->
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
</dependency>
<!-- Servlet, Jsp, and Portlet API's -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
<dependencies>
<dependency>
<groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,46 @@
package ${package}.edit;
import org.apache.struts2.dispatcher.DefaultActionSupport;
/**
*
*/
public class IndexAction extends DefaultActionSupport {
private String pref1;
private String pref2;
private boolean submit;
public String execute() {
if (submit) {
// Save the preferences somehow
return SUCCESS;
} else {
// Preform any logic here
return INPUT;
}
}
public void setSubmit(String val) {
this.submit = (val != null);
}
public String getPref1() {
return pref1;
}
public String getPref2() {
return pref2;
}
public void setPref1(String pref) {
this.pref1 = pref;
}
public void setPref2(String pref) {
this.pref2 = pref;
}
}
@@ -0,0 +1,51 @@
package ${package}.view;
import org.apache.struts2.dispatcher.DefaultActionSupport;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import javax.sql.DataSource;
import java.util.Map;
import java.util.List;
/**
* Loads and displays the contents of a database table
*/
public class IndexAction extends DefaultActionSupport {
private static boolean initialized = false;
private DataSource ds;
private static List<Map<String,Object>> data;
private static long lastLoaded;
private static long CACHE_TIME = 1000 * 60;
public void setDataSource(DataSource ds) {
// Initializes the in-memory database (not necessary in production)
if (!initialized) {
SimpleJdbcTemplate jt = new SimpleJdbcTemplate(ds);
jt.update("CREATE TABLE sample_table ( id INTEGER IDENTITY, str_col VARCHAR(256), num_col INTEGER)");
jt.update("INSERT INTO sample_table(str_col,num_col) VALUES('Ford', 100)");
jt.update("INSERT INTO sample_table(str_col,num_col) VALUES('Toyota', 200)");
jt.update("INSERT INTO sample_table(str_col,num_col) VALUES('Mazda', 300)");
initialized = true;
}
this.ds = ds;
}
public String execute() {
// Only refresh the data every minute as needed
long now = System.currentTimeMillis();
if (lastLoaded + CACHE_TIME < now) {
SimpleJdbcTemplate jt = new SimpleJdbcTemplate(ds);
data = jt.queryForList("SELECT * FROM sample_table");
lastLoaded = now;
}
return SUCCESS;
}
public List<Map<String,Object>> getData() {
return data;
}
}
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<constant name="struts.convention.default.parent.package" value="struts-portlet-default" />
<constant name="struts.convention.result.path" value="/WEB-INF/" />
<constant name="struts.devMode" value="true" />
<constant name="struts.convention.package.locators.basePackage" value="${package}"/>
<include file="struts-portlet-default.xml" />
<package name="${artifactId}-package" extends="struts-portlet-default" namespace="/">
<action name="*">
<result type="redirectAction">
<param name="actionName">index</param>
<param name="namespace">/view</param>
</result>
</action>
</package>
</struts>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
Defines the datasource that will be injected into your Actions
-->
<beans default-autowire="byName">
<!-- Change for your database -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource"
destroy-method="close">
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
<property name="url" value="jdbc:hsqldb:mem:example"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
</beans>
@@ -0,0 +1,10 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h1>StrutsPortlet</h1>
This is the default edit page!
<p />
<s:form action="index" method="POST">
<s:textfield label="Preference one" name="preferenceOne" value="%{preferenceOne}"/>
<s:textfield label="Preference two" name="preferenceTwo" value="%{preferenceTwo}"/>
<s:submit name="submit" value="Save prefs"/>
</s:form>
@@ -0,0 +1,22 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
The preferences has been saved:
<p />
<table>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>Preference 1</td>
<td><s:property value="%{pref1}" /></td>
</tr>
<tr>
<td>Preference 2</td>
<td><s:property value="%{pref2}" /></td>
</tr>
</table>
<a href="<s:url action="index"/>">Back</a>
@@ -0,0 +1,63 @@
<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" id="struts-portlet">
<portlet id="StrutsDBPortlet">
<description xml:lang="EN">Struts Database Portlet</description>
<portlet-name>StrutsDBPortlet</portlet-name>
<display-name xml:lang="EN">Struts Database Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<init-param>
<name>actionPackages</name>
<value>${package}</value>
</init-param>
<init-param>
<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<init-param>
<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<init-param>
<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>Struts Database Porlet</title>
<short-title>DB</short-title>
<keywords>struts,portlet,database</keywords>
</portlet-info>
</portlet>
</portlet-app>
@@ -0,0 +1,20 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Welcome to the Struts data table portlet</H2>
<p/>
This a simple table showing the database data:
<table>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<s:iterator id="row" value="%{data}">
<tr>
<td><s:property value="%{STR_COL}" /></td>
<td><s:property value="%{NUM_COL}" /></td>
</tr>
</s:iterator>
</table>
<ul>
<li><a href="<s:url action="index" portletMode="edit" namespace="/edit"/>">Go to edit mode and see what's there</a></li>
<li><a href="<s:url action="index" portletMode="help" namespace="/help"/>">Go to help mode and see what's there</a></li>
</ul>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
<filter id="filterdispatcher">
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.portlet.context.ServletContextHolderListener</listener-class>
</listener>
<servlet id="preparator">
<servlet-name>preparator</servlet-name>
<servlet-class>org.apache.struts2.portlet.context.PreparatorServlet</servlet-class>
</servlet>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1,4 @@
<%
String redirectURL = "view/index.action";
response.sendRedirect(redirectURL);
%>
@@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.2.0</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_2_0/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-plugin</url>
</scm>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-plugin</id>
<sources>
<source>src/main/java/MyResult.java</source>
</sources>
<resources>
<resource>src/main/resources/struts-plugin.xml</resource>
<resource>LICENSE.txt</resource>
<resource>NOTICE.txt</resource>
<resource>README.txt</resource>
</resources>
</archetype>
@@ -0,0 +1,174 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -0,0 +1,6 @@
Apache Struts
Copyright 2006 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -0,0 +1,10 @@
README.txt - plugin
This is an "empty" Struts 2 plugin that you can use as the basis for a new
plugin.
For more on Struts plugins, see
* http://struts.apache.org/2.x/docs/plugins.html
----------------------------------------------------------------------------
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>Struts 2 Plugin</name>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.8.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
</build>
</project>
@@ -0,0 +1,48 @@
/*
* 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 $package;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;
import javax.servlet.http.HttpServletResponse;
import java.io.Writer;
/**
* An example result that simply returns "hello".
*
*/
public class MyResult implements Result {
/**
* Executes the result.
*
* @param invocation an encapsulation of the action execution state.
* @throws Exception if an error occurs when writing the text to the servlet output stream.
*/
public void execute(ActionInvocation invocation) throws Exception {
HttpServletResponse response = ServletActionContext.getResponse();
Writer writer = response.getWriter();
writer.write("Hello");
writer.flush();
}
}
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<!--
Define new Struts beans that implement key interfaces or extend existing objects.
This is an example of a bean that provides a new ObjectFactory:
<bean type="com.opensymphony.xwork2.ObjectFactory" name="myObjectFactory" class="com.mycompany.myapp.MyObjectFactory" />
This example adds a new template engine for the Struts UI tags:
<bean type="org.apache.struts2.components.template.TemplateEngine" name="myEngine" class="com.mycompany.myapp.MyTemplateEngine" />
-->
<!--
You can also define or override constants to plug in your custom beans into the Struts framework or provide customization
options for plugin users.
This is an example of making your new ObjectFactory, defined above, the default ObjectFactory for the framework:
<constant name="struts.objectFactory" value="myObjectFactory" />
Or perhaps you want to provide a configuration option for the plugin user. Define a constant here, then have it injected
into your bean:
<constant name="my.configuration.option" value="myValue" />
-->
<!--
Finally, you can define your own interceptors, results, and action packages.
In this example, we create a package that defines a result: -->
<package name="myPlugin-default">
<result-types>
<result-type name="myResult" class="${package}.MyResult"/>
</result-types>
</package>
</struts>
@@ -0,0 +1,42 @@
INFORMATION
===========
- This is Struts 2's "Portlet" Maven Archetype
- To be used to create a simple portlet that can be deployed as a webapp or JSR168 portlet.
USAGE
=====
- change directory to where the portlet template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample portlet template, assuming :-
- root java package -> com.myCompany.myPortlet
- the portlet war name -> myWebApp
mvn archetype:create -DgroupId=com.myCompany.myPortlet \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-portlet \
-DarchetypeVersion=2.0.9-SNAPSHOT \
-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty execute as a servlet
mvn jetty:run
@@ -0,0 +1,47 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.2.0</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_2_0/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-portlet</url>
</scm>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-portlet</id>
<sources>
<source>src/main/java/HelloAction.java</source>
<source>src/main/java/UpdateNameAction.java</source>
</sources>
<testSources>
<source>src/test/java/JettyPlutoLauncher.java</source>
</testSources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/WEB-INF/jsp/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/jsp/edit/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
</resources>
</archetype>
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<name>My Portlet Application</name>
<version>${version}</version>
<properties>
<struts2.version>2.1.8.1</struts2.version>
</properties>
<dependencies>
<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.21</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
<version>6.1.14</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>pluto-embedded</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.pluto</groupId>
<artifactId>maven-pluto-plugin</artifactId>
<version>1.1.6</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
<defaultsDescriptor>/WEB-INF/jetty-pluto-web-default.xml</defaultsDescriptor>
</webAppConfig>
<systemProperties>
<systemProperty>
<name>org.apache.pluto.embedded.portletIds</name>
<value>HelloPortlet</value>
</systemProperty>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,38 @@
package ${packageName};
import javax.portlet.PortletPreferences;
import org.apache.struts2.dispatcher.DefaultActionSupport;
import org.apache.struts2.portlet.interceptor.PortletPreferencesAware;
import com.opensymphony.xwork2.Preparable;
public class HelloAction extends DefaultActionSupport implements PortletPreferencesAware {
private static final long serialVersionUID = 1L;
private String firstName;
private String lastName;
private PortletPreferences preferences;
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public void setPortletPreferences(PortletPreferences preferences) {
this.preferences = preferences;
}
@Override
public String execute() throws Exception {
firstName = preferences.getValue("firstName", "");
lastName = preferences.getValue("lastName", "");
return SUCCESS;
}
}
@@ -0,0 +1,54 @@
package ${packageName};
import javax.portlet.PortletPreferences;
import org.apache.struts2.dispatcher.DefaultActionSupport;
import org.apache.struts2.portlet.interceptor.PortletPreferencesAware;
public class UpdateNameAction extends DefaultActionSupport implements PortletPreferencesAware {
private static final long serialVersionUID = 1L;
private String firstName;
private String lastName;
private PortletPreferences preferences;
@Override
public String execute() throws Exception {
preferences.setValue("firstName", firstName);
preferences.setValue("lastName", lastName);
preferences.store();
getActionMessages().add("Name updated");
return SUCCESS;
}
@Override
public String input() throws Exception {
firstName = preferences.getValue("firstName", "");
lastName = preferences.getValue("lastName", "");
return INPUT;
}
public void setPortletPreferences(PortletPreferences preferences) {
this.preferences = preferences;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getFirstName() {
return firstName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getLastName() {
return lastName;
}
}
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="default" extends="struts-portlet-default" namespace="/view">
<action name="index" class="${packageName}.HelloAction">
<result>/WEB-INF/jsp/view/index.jsp</result>
</action>
</package>
<package name="edit" extends="struts-portlet-default" namespace="/edit">
<action name="index" class="${packageName}.UpdateNameAction">
<result type="redirectAction">
<param name="actionName">index</param>
<param name="portletMode">view</param>
</result>
<result name="input">/WEB-INF/jsp/edit/index.jsp</result>
</action>
</package>
</struts>
@@ -0,0 +1,13 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h2>Your name:</h2>
<s:form action="index">
<table>
<s:textfield name="firstName" label="First name"/>
<s:textfield name="lastName" label="Last name"/>
<s:submit value="Update"/>
</table>
</s:form>
<s:actionmessage/>
@@ -0,0 +1,9 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:if test='%{firstName != "" || lastName != ""}'>
<h2>Hello, <s:property value="firstName"/> <s:property value="lastName"/>
</s:if>
<s:else>
<b>No name set. Go to <a href="<s:url action="index" method="input" portletMode="edit"/>">edit mode</a> to set your name</b>
</s:else>
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
id="${artifactId}">
<portlet id="HelloPortlet">
<description xml:lang="EN">Simple hello world portlet</description>
<portlet-name>HelloPortlet</portlet-name>
<display-name xml:lang="EN">${artifactId}</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<!-- The namespace for the actions configured for view mode -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<!-- The namespace for the actions configured for edit mode -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index!input</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>HelloPortlet</title>
<short-title>HelloPortlet</short-title>
<keywords>struts 2,portlet,hello,world</keywords>
</portlet-info>
</portlet>
</portlet-app>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="${artifactId}">
<!-- Empty -->
</web-app>
@@ -0,0 +1,21 @@
package ${packageName};
import org.apache.pluto.core.PortletServlet;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.jetty.webapp.WebAppContext;
public class JettyPlutoLauncher {
public static void main(String[] args) throws Exception {
System.setProperty("org.apache.pluto.embedded.portletIds", "HelloPortlet");
Server server = new Server(8080);
WebAppContext webapp = new WebAppContext("src/main/webapp", "/${artifactId}");
webapp.setDefaultsDescriptor("/WEB-INF/jetty-pluto-web-default.xml");
ServletHolder portletServlet = new ServletHolder(new PortletServlet());
portletServlet.setInitParameter("portlet-name", "HelloPortlet");
portletServlet.setInitOrder(1);
webapp.addServlet(portletServlet, "/PlutoInvoker/HelloPortlet");
server.addHandler(webapp);
server.start();
}
}
@@ -0,0 +1,53 @@
INFORMATION
===========
- This is Struts 2's "Starter" Maven Archetype
- To be used to create a simple webapp template that one could alter to meet his/her needs.
- The created template contains
- sitemesh integration
- a simple Struts action
- a simple Struts action level validation
- a simple Struts action alias level validation
- a simple Struts global conversion
- a simple Struts action level conversion
- a simple Struts global resource bundle
- a simple Struts action level resource bundle
USAGE
=====
- change directory to where the web app template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample web app template, assuming :-
- root java package -> com.myCompany.mySystem
- the webapp war name -> myWebApp
mvn archetype:create -DgroupId=com.myCompany.mySystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-starter \
-DarchetypeVersion=2.0.11
COMMON TASKS
==========
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty6 execute
mvn jetty:run
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.2.0</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_2_0/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/archetypes/struts2-archetype-starter</url>
</scm>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-starter</id>
<sources>
<source>src/main/java/HelloWorldAction.java</source>
<source>src/main/java/IndexAction.java</source>
<source>src/main/java/DateConverter.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/resources/xwork-conversion.properties</resource>
<resource>src/main/resources/struts.properties</resource>
<resource>src/main/resources/applicationContext.xml</resource>
<resource>src/main/resources/log4j.properties</resource>
<resource>src/main/webapp/jsp/index.jsp</resource>
<resource>src/main/webapp/jsp/helloWorld.jsp</resource>
<resource>src/main/webapp/WEB-INF/decorators/main.jsp</resource>
<resource>src/main/webapp/WEB-INF/decorators.xml</resource>
<resource>src/main/webapp/styles/main.css</resource>
<resource>src/main/webapp/styles/forms.css</resource>
<resource>src/main/webapp/styles/layout.css</resource>
<resource>src/main/webapp/styles/layout-1col.css</resource>
<resource>src/main/webapp/styles/layout-navleft-1col.css</resource>
<resource>src/main/webapp/styles/layout-navleft-2col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-1col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-3col.css</resource>
<resource>src/main/webapp/styles/layout-navtop-localleft.css</resource>
<resource>src/main/webapp/styles/layout-navtop-subright.css</resource>
<resource>src/main/webapp/styles/nav-horizontal.css</resource>
<resource>src/main/webapp/styles/nav-vertical.css</resource>
<resource>src/main/webapp/styles/tools.css</resource>
<resource>src/main/webapp/styles/typo.css</resource>
<resource>src/main/webapp/WEB-INF/dwr.xml</resource>
<resource>src/main/webapp/WEB-INF/sitemesh.xml</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
</resources>
<testSources>
<source>src/test/java/HelloWorldActionTest.java</source>
<source>src/test/java/IndexActionTest.java</source>
</testSources>
<testResources>
<resource>src/test/resources/test.properties</resource>
</testResources>
</archetype>
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${version}</version>
<name>Struts 2 Starter</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Starter</description>
<properties>
<struts2.version>2.1.8.1</struts2.version>
</properties>
<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<!-- Servlet & Jsp -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<!-- Jakarta Commons -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.1.1</version>
</dependency>
<!-- Dwr -->
<dependency>
<groupId>uk.ltd.getahead</groupId>
<artifactId>dwr</artifactId>
<version>1.1-beta-3</version>
</dependency>
</dependencies>
<build>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,50 @@
/*
* Copyright 2006 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 ${package};
import org.apache.struts2.util.StrutsTypeConverter;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.Map;
import java.util.Date;
import com.opensymphony.xwork2.conversion.TypeConversionException;
/**
*
*/
public class DateConverter extends StrutsTypeConverter {
public Object convertFromString(Map context, String[] values, Class toClass) {
if (values != null && values.length > 0 && values[0] != null && values[0].length() > 0) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
try {
return sdf.parse(values[0]);
}
catch(ParseException e) {
throw new TypeConversionException(e);
}
}
return null;
}
public String convertToString(Map context, Object o) {
if (o instanceof Date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
return sdf.format((Date)o);
}
return "";
}
}
@@ -0,0 +1,45 @@
/*
* Copyright 2006 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 ${package};
import java.util.Date;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.validator.annotations.Validation;
import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator;
import com.opensymphony.xwork2.conversion.annotations.Conversion;
import com.opensymphony.xwork2.conversion.annotations.TypeConversion;
@Validation()
@Conversion()
public class HelloWorldAction extends ActionSupport {
private Date now;
private String name;
@TypeConversion(converter = "${package}.DateConverter")
@RequiredFieldValidator(message = "Please enter the date")
public void setDateNow(Date now) { this.now = now; }
public Date getDateNow() { return now; }
@RequiredStringValidator(message = "Please enter a name", trim = true)
public void setName(String name) { this.name = name; }
public String getName() { return this.name; }
public String execute() throws Exception {
return SUCCESS;
}
}
@@ -0,0 +1,38 @@
/*
* Copyright 2006 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 ${package};
import com.opensymphony.xwork2.ActionSupport;
import java.util.Date;
import com.opensymphony.xwork2.conversion.annotations.Conversion;
import com.opensymphony.xwork2.conversion.annotations.TypeConversion;
/**
*
*/
@Conversion()
public class IndexAction extends ActionSupport {
private Date now = new Date(System.currentTimeMillis());
@TypeConversion(converter = "${package}.DateConverter")
public Date getDateNow() { return now; }
public String execute() throws Exception {
now = new Date(System.currentTimeMillis());
return SUCCESS;
}
}
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC
"-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- Example of SAF2 action instantiated by Spring -->
<bean id="helloWorldAction" class="${package}.HelloWorldAction" singleton="false" />
</beans>
@@ -0,0 +1,5 @@
#
# Here is where the global I18n messages goes
#
some.key=Some Messages
@@ -0,0 +1,20 @@
log4j.rootLogger = DEBUG, stdout
log4j.category.com.opensymphony.sitemesh=DEBUG
log4j.category.org.apache.struts2=INFO
log4j.category.org.apache=INFO
log4j.category.catalia=INFO
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Threshold = DEBUG
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ISO8601} %-5p [%F:%L] : %m%n

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