Compare commits

...

148 Commits

Author SHA1 Message Date
Lukasz Lenart d3ae3f2bad [maven-release-plugin] copy for tag STRUTS_2_2_2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2@1085706 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 12:06:00 +00:00
Lukasz Lenart 0e9e58a069 [maven-release-plugin] prepare release STRUTS_2_2_2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085705 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 12:02:52 +00:00
Lukasz Lenart 00fdf8eccd Adds site.xml descriptor
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085685 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 10:57:32 +00:00
Lukasz Lenart dec9125733 Clean up pom to generate proper site
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085684 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 10:56:56 +00:00
Lukasz Lenart d0fd4609ea Changes phase when wget is starting
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085683 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 10:56:32 +00:00
Lukasz Lenart 2e8822632c Removes version for JUnit to use the inherited artifact from parent
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085668 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 08:42:52 +00:00
Lukasz Lenart af5d24e35e Moves dependencies to parent
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085667 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 08:42:30 +00:00
Lukasz Lenart 610a2e9700 Moves dependencies to parent
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085666 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 08:41:56 +00:00
Lukasz Lenart ea1776d667 Removes version for JUnit to use the inherited artifact from parent
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085665 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 08:41:22 +00:00
Lukasz Lenart 3c4d8106f5 Removes version for JUnit to use the inherited artifact from parent
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085664 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 08:40:19 +00:00
Lukasz Lenart 7fed3e9687 Removes custom JavaDoc configuration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085421 13f79535-47bb-0310-9956-ffa450edef68
2011-03-25 15:08:24 +00:00
Lukasz Lenart 6420cd036c Adds Maven archetype catalog
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1085280 13f79535-47bb-0310-9956-ffa450edef68
2011-03-25 08:22:58 +00:00
Maurizio Cucchiara 1736b56db7 WW-3597 - XSS vulnerability in javatemplates plugin (thanks Gareth Faires)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1084872 13f79535-47bb-0310-9956-ffa450edef68
2011-03-24 08:11:57 +00:00
Maurizio Cucchiara 38a856d9f3 WW-3598 - FieldErrorHandler in javatemplates plugin does not respond to escape attribute (thanks Gareth Faires)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1084628 13f79535-47bb-0310-9956-ffa450edef68
2011-03-23 16:24:09 +00:00
Lukasz Lenart 7b1494af73 Solves WW-3590 - adds dedicated namespace for REST services
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1082295 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 20:49:41 +00:00
Lukasz Lenart 3b61c7a1b9 Re-formats source code and add missing references to plugins
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1082279 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 19:43:51 +00:00
Lukasz Lenart 7163c04107 Re-formats source code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1082278 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 19:43:23 +00:00
Lukasz Lenart c0627796cc Solves problem with missing JavaDocs
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1082277 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 19:42:50 +00:00
Lukasz Lenart 9f37969c8c Removes duplicated site settings
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1082276 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 19:41:23 +00:00
Maurizio Cucchiara c71fc60127 Restored subversion properties
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1081298 13f79535-47bb-0310-9956-ffa450edef68
2011-03-14 09:58:49 +00:00
Maurizio Cucchiara 1b3a35fb44 Restored subversion properties
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1081295 13f79535-47bb-0310-9956-ffa450edef68
2011-03-14 09:54:09 +00:00
Maurizio Cucchiara 27d525e1f9 WW-3587 - Enhanced Java Template features (thanks Dustin Digmann)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1081194 13f79535-47bb-0310-9956-ffa450edef68
2011-03-13 18:58:08 +00:00
Maurizio Cucchiara edd0724746 WW-3528 - Moved junit from scope compile to test
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1081087 13f79535-47bb-0310-9956-ffa450edef68
2011-03-13 12:04:54 +00:00
Wesley Wannemacher 032593d2a3 WW-3588, for the docs!
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1080764 13f79535-47bb-0310-9956-ffa450edef68
2011-03-11 21:23:57 +00:00
Johannes Geppert e0b26487dd WW-3437: JavaScript should following the JSLint recommendations
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1079950 13f79535-47bb-0310-9956-ffa450edef68
2011-03-09 19:19:33 +00:00
Maurizio Cucchiara aa8dfb480e WW-3524 - Added field bridge support
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1079368 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 14:24:16 +00:00
Johannes Geppert 29c230d507 WW-3395: Client Validation don't display Global Messages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1078966 13f79535-47bb-0310-9956-ffa450edef68
2011-03-07 21:44:34 +00:00
Lukasz Lenart de378c89f6 Solves WW-3461 - additional synchronize block is not needed as the validatorCache is already synchronized map
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1078465 13f79535-47bb-0310-9956-ffa450edef68
2011-03-06 13:24:17 +00:00
Lukasz Lenart c302fafeaa Extends Jetty scanner configuration to reload server when any of configuration files will change
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1078462 13f79535-47bb-0310-9956-ffa450edef68
2011-03-06 13:09:41 +00:00
Lukasz Lenart 386ea93823 Adjusts poms to Maven 3 to avoid warnings
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1077840 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 08:01:18 +00:00
Lukasz Lenart 38e068da57 Solves WW-3330 - <@s.action> broken in sitemesh freemarker decorator page
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1077833 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 06:51:59 +00:00
Lukasz Lenart 54bd1a58c1 Solves WW-3550 - LocalizedTextUtil's messageFormats property should be a ConcurrentHashMap and clears unneeded synchronize() blocks
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1077832 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 06:46:42 +00:00
Lukasz Lenart 91ccd43e62 Solves WW-3547 - TextProvider.getText(String, List<Object>) changed to getText(String, List<?>)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1076704 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 17:48:32 +00:00
Lukasz Lenart 7a79058c9b Cleanups poms and removes shading
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1076547 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 07:28:33 +00:00
Lukasz Lenart 3db5298097 Removes shaded commons
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1076544 13f79535-47bb-0310-9956-ffa450edef68
2011-03-03 07:19:37 +00:00
Lukasz Lenart 885ab3459e Solves WW-3579 - escapes actionName and methodName to prevent XSS vulnerability
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1076372 13f79535-47bb-0310-9956-ffa450edef68
2011-03-02 21:01:01 +00:00
Lukasz Lenart 35bd1c8644 Solves WW-3582 - moves call to handleValidToken() method outside of lock on session object
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1075681 13f79535-47bb-0310-9956-ffa450edef68
2011-03-01 06:56:27 +00:00
Lukasz Lenart f713cfc837 Solves WW-3582 - moves in call to handleValidToken() method outside of lock on session object
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1075679 13f79535-47bb-0310-9956-ffa450edef68
2011-03-01 06:54:13 +00:00
Lukasz Lenart b16ff13843 Solves WW-3577 - uses field initialization to improve performance
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1074051 13f79535-47bb-0310-9956-ffa450edef68
2011-02-24 06:53:20 +00:00
Lukasz Lenart 6f23804845 Example how to use global exceptions mapping
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1073268 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 09:07:43 +00:00
Lukasz Lenart 1abb426e05 Solves WW-3577 - cache reference to JspFactory to improve performance
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1071940 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 10:29:36 +00:00
John Lindal a98be307b4 WW-3514 remove JSONUtil.PATTERN_PREFIX; add JSONInterceptor.setExcludeWildcards()
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1070550 13f79535-47bb-0310-9956-ffa450edef68
2011-02-14 16:18:28 +00:00
John Lindal c5ead127ea WW-3514 remove blank lines
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1070546 13f79535-47bb-0310-9956-ffa450edef68
2011-02-14 16:14:15 +00:00
John Lindal 5caf6f976d WW-3570 fix parameter name
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1070019 13f79535-47bb-0310-9956-ffa450edef68
2011-02-12 03:48:08 +00:00
John Lindal 06eacee2e0 WW-3513 one more way to make customization easier
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1068626 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:24:30 +00:00
John Lindal 6d8c7bd11e WW-3548 update copyright to 2011
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1068561 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 20:35:46 +00:00
John Lindal 331b42cdcf WW-3570 slot for debugging information in RPCResponse
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1068552 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 20:23:12 +00:00
Lukasz Lenart 9ac1393e2d Adds missing assembly info about Gxp Plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1066760 13f79535-47bb-0310-9956-ffa450edef68
2011-02-03 08:45:41 +00:00
Lukasz Lenart a2d9de071b Removes unused class as injecting is done in GxpResult
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1066754 13f79535-47bb-0310-9956-ffa450edef68
2011-02-03 08:28:43 +00:00
John Lindal 69e87d7122 XW-387 enable derived classes of config and derived classes of config bulders
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1066692 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 23:27:33 +00:00
John Lindal 495b137f1e WW-3513 allow derived classes to create derived classes of some objects
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1066628 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 21:13:23 +00:00
John Lindal 984a7faad1 WW-3514 fix/enhance support for include/exclude parameters
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1066613 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 20:28:20 +00:00
John Lindal afdd100ec8 WW-3498 JSONResult should serialize model, just like JSONInterceptor injects into model
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065880 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 01:22:39 +00:00
John Lindal 2f500d831b WW-3475 add missing files from contributed zip (WW-2754)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065829 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 22:14:54 +00:00
John Lindal 6ad5953ea3 WW-3490 clean up file uploads when action throws exception
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065764 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:43:25 +00:00
John Lindal 62e78be60f WW-3498 Inject values into top of stack (model or action) instead of always using action. This does not break backward compatibility because nobody could use a model before this patch.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065743 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:16:38 +00:00
John Lindal 94629009bb WW-3546
provide API for overriding devMode per request, and check for override where appropriate


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065735 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:00:58 +00:00
John Lindal 629fed6f2e XW-388 ignore maven target directories
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065717 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 19:18:32 +00:00
John Lindal 9dbe619a31 WW-3500 If top of stack is not the action, assume it is the model and check for annotiations.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065716 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 19:16:35 +00:00
Lukasz Lenart ceafb49aef WW-3488 - adds documentation for three new copy options
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065533 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 09:16:55 +00:00
Lukasz Lenart 8750397b72 WW-3488 - adds copy field errors to exclude list during chaining
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065530 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 09:03:29 +00:00
John Lindal 3c2a51d465 WW-3501 avoid cast by using existing generics
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065357 13f79535-47bb-0310-9956-ffa450edef68
2011-01-30 19:21:43 +00:00
John Lindal 8c4a8976aa XW-388 fix pattern to match relocation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065355 13f79535-47bb-0310-9956-ffa450edef68
2011-01-30 19:13:44 +00:00
John Lindal 28a834f051 WW-3496 fix StubValueStack to avoid infinite loop
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065351 13f79535-47bb-0310-9956-ffa450edef68
2011-01-30 19:09:44 +00:00
John Lindal 10857ce2da WW-3512 remove nonexistent SessionContextAutowiringInterceptor
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065350 13f79535-47bb-0310-9956-ffa450edef68
2011-01-30 19:05:23 +00:00
John Lindal 109b18ca50 WW-3525 JSONInterceptor extends AbstractInterceptor
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065348 13f79535-47bb-0310-9956-ffa450edef68
2011-01-30 19:00:06 +00:00
Maurizio Cucchiara 62353788ac WW-3549 rollback to the previous version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065111 13f79535-47bb-0310-9956-ffa450edef68
2011-01-29 21:17:10 +00:00
Maurizio Cucchiara 3e8653bf5b Upgraded commons-io and commons-fileupload and removed redundant dependencies
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065090 13f79535-47bb-0310-9956-ffa450edef68
2011-01-29 18:39:22 +00:00
Maurizio Cucchiara ec06e80b3d WW-3549 - Shaded FileUtils
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065002 13f79535-47bb-0310-9956-ffa450edef68
2011-01-29 11:49:34 +00:00
John Lindal 7c37409ece XW-385 remove unused code
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1064288 13f79535-47bb-0310-9956-ffa450edef68
2011-01-27 20:18:44 +00:00
Maurizio Cucchiara 1a828ae72e WW-3562 - FileUploadInterceptor: File not uploaded when file is empty (0 bytes)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1062361 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 10:17:42 +00:00
Lukasz Lenart ee728cdc50 Solves WW-3507 - adds additional check for jboss.vfs.forceVfsJar parameter to treat vfsfile:// as a file in a Jar
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1061358 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 15:59:39 +00:00
Maurizio Cucchiara b7f4bc4cf7 WW-3560 - [Fixed tests] - DoubleSelect doesn't work in all browsers (BlackBerry Browser)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1061175 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 09:32:33 +00:00
Maurizio Cucchiara e380d29d97 Restored xwork-core properties
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1060604 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 22:49:37 +00:00
Maurizio Cucchiara c82ee68bf8 WW-3559 - PrepareInterceptor is eating exceptions that occur in prepare{methodName} methods
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1060603 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 22:42:54 +00:00
Maurizio Cucchiara 71525d260b WW-3560 - DoubleSelect doesn't work in all browsers (BlackBerry Browser)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1060591 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 21:47:21 +00:00
Maurizio Cucchiara 1de216647a WW-3554 Tomcat requires JsonPlugin.tld to be in META-INF directory
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1056225 13f79535-47bb-0310-9956-ffa450edef68
2011-01-07 09:26:10 +00:00
Maurizio Cucchiara 9515fa8b19 WW-3519 Added encoding type to prevent encoding errors
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1055126 13f79535-47bb-0310-9956-ffa450edef68
2011-01-04 18:14:46 +00:00
Maurizio Cucchiara 2b9aa180aa WW-3551 Removed the unnecessary property parameters.body
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1054978 13f79535-47bb-0310-9956-ffa450edef68
2011-01-04 11:37:14 +00:00
Maurizio Cucchiara 823626ab0c Javassist is now provided by ognl 3.0.1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1054964 13f79535-47bb-0310-9956-ffa450edef68
2011-01-04 10:42:02 +00:00
Lukasz Lenart 351740c411 Cleans poms and dependency management
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1054288 13f79535-47bb-0310-9956-ffa450edef68
2011-01-01 20:43:24 +00:00
Lukasz Lenart ed0cbba92a Adds missing dependency classifier
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1053847 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 10:36:34 +00:00
Lukasz Lenart 9261299b94 Cleans poms and dependency management
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1053813 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 07:03:51 +00:00
Lukasz Lenart 24fcccf111 Removes TestNG output directory - already moved to target/surefire-reports
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1053431 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 20:57:18 +00:00
Lukasz Lenart 25c27e2944 Merges branch 2.2.1.1 back to trunk
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1053429 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 20:48:55 +00:00
Lukasz Lenart f84c611fd6 Proper url for JIRA
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1053414 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 19:43:30 +00:00
Lukasz Lenart fff969dbaa [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1048960 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 07:01:16 +00:00
Lukasz Lenart 25b003a261 [maven-release-plugin] prepare release STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1048956 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 06:52:13 +00:00
Lukasz Lenart 725c946989 Upgrade to Struts Master 8
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1048946 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 06:00:46 +00:00
Lukasz Lenart c5648af045 Remove wrong ignore pattern
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1048945 13f79535-47bb-0310-9956-ffa450edef68
2010-12-14 06:00:11 +00:00
Lukasz Lenart bf9ae6690a Rollback release 2.2.1.1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1043697 13f79535-47bb-0310-9956-ffa450edef68
2010-12-08 21:46:37 +00:00
Lukasz Lenart 769903779b [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042536 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 07:19:42 +00:00
Lukasz Lenart 5f9d3a0e05 [maven-release-plugin] prepare release STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042530 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 07:08:42 +00:00
Lukasz Lenart 750bbfc0b5 Proper links for SCM
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042525 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 06:42:58 +00:00
Lukasz Lenart 29f275b071 [maven-release-plugin] rollback the release of STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042464 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 22:05:38 +00:00
Lukasz Lenart 47043e00b6 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042457 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 21:41:53 +00:00
Lukasz Lenart 987003b517 [maven-release-plugin] prepare release STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042454 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 21:37:26 +00:00
Lukasz Lenart be102e501b [maven-release-plugin] rollback the release of STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042318 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 11:45:44 +00:00
Lukasz Lenart 572127f3b3 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042030 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 22:19:43 +00:00
Lukasz Lenart c78ff95ad0 [maven-release-plugin] prepare release STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042026 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 22:16:10 +00:00
Lukasz Lenart 9ab02de901 [maven-release-plugin] rollback the release of STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042019 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 21:45:44 +00:00
Lukasz Lenart 72e3146242 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042003 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 21:10:44 +00:00
Lukasz Lenart ad48b01f93 [maven-release-plugin] prepare release STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1042000 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 21:05:30 +00:00
Lukasz Lenart fe11bf7336 Add missing header with license
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041982 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 20:30:47 +00:00
Lukasz Lenart fb392e2f18 [maven-release-plugin] rollback the release of STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041971 13f79535-47bb-0310-9956-ffa450edef68
2010-12-03 20:06:07 +00:00
Lukasz Lenart b84aad6efe [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041295 13f79535-47bb-0310-9956-ffa450edef68
2010-12-02 07:09:55 +00:00
Lukasz Lenart d6b0a9a65c [maven-release-plugin] prepare release STRUTS_2_2_1_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041292 13f79535-47bb-0310-9956-ffa450edef68
2010-12-02 06:55:46 +00:00
Lukasz Lenart 4f95ca2dc2 Cleaning up JUnit dependency
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041158 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 20:41:02 +00:00
Lukasz Lenart 28b3f7da03 Removed generated directory
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041153 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 20:34:21 +00:00
Lukasz Lenart c3b46ecc44 Preparing 2.2.1.1 release
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1041022 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 14:39:57 +00:00
Lukasz Lenart 408517533c Preparing for new release
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1039948 13f79535-47bb-0310-9956-ffa450edef68
2010-11-28 21:07:51 +00:00
Lukasz Lenart 3804db87bf Preparing 2.2.1.1 release
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1039581 13f79535-47bb-0310-9956-ffa450edef68
2010-11-26 22:33:27 +00:00
Lukasz Lenart c95a0f8b5e Added Dynamic Method Invocation support
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1039579 13f79535-47bb-0310-9956-ffa450edef68
2010-11-26 22:23:25 +00:00
Lukasz Lenart ed973456cb Branch to apply the latest security patch
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_2_1_1@1037870 13f79535-47bb-0310-9956-ffa450edef68
2010-11-22 20:28:03 +00:00
Wesley Wannemacher 2bbc045260 attempting to revert accidental tag deletion
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_1@1037864 13f79535-47bb-0310-9956-ffa450edef68
2010-11-22 20:01:57 +00:00
Lukasz Lenart dafd99ccd3 Disabled Dynamic Method Invocation by default in Maven archetypes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1036428 13f79535-47bb-0310-9956-ffa450edef68
2010-11-18 12:04:35 +00:00
Lukasz Lenart e6fdc8375a Solved WW-3449 - supressEmptyParameters in a redirectAction doesn't work
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026677 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 20:33:00 +00:00
Lukasz Lenart 753d6f5fde Solved WW-3494 - many improvments to REST plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026675 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 20:19:47 +00:00
Lukasz Lenart 8afe4c4b22 Solved WW-3460 - improved spring bean lookup
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026674 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 20:02:08 +00:00
Lukasz Lenart d064ff93ae Solved WW-3461 - reduced lock scope
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026672 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:59:30 +00:00
Lukasz Lenart ce17a40db6 Instead hard coded project versiob used ${project.version}
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026664 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:13:05 +00:00
Lukasz Lenart de210c1e72 Solved WW-3508 - added disable property to sx:submit
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026662 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:02:54 +00:00
Lukasz Lenart c6149bb21f Solved WW-3509 - JSONResult.setIncludeProperties() constructs incorrect patterns
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026661 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:01:25 +00:00
Lukasz Lenart b836f6225c Applied patch to solve WW-3486 - NPE when struts.convention.classes.reload is set to true
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1026245 13f79535-47bb-0310-9956-ffa450edef68
2010-10-22 08:39:27 +00:00
Lukasz Lenart 6854397de2 Resolved WW-3403 - added JUnit 4 StrutsTestCase
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1002045 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 07:52:39 +00:00
Lukasz Lenart 0b303e4aa2 Added option to use many Context Locations
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@997996 13f79535-47bb-0310-9956-ffa450edef68
2010-09-17 06:45:24 +00:00
Lukasz Lenart 2a6c223034 Changed hard coded Struts 2 Core version to project.version
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@997995 13f79535-47bb-0310-9956-ffa450edef68
2010-09-17 06:43:41 +00:00
Lukasz Lenart 1083e060c8 Updated JavaDoc snippet about copping actionErrors and actionMessages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@997366 13f79535-47bb-0310-9956-ffa450edef68
2010-09-15 15:26:34 +00:00
Lukasz Lenart 2f23ec71ac Reverted setIncludes() implementation (commited by mistake)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@997365 13f79535-47bb-0310-9956-ffa450edef68
2010-09-15 15:23:16 +00:00
Lukasz Lenart 6956110298 Solved WW-3488 - exclude copy Action's Errors and Messages from chain
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@997345 13f79535-47bb-0310-9956-ffa450edef68
2010-09-15 14:12:26 +00:00
Lukasz Lenart 68c351b793 Resolved WW-3491 - removed interceptors that doesn't exist any more
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@997234 13f79535-47bb-0310-9956-ffa450edef68
2010-09-15 09:04:00 +00:00
Lukasz Lenart 54457a1d8d Corrected version of the parent pom
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@995367 13f79535-47bb-0310-9956-ffa450edef68
2010-09-09 10:07:17 +00:00
Lukasz Lenart cf75c5e78a Added GXP plugin as fully integrated with Struts 2
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@995365 13f79535-47bb-0310-9956-ffa450edef68
2010-09-09 09:45:32 +00:00
David Newton 7c78ea933c Updated docs to reflect that setting type to anything but 'start' or 'end' throws an IllegalArgumentException
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@983233 13f79535-47bb-0310-9956-ffa450edef68
2010-08-07 14:29:30 +00:00
Lukasz Lenart 5a5a2fff20 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@965064 13f79535-47bb-0310-9956-ffa450edef68
2010-07-17 12:13:46 +00:00
Lukasz Lenart 98b3d24395 [maven-release-plugin] copy for tag STRUTS_2_2_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_1@965062 13f79535-47bb-0310-9956-ffa450edef68
2010-07-17 12:11:28 +00:00
Lukasz Lenart fc45fa6c43 [maven-release-plugin] prepare release STRUTS_2_2_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@965058 13f79535-47bb-0310-9956-ffa450edef68
2010-07-17 11:57:54 +00:00
Lukasz Lenart ecf85f4d44 Resolved WW-3467 - Improve performance for page rendering by refactoring freemarker cache
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@965050 13f79535-47bb-0310-9956-ffa450edef68
2010-07-17 10:10:46 +00:00
Lukasz Lenart 1b1873bf26 [maven-release-plugin] rollback the release of STRUTS_2_2_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@965038 13f79535-47bb-0310-9956-ffa450edef68
2010-07-17 09:13:53 +00:00
Lukasz Lenart a1fdb60a66 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@964329 13f79535-47bb-0310-9956-ffa450edef68
2010-07-15 07:28:58 +00:00
Lukasz Lenart 18af7714ab [maven-release-plugin] copy for tag STRUTS_2_2_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_1@964327 13f79535-47bb-0310-9956-ffa450edef68
2010-07-15 07:26:37 +00:00
Lukasz Lenart 01e1f2428b [maven-release-plugin] prepare release STRUTS_2_2_1
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@964323 13f79535-47bb-0310-9956-ffa450edef68
2010-07-15 07:10:37 +00:00
Lukasz Lenart 3c3776bc62 Added Javassist dependency
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@964158 13f79535-47bb-0310-9956-ffa450edef68
2010-07-14 20:01:40 +00:00
Lukasz Lenart 45d6d3d724 Dedicated JBoss Blank application without Javassist library
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@964154 13f79535-47bb-0310-9956-ffa450edef68
2010-07-14 19:55:21 +00:00
Lukasz Lenart f4e210b914 Code clean up and refactoring
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@963612 13f79535-47bb-0310-9956-ffa450edef68
2010-07-13 07:10:06 +00:00
Lukasz Lenart 9787de855f Resolved WW-3463 - added support for dynamic attributes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@963604 13f79535-47bb-0310-9956-ffa450edef68
2010-07-13 05:54:28 +00:00
Lukasz Lenart cd5c35e24a Code clean up and refactoring
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@962472 13f79535-47bb-0310-9956-ffa450edef68
2010-07-09 10:11:54 +00:00
Lukasz Lenart ad4f6d0fa0 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@958826 13f79535-47bb-0310-9956-ffa450edef68
2010-06-29 04:57:32 +00:00
325 changed files with 8868 additions and 5308 deletions
+13 -9
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.0</version>
<version>2.2.2</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_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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/blank</url>
</scm>
<dependencies>
@@ -44,20 +44,19 @@
<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>${pom.groupId}</groupId>
<groupId>${project.groupId}</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -70,10 +69,15 @@
<version>6.0.1</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
<scanTarget>src/main/resources/struts.xml</scanTarget>
<scanTarget>src/main/resources/example.xml</scanTarget>
</scanTargets>
</configuration>
</plugin>
</plugins>
</build>
</project>
+1 -1
View File
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+1 -1
View File
@@ -5,7 +5,7 @@
<struts>
<package name="example" namespace="/example" extends="struts-default">
<package name="example" namespace="/example" extends="default">
<action name="HelloWorld" class="example.HelloWorld">
<result>/example/HelloWorld.jsp</result>
+12 -4
View File
@@ -8,12 +8,18 @@
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<include file="example.xml"/>
<package name="default" namespace="/" extends="struts-default">
<default-action-ref name="index" />
<global-results>
<result name="error">/error.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="java.lang.Exception" result="error"/>
</global-exception-mappings>
<action name="index">
<result type="redirectAction">
<param name="actionName">HelloWorld</param>
@@ -22,6 +28,8 @@
</action>
</package>
<include file="example.xml"/>
<!-- Add packages here -->
</struts>
+15
View File
@@ -0,0 +1,15 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head><title>Simple jsp page</title></head>
<body>
<h3>Exception:</h3>
<s:property value="exception"/>
<h3>Stack trace:</h3>
<pre>
<s:property value="exceptionStack"/>
</pre>
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
README.txt - JBoss Blank
This is an "empty" application that you can deploy as the basis of your own
application. This specially dedicated to JBoss server as it includes the Javassist library.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
----------------------------------------------------------------------------
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jboss-blank</artifactId>
<packaging>war</packaging>
<name>JBoss Blank Webapp</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/jboss-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/jboss-blank</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/jboss-blank</url>
</scm>
<dependencies>
<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>${project.groupId}</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,30 @@
/*
* $Id: ExampleSupport.java 471756 2006-11-06 15:01:43Z husted $
*
* 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 example;
import com.opensymphony.xwork2.ActionSupport;
/**
* Base Action class for the Tutorial package.
*/
public class ExampleSupport extends ActionSupport {
}
@@ -0,0 +1,61 @@
/*
* $Id: HelloWorld.java 471756 2006-11-06 15:01:43Z husted $
*
* 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 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: Login.java 471756 2006-11-06 15:01:43Z husted $
*
* 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 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,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,5 @@
Apache Struts
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -0,0 +1,25 @@
<?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>
<package name="example" namespace="/example" extends="struts-default">
<action name="HelloWorld" class="example.HelloWorld">
<result>/example/HelloWorld.jsp</result>
</action>
<action name="Login_*" method="{1}" class="example.Login">
<result name="input">/example/Login.jsp</result>
<result type="redirectAction">Menu</result>
</action>
<action name="*" class="example.ExampleSupport">
<result>/example/{1}.jsp</result>
</action>
<!-- Add actions here -->
</package>
</struts>
@@ -0,0 +1,16 @@
<!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 interation.
@@ -0,0 +1,5 @@
HelloWorld.message= ¡Struts está bien! ...
requiredstring = ${getText(fieldName)} se requiere.
password = Contraseña
username = Nombre de Usuario
Missing.message = ¡en obras! ¡seguir intentando!
@@ -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">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<include file="example.xml"/>
<package name="default" namespace="/" extends="struts-default">
<default-action-ref name="index" />
<action name="index">
<result type="redirectAction">
<param name="actionName">HelloWorld</param>
<param name="namespace">/example</param>
</result>
</action>
</package>
<!-- Add packages here -->
</struts>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" 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: ConfigTest.java 670170 2008-06-21 09:40:34Z hermanns $
*
* 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 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<String, List<String>> 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,39 @@
/*
* $Id: HelloWorldTest.java 577750 2007-09-20 13:54:31Z mrdon $
*
* 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 example;
import org.apache.struts2.StrutsTestCase;
import com.opensymphony.xwork2.ActionSupport;
import junit.framework.TestCase;
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: LoginTest.java 471756 2006-11-06 15:01:43Z husted $
*
* 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 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.");
}
}
+7 -6
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.0</version>
<version>2.2.2</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_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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/mailreader</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/mailreader</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/mailreader</url>
</scm>
<dependencies>
@@ -44,14 +44,15 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${pom.groupId}</groupId>
<groupId>${project.groupId}</groupId>
<artifactId>struts-mailreader-dao</artifactId>
<version>1.3.5</version>
</dependency>
</dependencies>
<build>
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+9 -15
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
@@ -34,6 +34,7 @@
<name>Webapps</name>
<modules>
<module>blank</module>
<module>jboss-blank</module>
<module>mailreader</module>
<module>portlet</module>
<module>showcase</module>
@@ -41,18 +42,11 @@
</modules>
<scm>
<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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps</url>
</scm>
<distributionManagement>
<site>
<id>apache-site</id>
<url>scp://people.apache.org/www/struts.apache.org/struts2/apps</url>
</site>
</distributionManagement>
<profiles>
<profile>
<id>hostedqa</id>
@@ -178,10 +172,10 @@
<phase>process-sources</phase>
<configuration>
<tasks>
<copy todir="${project.build.directory}/${pom.artifactId}/WEB-INF/src/java" failonerror="false">
<copy todir="${project.build.directory}/${project.artifactId}/WEB-INF/src/java" failonerror="false">
<fileset dir="${basedir}/src/main/java" />
</copy>
<copy todir="${project.build.directory}/${pom.artifactId}/WEB-INF/src/java" failonerror="false">
<copy todir="${project.build.directory}/${project.artifactId}/WEB-INF/src/java" failonerror="false">
<fileset dir="${basedir}/src/main/resources" />
</copy>
</tasks>
@@ -211,7 +205,7 @@
</plugin>
</plugins>
<finalName>${pom.artifactId}</finalName>
<finalName>${project.artifactId}</finalName>
</build>
@@ -220,7 +214,7 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
+93 -110
View File
@@ -24,9 +24,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.0</version>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
@@ -34,38 +34,38 @@
<name>Portlet Webapp</name>
<scm>
<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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/portlet</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/portlet</url>
</scm>
<profiles>
<profile>
<id>pluto</id>
<build>
<plugins>
<!-- configure maven-war-plugin to use updated web.xml -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
</configuration>
</plugin>
<!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->
<plugin>
<groupId>org.apache.pluto</groupId>
<artifactId>maven-pluto-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<profiles>
<profile>
<id>pluto</id>
<build>
<plugins>
<!-- configure maven-war-plugin to use updated web.xml -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
</configuration>
</plugin>
<!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->
<plugin>
<groupId>org.apache.pluto</groupId>
<artifactId>maven-pluto-plugin</artifactId>
<version>1.1.3</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>
<configuration>
@@ -79,106 +79,91 @@
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</profile>
</profiles>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${pom.version}</version>
<artifactId>struts2-spring-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dwr-plugin</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<exclusions>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
</exclusion>
</exclusions>
</exclusions>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<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>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
<version>1.4.1</version>
@@ -191,25 +176,23 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0</version>
<scope>test</scope>
</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>
<version>6.1.4rc0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>
+1 -1
View File
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+4 -6
View File
@@ -26,13 +26,13 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.2.0</version>
<version>2.2.2</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>
@@ -40,17 +40,16 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
@@ -81,7 +80,6 @@
</exclusions>
</dependency>
</dependencies>
<build>
+62 -69
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.2.0</version>
<version>2.2.2</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_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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/showcase</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/apps/showcase</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/apps/showcase</url>
</scm>
@@ -56,82 +56,78 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-struts1-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dojo-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jsf-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dwr-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.0.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-codebehind-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Velocity -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
@@ -162,55 +158,52 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.1.1</version>
</dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-core</artifactId>
<version>1.4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-core</artifactId>
<version>1.4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
<version>1.4.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
<version>1.4.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -225,20 +218,20 @@
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.2</version>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
</dependency>
</dependencies>
</plugin>
<!--
+1 -1
View File
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+4 -4
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
@@ -34,9 +34,9 @@
<name>Struts 2 Maven Archetypes</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes</url>
</scm>
<modules>
+5 -5
View File
@@ -3,18 +3,18 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.2.0</version>
<version>2.2.2</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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-blank</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-blank</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-blank</url>
</scm>
<properties>
@@ -1,6 +1,6 @@
Apache Struts
Copyright 2006 The Apache Software Foundation
Copyright 2006-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Webapp</name>
<properties>
<struts2.version>2.1.8.1</struts2.version>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
@@ -84,6 +84,12 @@
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
<scanTarget>src/main/resources/struts.xml</scanTarget>
<scanTarget>src/main/resources/example.xml</scanTarget>
</scanTargets>
</configuration>
</plugin>
</plugins>
@@ -2,18 +2,18 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.2.0</version>
<version>2.2.2</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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-convention</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-convention</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-convention</url>
</scm>
<properties>
@@ -1,6 +1,6 @@
Apache Struts
Copyright 2006 The Apache Software Foundation
Copyright 2006-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Convention Webapp</name>
<properties>
<struts2.version>2.1.8.1</struts2.version>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
@@ -84,6 +84,11 @@
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
<scanTarget>src/main/resources/struts.xml</scanTarget>
</scanTargets>
</configuration>
</plugin>
</plugins>
@@ -0,0 +1,10 @@
<?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"/>
</struts>
@@ -2,18 +2,18 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.2.0</version>
<version>2.2.2</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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-dbportlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-dbportlet</developerConnection>
<url>svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-dbportlet</url>
</scm>
<properties>
@@ -5,13 +5,13 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${version}</version>
<version>${project.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>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
@@ -107,9 +107,14 @@
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
<scanTarget>src/main/resources/struts.xml</scanTarget>
</scanTargets>
</configuration>
<dependencies>
<dependency>
<groupId>portlet-api</groupId>
+5 -5
View File
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.2.0</version>
<version>2.2.2</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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-plugin</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-plugin</url>
</scm>
<properties>
@@ -1,6 +1,6 @@
Apache Struts
Copyright 2006 The Apache Software Foundation
Copyright 2006-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -5,7 +5,7 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<name>Struts 2 Plugin</name>
<dependencies>
@@ -13,7 +13,7 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.8.1</version>
<version>${project.version}</version>
</dependency>
<dependency>
+5 -5
View File
@@ -2,19 +2,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.2.0</version>
<version>2.2.2</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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-portlet</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-portlet</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-portlet</url>
</scm>
<properties>
@@ -7,10 +7,10 @@
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<name>My Portlet Application</name>
<version>${version}</version>
<version>${project.version}</version>
<properties>
<struts2.version>2.1.8.1</struts2.version>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
@@ -110,6 +110,12 @@
<value>HelloPortlet</value>
</systemProperty>
</systemProperties>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
<scanTarget>src/main/resources/struts.xml</scanTarget>
</scanTargets>
</configuration>
<dependencies>
<dependency>
+5 -5
View File
@@ -4,19 +4,19 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.2.0</version>
<version>2.2.2</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>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-starter</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-starter</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/archetypes/struts2-archetype-starter</url>
</scm>
<properties>
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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>
<version>${project.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>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
@@ -92,9 +92,15 @@
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp/WEB-INF</scanTarget>
<scanTarget>src/main/webapp/WEB-INF/web.xml</scanTarget>
<scanTarget>src/main/resources/struts.xml</scanTarget>
<scanTarget>src/main/resources/applicationContext.xml</scanTarget>
</scanTargets>
</configuration>
</plugin>
</plugins>
</build>
@@ -5,6 +5,9 @@
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<package name="myPackage" extends="struts-default">
<action name="index" class="${package}.IndexAction">
<result>/jsp/index.jsp</result>
+194 -186
View File
@@ -11,15 +11,15 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/assembly</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/assembly</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/assembly</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/assembly</url>
</scm>
<profiles>
<profile>
<id>j4</id>
@@ -27,13 +27,13 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<version>2.2</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
<goal>attached</goal>
</goals>
</execution>
</executions>
@@ -46,7 +46,7 @@
<descriptor>src/main/assembly/src.xml</descriptor>
<descriptor>src/main/assembly/docs.xml</descriptor>
</descriptors>
<finalName>struts-${version}</finalName>
<finalName>struts-${project.version}</finalName>
<outputDirectory>target/assembly/out</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
</configuration>
@@ -55,149 +55,157 @@
</build>
<dependencies>
<!-- Backported JDK 1.4 jars -->
<dependency>
<groupId>net.sf.retrotranslator</groupId>
<artifactId>retrotranslator-runtime</artifactId>
<version>1.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.retrotranslator</groupId>
<artifactId>retrotranslator-runtime</artifactId>
<version>1.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>backport-util-concurrent</groupId>
<artifactId>backport-util-concurrent</artifactId>
<version>3.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>backport-util-concurrent</groupId>
<artifactId>backport-util-concurrent</artifactId>
<version>3.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>${version}</version>
<type>jar</type>
<classifier>jdk14</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>${project.version}</version>
<type>jar</type>
<classifier>jdk14</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jasperreports-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jasperreports-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jfreechart-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jfreechart-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jsf-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jsf-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-pell-multipart-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-pell-multipart-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plexus-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plexus-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitegraph-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitegraph-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-struts1-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-struts1-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-oval-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-embeddedjsp-plugin</artifactId>
<version>${version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-oval-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-embeddedjsp-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-gxp-plugin</artifactId>
<version>${project.version}</version>
<classifier>jdk14</classifier>
</dependency>
</dependencies>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dependency-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>copy-war</id>
@@ -210,37 +218,37 @@
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-blank</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-showcase</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-mailreader</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<type>war</type>
</artifactItem>
</artifactItems>
@@ -255,16 +263,13 @@
<executions>
<execution>
<id>cwiki-docs</id>
<phase>process-resources</phase>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/cwiki" />
<!--
<exec executable="ssh" failonerror="true" >
<arg line="${username}@people.apache.org /www/struts.apache.org/2.x/docs-zip2.sh" />
</exec>
<unzip src="${project.build.directory}/docs.zip" dest="${project.build.directory}/cwiki" />
-->
<exec executable="wget">
<arg value="-erobots=off" />
<arg value="-nH" />
@@ -278,22 +283,19 @@
</exec>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<version>2.2</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
<goal>attached</goal>
</goals>
</execution>
</executions>
@@ -305,7 +307,7 @@
<descriptor>src/main/assembly/src.xml</descriptor>
<descriptor>src/main/assembly/docs.xml</descriptor>
</descriptors>
<finalName>struts-${version}</finalName>
<finalName>struts-${project.version}</finalName>
<outputDirectory>target/assembly/out</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
</configuration>
@@ -318,158 +320,164 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-codebehind-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-javatemplates-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dojo-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-dwr-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jasperreports-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jfreechart-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-jsf-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-pell-multipart-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plexus-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitegraph-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-struts1-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-testng-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-oval-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-embeddedjsp-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-gxp-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-admin-bundle</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-demo-bundle</artifactId>
<version>${version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>
+5 -1
View File
@@ -226,7 +226,11 @@
<directory>../plugins/embeddedjsp/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-embeddedjsp-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/gxp/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-gxp-plugin</outputDirectory>
</fileSet>
<!-- bundles -->
<fileSet>
<directory>../bundles/admin/target/site</directory>
+123 -118
View File
@@ -22,127 +22,132 @@
-->
<assembly>
<id>docs</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<!-- Include the XWork Javadoc in the assembly -->
<fileSet>
<directory>../xwork-core/target/site/apidocs</directory>
<outputDirectory>docs/xwork-apidocs</outputDirectory>
</fileSet>
<id>docs</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<!-- Include the website in the assembly -->
<fileSet>
<directory>../target/site</directory>
<outputDirectory>docs</outputDirectory>
</fileSet>
<fileSet>
<directory>../api/target/site</directory>
<outputDirectory>docs/struts2-api</outputDirectory>
</fileSet>
<fileSet>
<directory>../core/target/site</directory>
<outputDirectory>docs/struts2-core</outputDirectory>
</fileSet>
<!-- Include the XWork Javadoc in the assembly -->
<fileSet>
<directory>../xwork-core/target/apidocs</directory>
<outputDirectory>docs/xwork-core/apidocs</outputDirectory>
</fileSet>
<!-- Include the Confluence docs in the assembly -->
<fileSet>
<directory>target/cwiki/WW</directory>
<outputDirectory>docs</outputDirectory>
</fileSet>
<!-- Include the website in the assembly -->
<fileSet>
<directory>../target/site</directory>
<outputDirectory>docs</outputDirectory>
</fileSet>
<fileSet>
<directory>../core/target/apidocs</directory>
<outputDirectory>docs/struts2-core/apidocs</outputDirectory>
</fileSet>
<!-- Plugins -->
<fileSet>
<directory>../plugins/codebehind/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-codebehind-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/config-browser/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-config-browser-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/dojo/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-dojo-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/dojo/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-dwr-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/jasperreports/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-jasperreports-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/jfreechart/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-jfreechart-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/jsf/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-jsf-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/junit/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-junit-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/pell-multipart/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-pell-multipart-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/plexus/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-plexus-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/portlet/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-portlet-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/rest/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-rest-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/struts1/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-struts1-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/sitegraph/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-sitegraph-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/spring/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-spring-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/sitemesh/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-sitemesh-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/testng/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-testng-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/tiles/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-tiles-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/oval/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-oval-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/osgi/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-osgi-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/json/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-json-plugin</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/embeddedjsp/target/site</directory>
<outputDirectory>docs/struts2-plugins/struts2-embeddedjsp-plugin</outputDirectory>
</fileSet>
<!-- Include the Confluence docs in the assembly -->
<fileSet>
<directory>target/cwiki/WW</directory>
<outputDirectory>docs/docs</outputDirectory>
</fileSet>
</fileSets>
<!-- Plugins -->
<fileSet>
<directory>../plugins/codebehind/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-codebehind-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/config-browser/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-config-browser-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/convention/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-convention-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/dwr/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-dwr-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/dojo/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-dojo-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/embeddedjsp/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-embeddedjsp-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/gxp/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-gxp-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/jasperreports/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-jasperreports-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/jfreechart/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-jfreechart-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/jsf/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-jsf-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/json/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-json-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/junit/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-junit-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/osgi/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-osgi-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/oval/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-oval-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/pell-multipart/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-pell-multipart-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/plexus/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-plexus-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/portlet/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-portlet-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/rest/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-rest-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/sitegraph/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-sitegraph-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/sitemesh/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-sitemesh-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/spring/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-spring-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/struts1/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-struts1-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/testng/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-testng-plugin/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../plugins/tiles/target/apidocs</directory>
<outputDirectory>docs/struts2-plugins/struts2-tiles-plugin/apidocs</outputDirectory>
</fileSet>
</fileSets>
</assembly>
+1 -1
View File
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-admin-bundle</artifactId>
@@ -12,16 +12,16 @@
<name>Struts 2 OSGi Admin Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/bundles/admin</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles/admin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles/admin</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/bundles/admin</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>
+1 -1
View File
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
+8 -10
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-demo-bundle</artifactId>
@@ -12,9 +12,9 @@
<name>Struts 2 OSGi Demo Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/bundles/demo</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles/demo</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles/demo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/bundles/demo</url>
</scm>
<dependencies>
@@ -22,13 +22,12 @@
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
@@ -40,25 +39,24 @@
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>
+5 -6
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
@@ -34,9 +34,9 @@
<name>Struts OSGi Bundles</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/bundles</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles</developerConnection>
<url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/bundles</url>
</scm>
<modules>
@@ -49,7 +49,7 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${pom.version}</version>
<version>${project.version}</version>
</dependency>
<!-- Test dependencies -->
@@ -57,7 +57,6 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
<version>3.8.2</version>
</dependency>
+17 -95
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
@@ -34,14 +34,13 @@
<name>Struts 2 Core</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_0/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_0/core</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_2/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_2_2/core</url>
</scm>
<properties>
<tlib.version>2.2</tlib.version>
<ognl.version>3.0</ognl.version>
</properties>
<build>
@@ -52,13 +51,13 @@
<version>1.0.15</version>
<configuration>
<A>uri=/struts-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=s,displayName="Struts Tags",
outFile=${basedir}/target/classes/META-INF/struts-tags.tld,
description="To make it easier to access dynamic data;
the Apache Struts framework includes a library of custom tags.
The tags interact with the framework's validation and internationalization features;
to ensure that input is correct and output is localized.
The Struts Tags can be used with JSP FreeMarker or Velocity.",
outTemplatesDir=${basedir}/src/site/resources/tags
outFile=${basedir}/target/classes/META-INF/struts-tags.tld,
description="To make it easier to access dynamic data;
the Apache Struts framework includes a library of custom tags.
The tags interact with the framework's validation and internationalization features;
to ensure that input is correct and output is localized.
The Struts Tags can be used with JSP FreeMarker or Velocity.",
outTemplatesDir=${basedir}/src/site/resources/tags
</A>
<resourceTargetPath>target</resourceTargetPath>
<fork>false</fork>
@@ -77,7 +76,7 @@
<goals>
<goal>execute</goal>
</goals>
</execution>
</execution>
</executions>
</plugin>
</plugins>
@@ -85,31 +84,6 @@
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
<configuration>
<sourcepath>${basedir}/src/main/java;${basedir}/../xwork-core/src/main/java</sourcepath>
<encoding>UTF-8</encoding>
<groups>
<group>
<title>Struts Packages</title>
<packages>org.apache.struts2*</packages>
</group>
<group>
<title>XWork Packages</title>
<packages>com.opensymphony.xwork2*</packages>
</group>
</groups>
<show>private</show>
<links>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
<link>http://java.sun.com/javaee/5/docs/api/</link>
<link>http://jakarta.apache.org/commons/logging/apidocs/</link>
<link>http://logging.apache.org/log4j/docs/api/</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rat-maven-plugin</artifactId>
@@ -210,163 +184,113 @@
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>${version}</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.struts</groupId>-->
<!--<artifactId>struts2-api</artifactId>-->
<!--<version>${pom.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.16</version>
</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>
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>${ognl.version}</version>
</dependency>
<!-- Velocity -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.6.3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
</exclusion>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- File upload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<!-- Mocks for unit testing (by Spring) -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${struts2.springPlatformVersion}</version>
<scope>test</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
<scope>compile</scope>
<optional>true</optional>
<version>3.8.2</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<!--dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>1.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
</exclusion>
</exclusions>
</dependency-->
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects-core</artifactId>
<version>0.09</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects-jdk1.3</artifactId>
<version>0.09</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects-alt-jdk1.3</artifactId>
<version>0.09</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects-alt-jdk1.3-j2ee1.3</artifactId>
<version>0.09</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects-jdk1.3-j2ee1.3</artifactId>
<version>0.09</version>
<scope>test</scope>
</dependency>
<dependency>
<dependency>
<groupId>jmock</groupId>
<artifactId>jmock</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
<scope>test</scope>
</dependency>
@@ -384,16 +308,14 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.1</version>
<scope>compile</scope>
<scope>compile</scope>
<optional>true</optional>
<classifier>jdk15</classifier>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${struts2.springPlatformVersion}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
@@ -82,9 +82,13 @@ public final class StrutsConstants {
/** The org.apache.struts2.views.freemarker.FreemarkerManager implementation class */
public static final String STRUTS_FREEMARKER_MANAGER_CLASSNAME = "struts.freemarker.manager.classname";
/** Cache Freemarker templates */
@Deprecated
/** Cache Freemarker templates, this cache is managed by struts2,instead of native freemarker cache,set STRUTS_FREEMARKER_MRU_MAX_STRONG_SIZE >0&&STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY>0*/
public static final String STRUTS_FREEMARKER_TEMPLATES_CACHE = "struts.freemarker.templatesCache";
/** Update freemarker templates cache in seconds*/
public static final String STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY = "struts.freemarker.templatesCache.updateDelay";
/** Cache model instances at BeanWrapper level */
public static final String STRUTS_FREEMARKER_BEANWRAPPER_CACHE = "struts.freemarker.beanwrapperCache";
@@ -21,15 +21,13 @@
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;
@@ -21,17 +21,15 @@
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.util.ValueStack;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;
/**
* <!-- START SNIPPET: javadoc -->
@@ -28,7 +28,7 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang.xwork.StringUtils;
import org.apache.commons.lang.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -21,13 +21,12 @@
package org.apache.struts2.components;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* <!-- START SNIPPET: javadoc -->
@@ -61,7 +60,7 @@ public class DoubleSelect extends DoubleListUIBean {
public void evaluateExtraParams() {
super.evaluateExtraParams();
StringBuilder onchangeParam = new StringBuilder();
onchangeParam.append(getParameters().get("id")).append("Redirect(this.options.selectedIndex)");
onchangeParam.append(getParameters().get("id")).append("Redirect(this.selectedIndex)");
if(StringUtils.isNotEmpty(this.onchange)) {
onchangeParam.append(";").append(this.onchange);
}
@@ -36,7 +36,7 @@ import com.opensymphony.xwork2.validator.Validator;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.commons.lang.xwork.StringUtils;
import org.apache.commons.lang.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -40,7 +40,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;-- example one --&gt;
* &lt;s:hidden name="foo" /&gt;
* &lt;-- example two --&gt;
* &lt;s:hidden name="foo" value="bar" /&gt;
* &lt;s:hidden name="foo" value="%{bar}" /&gt;
*
* Example One Resulting HTML (if foo evaluates to bar):
* &lt;input type="hidden" name="foo" value="bar" /&gt;
@@ -21,18 +21,15 @@
package org.apache.struts2.components;
import java.io.IOException;
import java.io.Writer;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.StrutsConstants;
import org.apache.commons.lang.xwork.StringEscapeUtils;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.inject.Inject;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.IOException;
import java.io.Writer;
/**
* <!-- START SNIPPET: javadoc -->
@@ -31,7 +31,7 @@ import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.views.util.UrlHelper;
import org.apache.commons.lang.xwork.StringUtils;
import org.apache.commons.lang.StringUtils;
import java.io.IOException;
import java.io.Writer;
@@ -21,21 +21,20 @@
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.util.TextProviderHelper;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.util.TextProviderHelper;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* <!-- START SNIPPET: javadoc -->
* Render a I18n text message.
@@ -21,6 +21,10 @@
package org.apache.struts2.components.template;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@@ -30,10 +34,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* Base class for template engines.
*/
@@ -41,64 +41,105 @@ public abstract class BaseTemplateEngine implements TemplateEngine {
private static final Logger LOG = LoggerFactory.getLogger(BaseTemplateEngine.class);
/** The default theme properties file name. Default is 'theme.properties' */
/**
* The default theme properties file name. Default is 'theme.properties'
*/
public static final String DEFAULT_THEME_PROPERTIES_FILE_NAME = "theme.properties";
final Map<String, Properties> themeProps = new HashMap<String, Properties>();
public Map getThemeProps(Template template) {
synchronized (themeProps) {
Properties props = (Properties) themeProps.get(template.getTheme());
Properties props = themeProps.get(template.getTheme());
if (props == null) {
String propName = template.getDir() + "/" + template.getTheme() + "/"+getThemePropertiesFileName();
// WW-1292
// let's try getting it from the filesystem
File propFile = new File(propName);
InputStream is = null;
try {
if (propFile.exists()) {
is = new FileInputStream(propFile);
}
}
catch(FileNotFoundException e) {
LOG.warn("Unable to find file in filesystem ["+propFile.getAbsolutePath()+"]");
}
if (is == null) {
// if its not in filesystem. let's try the classpath
is = ClassLoaderUtil.getResourceAsStream(propName, getClass());
}
props = new Properties();
if (is != null) {
try {
props.load(is);
} catch (IOException e) {
LOG.error("Could not load " + propName, e);
} finally {
try {
is.close();
} catch(IOException io) {
LOG.warn("Unable to close input stream", io);
}
}
}
props = readNewProperties(template);
themeProps.put(template.getTheme(), props);
}
return props;
}
}
private Properties readNewProperties(Template template) {
String propName = buildPropertyFilename(template);
return loadProperties(propName);
}
private Properties loadProperties(String propName) {
InputStream is = readProperty(propName);
Properties props = new Properties();
if (is != null) {
tryToLoadPropertiesFromStream(props, propName, is);
}
return props;
}
private InputStream readProperty(String propName) {
InputStream is = tryReadingPropertyFileFromFileSystem(propName);
if (is == null) {
is = readPropertyFromClasspath(propName);
}
return is;
}
/**
* if its not in filesystem. let's try the classpath
*/
private InputStream readPropertyFromClasspath(String propName) {
return ClassLoaderUtil.getResourceAsStream(propName, getClass());
}
private void tryToLoadPropertiesFromStream(Properties props, String propName, InputStream is) {
try {
props.load(is);
} catch (IOException e) {
LOG.error("Could not load " + propName, e);
} finally {
tryCloseStream(is);
}
}
private void tryCloseStream(InputStream is) {
try {
is.close();
} catch (IOException io) {
LOG.warn("Unable to close input stream", io);
}
}
private String buildPropertyFilename(Template template) {
return new StringBuilder().append(template.getDir())
.append("/")
.append(template.getTheme())
.append("/")
.append(getThemePropertiesFileName()).toString();
}
/**
* WW-1292 let's try getting it from the filesystem
*/
private InputStream tryReadingPropertyFileFromFileSystem(String propName) {
File propFile = new File(propName);
try {
return createFileInputStream(propFile);
} catch (FileNotFoundException e) {
LOG.warn("Unable to find file in filesystem [" + propFile.getAbsolutePath() + "]");
return null;
}
}
private InputStream createFileInputStream(File propFile) throws FileNotFoundException {
InputStream is = null;
if (propFile.exists()) {
is = new FileInputStream(propFile);
}
return is;
}
protected String getFinalTemplateName(Template template) {
String t = template.toString();
if (t.indexOf(".") <= 0) {
return t + "." + getSuffix();
}
return t;
}
@@ -107,4 +148,5 @@ public abstract class BaseTemplateEngine implements TemplateEngine {
}
protected abstract String getSuffix();
}
@@ -23,16 +23,14 @@ package org.apache.struts2.components.template;
import java.io.IOException;
import java.io.Writer;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.Map;
import java.util.List;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import com.opensymphony.xwork2.ActionContext;
@@ -54,10 +52,6 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
static Class bodyContent = null;
protected FreemarkerManager freemarkerManager;
protected final Map<String, freemarker.template.Template> templates = new ConcurrentHashMap<String, freemarker.template.Template>();
protected final Set<String> missingTemplates = new CopyOnWriteArraySet<String>();
protected boolean freemarkerCaching = false;
static {
try {
bodyContent = ClassLoaderUtil.loadClass("javax.servlet.jsp.tagext.BodyContent",
@@ -97,24 +91,6 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
Exception exception = null;
for (Template t : templates) {
templateName = getFinalTemplateName(t);
if (freemarkerCaching) {
if (!isTemplateMissing(templateName)) {
try {
template = findInCache(templateName); // look in cache first
if (template == null) {
// try to load, and if it works, stop at the first one
template = config.getTemplate(templateName);
addToCache(templateName, template);
}
break;
} catch (IOException e) {
addToMissingTemplateCache(templateName);
if (exception == null) {
exception = e;
}
}
}
} else {
try {
// try to load, and if it works, stop at the first one
template = config.getTemplate(templateName);
@@ -129,7 +105,6 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
exception = e;
}
}
}
}
if (template == null) {
@@ -189,39 +164,5 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
return "ftl";
}
protected void addToMissingTemplateCache(String templateName) {
missingTemplates.add(templateName);
}
protected boolean isTemplateMissing(String templateName) {
return missingTemplates.contains(templateName);
}
protected void addToCache(String templateName,
freemarker.template.Template template) {
templates.put(templateName, template);
}
protected freemarker.template.Template findInCache(String templateName) {
return templates.get(templateName);
}
/**
* Enables or disables Struts caching of Freemarker templates. By default disabled.
* Set struts.freemarker.templatesCache=true to enable cache
* @param cacheTemplates "true" if the template engine should cache freemarker template
* internally
*/
@Inject(StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE)
public void setCacheTemplates(String cacheTemplates) {
freemarkerCaching = "true".equals(cacheTemplates);
}
/**
* Clear the templates and missing templates cache
*/
public void clearTemplatesCache() {
templates.clear();
missingTemplates.clear();
}
}
@@ -26,7 +26,6 @@ import java.util.StringTokenizer;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.components.UrlRenderer;
import org.apache.struts2.dispatcher.DefaultStaticContentLoader;
import org.apache.struts2.dispatcher.StaticContentLoader;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
@@ -222,6 +221,7 @@ public class BeanSelectionProvider implements ConfigurationProvider {
props.setProperty(StrutsConstants.STRUTS_I18N_RELOAD, "true");
props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true");
props.setProperty(StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE, "false");
props.setProperty(StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY, "0");
// Convert struts properties into ones that xwork expects
props.setProperty("devMode", "true");
} else {
@@ -80,6 +80,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.Enumeration;
/**
* A utility class the actual dispatcher delegates most of its tasks to. Each instance
@@ -320,9 +321,9 @@ public class Dispatcher {
for (String file : files) {
if (file.endsWith(".xml")) {
if ("xwork.xml".equals(file)) {
configurationManager.addConfigurationProvider(new XmlConfigurationProvider(file, false));
configurationManager.addConfigurationProvider(createXmlConfigurationProvider(file, false));
} else {
configurationManager.addConfigurationProvider(new StrutsXmlConfigurationProvider(file, false, servletContext));
configurationManager.addConfigurationProvider(createStrutsXmlConfigurationProvider(file, false, servletContext));
}
} else {
throw new IllegalArgumentException("Invalid configuration file name");
@@ -330,6 +331,14 @@ public class Dispatcher {
}
}
protected XmlConfigurationProvider createXmlConfigurationProvider(String filename, boolean errorIfMissing) {
return new XmlConfigurationProvider(filename, errorIfMissing);
}
protected XmlConfigurationProvider createStrutsXmlConfigurationProvider(String filename, boolean errorIfMissing, ServletContext ctx) {
return new StrutsXmlConfigurationProvider(filename, errorIfMissing, ctx);
}
private void init_CustomConfigurationProviders() {
String configProvs = initParams.get("configProviders");
if (configProvs != null) {
@@ -401,7 +410,7 @@ public class Dispatcher {
public void init() {
if (configurationManager == null) {
configurationManager = new ConfigurationManager(BeanSelectionProvider.DEFAULT_BEAN_NAME);
configurationManager = createConfigurationManager(BeanSelectionProvider.DEFAULT_BEAN_NAME);
}
try {
@@ -429,6 +438,10 @@ public class Dispatcher {
}
}
protected ConfigurationManager createConfigurationManager(String name) {
return new ConfigurationManager(name);
}
/**
* Load Action class for mapping and invoke the appropriate Action method, or go directly to the Result.
* <p/>
@@ -714,6 +727,40 @@ public class Dispatcher {
return request;
}
/**
* Removes all the files created by MultiPartRequestWrapper.
*
* @param request the HttpServletRequest object.
* @see org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper
* @throws java.io.IOException on any error.
*/
public void cleanUpRequest(HttpServletRequest request) throws IOException {
if (!(request instanceof MultiPartRequestWrapper)) {
return;
}
MultiPartRequestWrapper multiWrapper = (MultiPartRequestWrapper) request;
Enumeration fileParameterNames = multiWrapper.getFileParameterNames();
while (fileParameterNames != null && fileParameterNames.hasMoreElements()) {
String inputValue = (String) fileParameterNames.nextElement();
File[] files = multiWrapper.getFiles(inputValue);
for (File currentFile : files) {
if (LOG.isInfoEnabled()) {
String msg = LocalizedTextUtil.findText(this.getClass(), "struts.messages.removing.file", Locale.ENGLISH, "no.message.found", new Object[]{inputValue, currentFile});
LOG.info(msg);
}
if ((currentFile != null) && currentFile.isFile()) {
if (!currentFile.delete()) {
LOG.warn("Resource Leaking: Could not remove uploaded file '" + currentFile.getCanonicalPath() + "'.");
}
}
}
}
}
/**
* Send an HTTP error response code.
*
@@ -725,7 +772,8 @@ public class Dispatcher {
*/
public void sendError(HttpServletRequest request, HttpServletResponse response,
ServletContext ctx, int code, Exception e) {
if (devMode) {
Boolean devModeOverride = FilterDispatcher.getDevModeOverride();
if (devModeOverride != null ? devModeOverride.booleanValue() : devMode) {
response.setContentType("text/html");
try {
@@ -170,10 +170,15 @@ public class FilterDispatcher implements StrutsStatics, Filter {
protected Dispatcher dispatcher;
/**
* Loads stattic resources, set by injection
* Loads static resources, set by injection.
*/
protected StaticContentLoader staticResourceLoader;
/**
* Maintains per-request override of devMode configuration.
*/
private static ThreadLocal<Boolean> devModeOverride = new InheritableThreadLocal<Boolean>();
/**
* Initializes the filter by creating a default dispatcher
* and setting the default packages for static resources.
@@ -237,6 +242,27 @@ public class FilterDispatcher implements StrutsStatics, Filter {
}
}
/**
* Set an override of the static devMode value. Do not set this via a
* request parameter or any other unprotected method. Using a signed
* cookie is one safe way to turn it on per request.
*
* @param devMode the override value
*/
public static void overrideDevMode(
boolean devMode)
{
devModeOverride.set(Boolean.valueOf(devMode));
}
/**
* @return Boolean override value, or null if no override
*/
public static Boolean getDevModeOverride()
{
return devModeOverride.get();
}
/**
* Create a default {@link Dispatcher} that subclasses can override
* with a custom Dispatcher, if needed.
@@ -251,7 +277,20 @@ public class FilterDispatcher implements StrutsStatics, Filter {
String value = filterConfig.getInitParameter(name);
params.put(name, value);
}
return new Dispatcher(filterConfig.getServletContext(), params);
return createDispatcher(filterConfig.getServletContext(), params);
}
/**
* Create a default {@link Dispatcher} that subclasses can override
* with a custom Dispatcher, if needed. Called by
* createDispatcher(FilterConfig).
*
* @param ctx ServletContext
* @param params parameters from FilterConfig
* @return Initialized Dispatcher
*/
protected Dispatcher createDispatcher(ServletContext ctx, Map<String, String> params) {
return new Dispatcher(ctx, params);
}
/**
@@ -395,11 +434,13 @@ public class FilterDispatcher implements StrutsStatics, Filter {
dispatcher.serviceAction(request, response, servletContext, mapping);
} finally {
dispatcher.cleanUpRequest(request);
try {
ActionContextCleanUp.cleanUp(req);
} finally {
UtilTimerStack.pop(timerKey);
}
devModeOverride.remove();
}
}
}
@@ -21,21 +21,19 @@
package org.apache.struts2.dispatcher;
import java.util.Map;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.ObjectUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.views.util.UrlHelper;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.views.util.UrlHelper;
import org.apache.commons.lang.xwork.ObjectUtils;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import java.util.Map;
/**
@@ -198,9 +198,6 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec
Map.Entry e = (Map.Entry) i.next();
if (!getProhibitedResultParams().contains(e.getKey())) {
requestParameters.put(e.getKey().toString(),
e.getValue() == null ? "" :
conditionalParse(e.getValue().toString(), invocation));
String potentialValue = e.getValue() == null ? "" : conditionalParse(e.getValue().toString(), invocation);
if (!supressEmptyParameters || ((potentialValue != null) && (potentialValue.length() > 0))) {
requestParameters.put(e.getKey().toString(), potentialValue);
@@ -21,16 +21,12 @@
package org.apache.struts2.dispatcher;
import java.io.OutputStreamWriter;
import java.io.Writer;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.PageContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.JspSupportServlet;
@@ -39,12 +35,14 @@ import org.apache.velocity.Template;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.PageContext;
import java.io.OutputStreamWriter;
import java.io.Writer;
/**
@@ -91,6 +89,7 @@ public class VelocityResult extends StrutsResultSupport {
private String defaultEncoding;
private VelocityManager velocityManager;
private JspFactory jspFactory = JspFactory.getDefaultFactory();
public VelocityResult() {
super();
@@ -124,7 +123,6 @@ public class VelocityResult extends StrutsResultSupport {
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
JspFactory jspFactory = null;
ServletContext servletContext = ServletActionContext.getServletContext();
Servlet servlet = JspSupportServlet.jspSupportServlet;
@@ -134,7 +132,6 @@ public class VelocityResult extends StrutsResultSupport {
PageContext pageContext = (PageContext) ActionContext.getContext().get(ServletActionContext.PAGE_CONTEXT);
if (pageContext == null && servlet != null) {
jspFactory = JspFactory.getDefaultFactory();
pageContext = jspFactory.getPageContext(servlet, request, response, null, true, 8192, true);
ActionContext.getContext().put(ServletActionContext.PAGE_CONTEXT, pageContext);
usedJspFactory = true;
@@ -192,7 +192,17 @@ public class JakartaMultiPartRequest implements MultiPartRequest {
List<File> fileList = new ArrayList<File>(items.size());
for (FileItem fileItem : items) {
fileList.add(((DiskFileItem) fileItem).getStoreLocation());
File storeLocation = ((DiskFileItem) fileItem).getStoreLocation();
if(fileItem.isInMemory() && storeLocation!=null && !storeLocation.exists()) {
try {
storeLocation.createNewFile();
} catch (IOException e) {
if(LOG.isErrorEnabled()){
LOG.error("Cannot write uploaded empty file to disk: " + storeLocation.getAbsolutePath(),e);
}
}
}
fileList.add(storeLocation);
}
return fileList.toArray(new File[fileList.size()]);
@@ -311,28 +311,7 @@ public class FileUploadInterceptor extends AbstractInterceptor {
}
// invoke action
String result = invocation.invoke();
// cleanup
fileParameterNames = multiWrapper.getFileParameterNames();
while (fileParameterNames != null && fileParameterNames.hasMoreElements()) {
String inputValue = (String) fileParameterNames.nextElement();
File[] files = multiWrapper.getFiles(inputValue);
for (File currentFile : files) {
if (LOG.isInfoEnabled()) {
LOG.info(getTextMessage(action, "struts.messages.removing.file", new Object[]{inputValue, currentFile}, ac.getLocale()));
}
if ((currentFile != null) && currentFile.isFile()) {
if (currentFile.delete() == false) {
LOG.warn("Resource Leaking: Could not remove uploaded file '" + currentFile.getCanonicalPath() + "'.");
}
}
}
}
return result;
return invocation.invoke();
}
/**
@@ -93,8 +93,7 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
*
* <li>end - means that session scoped properties are removed from session after action is run</li>
*
* <li>any other value or no value means that it's in-the-middle action that is set with session properties before it's
* executed, and it's properties are put back to session after execution</li>
* <li>any other value throws IllegalArgumentException</li>
*
* </ul>
*
@@ -21,16 +21,12 @@
package org.apache.struts2.interceptor;
import java.util.Map;
import org.apache.struts2.util.TokenHelper;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.util.TokenHelper;
import javax.servlet.http.HttpSession;
@@ -140,9 +136,8 @@ public class TokenInterceptor extends MethodFilterInterceptor {
if (!TokenHelper.validToken()) {
return handleInvalidToken(invocation);
}
return handleValidToken(invocation);
}
return handleValidToken(invocation);
}
/**
@@ -40,6 +40,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.FilterDispatcher;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.apache.struts2.views.freemarker.FreemarkerResult;
@@ -157,6 +158,8 @@ public class DebuggingInterceptor implements Interceptor {
public String intercept(ActionInvocation inv) throws Exception {
boolean actionOnly = false;
boolean cont = true;
Boolean devModeOverride = FilterDispatcher.getDevModeOverride();
boolean devMode = devModeOverride != null ? devModeOverride.booleanValue() : this.devMode;
if (devMode) {
final ActionContext ctx = ActionContext.getContext();
String type = getParameter(DEBUG_PARAM);
@@ -28,7 +28,7 @@ import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.xwork.StringEscapeUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.struts2.ServletActionContext;
import javax.servlet.http.HttpServletRequest;
@@ -20,15 +20,14 @@
*/
package org.apache.struts2.util;
import com.opensymphony.xwork2.util.PatternMatcher;
import org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.util.PatternMatcher;
/**
* Allows regular expressions to be used in action names. The regular expressions
* can be in the form {FIELD_NAME} or {FIELD_NAME:REGULAR_EXPRESSION}. For example:
@@ -50,14 +50,12 @@ import freemarker.cache.FileTemplateLoader;
import freemarker.cache.MultiTemplateLoader;
import freemarker.cache.TemplateLoader;
import freemarker.cache.WebappTemplateLoader;
import freemarker.ext.beans.BeansWrapper;
import freemarker.ext.jsp.TaglibFactory;
import freemarker.ext.servlet.HttpRequestHashModel;
import freemarker.ext.servlet.HttpRequestParametersHashModel;
import freemarker.ext.servlet.HttpSessionHashModel;
import freemarker.ext.servlet.ServletContextHashModel;
import freemarker.template.*;
import freemarker.core.Configurable;
import freemarker.template.utility.StringUtil;
@@ -117,7 +115,6 @@ public class FreemarkerManager {
// Note these names start with dot, so they're essentially invisible from a freemarker script.
private static final String ATTR_REQUEST_MODEL = ".freemarker.Request";
private static final String ATTR_REQUEST_PARAMETERS_MODEL = ".freemarker.RequestParameters";
private static final String ATTR_SESSION_MODEL = ".freemarker.Session";
private static final String ATTR_APPLICATION_MODEL = ".freemarker.Application";
private static final String ATTR_JSP_TAGLIBS_MODEL = ".freemarker.JspTaglibs";
@@ -169,6 +166,7 @@ public class FreemarkerManager {
protected boolean altMapWrapper;
protected boolean cacheBeanWrapper;
protected int mruMaxStrongSize;
protected String templateUpdateDelay;
protected Map<String,TagLibrary> tagLibraries;
@Inject(StrutsConstants.STRUTS_I18N_ENCODING)
@@ -191,6 +189,11 @@ public class FreemarkerManager {
mruMaxStrongSize = Integer.parseInt(size);
}
@Inject(value = StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY, required = false)
public void setTemplateUpdateDelay(String delay) {
templateUpdateDelay = delay;
}
@Inject
public void setContainer(Container container) {
Map<String,TagLibrary> map = new HashMap<String,TagLibrary>();
@@ -229,7 +232,7 @@ public class FreemarkerManager {
return contentType;
}
public synchronized freemarker.template.Configuration getConfiguration(ServletContext servletContext) {
public synchronized Configuration getConfiguration(ServletContext servletContext) {
if (config == null) {
try {
init(servletContext);
@@ -287,15 +290,17 @@ public class FreemarkerManager {
*
* @param servletContext
*/
protected freemarker.template.Configuration createConfiguration(ServletContext servletContext) throws TemplateException {
freemarker.template.Configuration configuration = new freemarker.template.Configuration();
protected Configuration createConfiguration(ServletContext servletContext) throws TemplateException {
Configuration configuration = new Configuration();
configuration.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);
if (mruMaxStrongSize > 0) {
configuration.setSetting(freemarker.template.Configuration.CACHE_STORAGE_KEY, "strong:" + mruMaxStrongSize);
configuration.setSetting(Configuration.CACHE_STORAGE_KEY, "strong:" + mruMaxStrongSize);
}
if (templateUpdateDelay != null) {
configuration.setSetting(Configuration.TEMPLATE_UPDATE_DELAY_KEY, templateUpdateDelay);
}
if (encoding != null) {
configuration.setDefaultEncoding(encoding);
}
@@ -333,17 +338,8 @@ public class FreemarkerManager {
// Create hash model wrapper for session
HttpSession session = request.getSession(false);
HttpSessionHashModel sessionModel;
if (session != null) {
sessionModel = (HttpSessionHashModel) session.getAttribute(ATTR_SESSION_MODEL);
if (sessionModel == null) {
sessionModel = new HttpSessionHashModel(session, wrapper);
session.setAttribute(ATTR_SESSION_MODEL, sessionModel);
}
model.put(KEY_SESSION, new HttpSessionHashModel(session, wrapper));
} else {
// no session means no attributes ???
// model.put(KEY_SESSION_MODEL, new SimpleHash());
}
// Create hash model wrapper for the request attributes
@@ -525,19 +521,4 @@ public class FreemarkerManager {
}
}
/**
* If the parameter "nocache" was set to true, generate a set of headers
* that will advise the HTTP client not to cache the returned page.
*/
private void setBrowserCachingPolicy(HttpServletResponse res) {
if (nocache) {
// HTTP/1.1 + IE extensions
res.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, "
+ "post-check=0, pre-check=0");
// HTTP/1.0
res.setHeader("Pragma", "no-cache");
// Last resort for those that ignore all of the above
res.setHeader("Expires", EXPIRATION_DATE);
}
}
}
@@ -21,25 +21,11 @@
package org.apache.struts2.views.freemarker;
import java.io.CharArrayWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Locale;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.StrutsResultSupport;
import org.apache.struts2.views.util.ResourceUtil;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import freemarker.template.Configuration;
import freemarker.template.ObjectWrapper;
import freemarker.template.Template;
@@ -47,6 +33,19 @@ import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
import org.apache.commons.lang.ObjectUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.dispatcher.StrutsResultSupport;
import org.apache.struts2.views.util.ResourceUtil;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.CharArrayWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Locale;
/**
@@ -330,11 +329,19 @@ public class FreemarkerResult extends StrutsResultSupport {
response.setContentType(contentType);
}
} else if(isInsideActionTag()){
//trigger com.opensymphony.module.sitemesh.filter.PageResponseWrapper.deactivateSiteMesh()
response.setContentType(response.getContentType());
}
return true;
}
private boolean isInsideActionTag() {
Object attribute = ServletActionContext.getRequest().getAttribute(StrutsStatics.STRUTS_ACTION_TAG_INVOCATION);
return (Boolean) ObjectUtils.defaultIfNull(attribute, Boolean.FALSE);
}
/**
* @return true write to the stream only when template processing completed successfully (false by default)
*/
@@ -21,6 +21,18 @@
package org.apache.struts2.views.util;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
@@ -31,20 +43,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* UrlHelper
@@ -21,23 +21,13 @@
package org.apache.struts2.views.velocity;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
@@ -52,14 +42,22 @@ import org.apache.velocity.context.Context;
import org.apache.velocity.tools.view.ToolboxManager;
import org.apache.velocity.tools.view.context.ChainedContext;
import org.apache.velocity.tools.view.servlet.ServletToolboxManager;
import org.apache.commons.lang.xwork.StringUtils;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
/**
+1 -1
View File
@@ -1,5 +1,5 @@
Apache Struts
Copyright 2000-2007 The Apache Software Foundation
Copyright 2000-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -24,7 +24,7 @@ var StrutsUtils = {};
// gets an object with validation errors from string returned by
// the ajaxValidation interceptor
StrutsUtils.getValidationErrors = function(data) {
if(data.indexOf("/* {") == 0) {
if(data.indexOf("/* {") === 0) {
return eval("( " + data.substring(2, data.length - 2) + " )");
} else {
return null;
@@ -32,33 +32,62 @@ StrutsUtils.getValidationErrors = function(data) {
};
StrutsUtils.clearValidationErrors = function(form) {
var firstNode = StrutsUtils.firstElement(form);
var xhtml = firstNode.tagName.toLowerCase() == "table";
if(xhtml) {
clearErrorMessagesXHTML(form);
clearErrorLabelsXHTML(form);
} else {
clearErrorMessagesCSS(form);
clearErrorLabelsCSS(form);
}
};
var firstNode = StrutsUtils.firstElement(form);
var xhtml = firstNode.tagName.toLowerCase() === "table";
if(xhtml) {
clearErrorMessagesXHTML(form);
clearErrorLabelsXHTML(form);
} else {
clearErrorMessagesCSS(form);
clearErrorLabelsCSS(form);
}
//clear previous global error messages
if(StrutsUtils.errorLists[form] && StrutsUtils.errorLists[form] !== null) {
form.parentNode.removeChild(StrutsUtils.errorLists[form]);
StrutsUtils.errorLists[form] = null;
}
};
StrutsUtils.errorLists = [];
// shows validation errors using functions from xhtml/validation.js
// or css_xhtml/validation.js
StrutsUtils.showValidationErrors = function(form, errors) {
StrutsUtils.clearValidationErrors(form, errors);
StrutsUtils.clearValidationErrors(form, errors);
var firstNode = StrutsUtils.firstElement(form);
var xhtml = firstNode.tagName.toLowerCase() == "table";
if (errors.errors) {
var l, errorList = document.createElement("ul");
errorList.setAttribute("class", "errorMessage");
errorList.setAttribute("className", "errorMessage"); // ie hack cause ie does not support setAttribute
for ( l = 0; l < errors.errors.length; l++) {
var item = document.createElement("li");
var itemText = document.createTextNode(errors.errors[l]);
item.appendChild(itemText);
errorList.appendChild(item);
}
form.parentNode.insertBefore(errorList, form);
StrutsUtils.errorLists[form] = errorList;
}
var i, fieldName, firstNode = StrutsUtils.firstElement(form);
var xhtml = firstNode.tagName.toLowerCase() === "table";
if(errors.fieldErrors) {
for(var fieldName in errors.fieldErrors) {
for(var i = 0; i < errors.fieldErrors[fieldName].length; i++) {
if(xhtml) {
addErrorXHTML(form.elements[fieldName], errors.fieldErrors[fieldName][i]);
} else {
addErrorCSS(form.elements[fieldName], errors.fieldErrors[fieldName][i]);
}
for(fieldName in errors.fieldErrors) {
if(errors.fieldErrors.hasOwnProperty(fieldName)) {
for(i = 0; i < errors.fieldErrors[fieldName].length; i++) {
if(xhtml) {
addErrorXHTML(form.elements[fieldName], errors.fieldErrors[fieldName][i]);
} else {
addErrorCSS(form.elements[fieldName], errors.fieldErrors[fieldName][i]);
}
}
}
}
}
@@ -66,10 +95,10 @@ StrutsUtils.showValidationErrors = function(form, errors) {
StrutsUtils.firstElement = function(parentNode, tagName) {
var node = parentNode.firstChild;
while(node && node.nodeType != 1){
while(node && node.nodeType !== 1){
node = node.nextSibling;
}
if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) {
if(tagName && node && node.tagName && node.tagName.toLowerCase() !== tagName.toLowerCase()) {
node = StrutsUtils.nextElement(node, tagName);
}
return node;
@@ -79,9 +108,9 @@ StrutsUtils.nextElement = function(node, tagName) {
if(!node) { return null; }
do {
node = node.nextSibling;
} while(node && node.nodeType != 1);
} while(node && node.nodeType !== 1);
if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) {
if(node && tagName && tagName.toLowerCase() !== node.tagName.toLowerCase()) {
return StrutsUtils.nextElement(node, tagName);
}
return node;
@@ -92,9 +121,9 @@ StrutsUtils.previousElement = function(node, tagName) {
if(tagName) { tagName = tagName.toLowerCase(); }
do {
node = node.previousSibling;
} while(node && node.nodeType != 1);
} while(node && node.nodeType !== 1);
if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) {
if(node && tagName && tagName.toLowerCase() !== node.tagName.toLowerCase()) {
return StrutsUtils.previousElement(node, tagName);
}
return node;
@@ -102,13 +131,13 @@ StrutsUtils.previousElement = function(node, tagName) {
StrutsUtils.addOnLoad = function(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
if (typeof window.onload !== 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
};
}
};
@@ -129,7 +129,6 @@
<interceptor name="clearSession" class="org.apache.struts2.interceptor.ClearSessionInterceptor" />
<interceptor name="createSession" class="org.apache.struts2.interceptor.CreateSessionInterceptor" />
<interceptor name="debugging" class="org.apache.struts2.interceptor.debugging.DebuggingInterceptor" />
<interceptor name="externalRef" class="com.opensymphony.xwork2.interceptor.ExternalReferencesInterceptor"/>
<interceptor name="execAndWait" class="org.apache.struts2.interceptor.ExecuteAndWaitInterceptor"/>
<interceptor name="exception" class="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/>
<interceptor name="fileUpload" class="org.apache.struts2.interceptor.FileUploadInterceptor"/>
@@ -143,7 +142,6 @@
<interceptor name="staticParams" class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/>
<interceptor name="scope" class="org.apache.struts2.interceptor.ScopeInterceptor"/>
<interceptor name="servletConfig" class="org.apache.struts2.interceptor.ServletConfigInterceptor"/>
<interceptor name="sessionAutowiring" class="org.apache.struts2.spring.interceptor.SessionContextAutowiringInterceptor"/>
<interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
<interceptor name="token" class="org.apache.struts2.interceptor.TokenInterceptor"/>
<interceptor name="tokenSession" class="org.apache.struts2.interceptor.TokenSessionStoreInterceptor"/>
@@ -96,7 +96,7 @@ var $!struts.htmlEncode($parameters.name)Temp = document.$!struts.htmlEncode(${p
$!{struts.htmlEncode($parameters.name)}Redirect($redirectTo);
function $!{struts.htmlEncode($parameters.name)}Redirect(x) {
for (m = $!{struts.htmlEncode($parameters.name)}Temp.options.length - 1; m >= 0; m--)
$!{struts.htmlEncode($parameters.name)}Temp.options[m] = null;
$!{struts.htmlEncode($parameters.name)}Temp.remove(m);
for (i = 0; i < $!{parameters.name}Group[x].length; i++) {
$!{struts.htmlEncode($parameters.name)}Temp.options[i] = new Option($!{struts.htmlEncode($parameters.name)}Group[x][i].text, $!{struts.htmlEncode($parameters.name)}Group[x][i].value);
@@ -19,17 +19,16 @@
* under the License.
*/
function clearErrorMessages(form) {
clearErrorMessagesCSS(form);
}
var firstFieldErrorPosition = null;
function clearErrorMessagesCSS(form) {
firstFieldErrorPosition = null;
// clear out any rows with an "errorFor" attribute
var divs = form.getElementsByTagName("div");
var paragraphsToDelete = new Array();
var i,
divs = form.getElementsByTagName("div"),
paragraphsToDelete = [];
for(var i = 0; i < divs.length; i++) {
for(i = 0; i < divs.length; i++) {
var p = divs[i];
if (p.getAttribute("errorFor")) {
paragraphsToDelete.push(p);
@@ -37,24 +36,25 @@ function clearErrorMessagesCSS(form) {
}
// now delete the paragraphsToDelete
for (var i = 0; i < paragraphsToDelete.length; i++) {
for (i = 0; i < paragraphsToDelete.length; i++) {
var r = paragraphsToDelete[i];
var parent = r.parentNode;
parent.removeChild(r);
}
}
function clearErrorLabels(form) {
clearErrorLabelsCSS(form);
function clearErrorMessages(form) {
clearErrorMessagesCSS(form);
}
function clearErrorLabelsCSS(form) {
// set all labels back to the normal class
var labels = form.getElementsByTagName("label");
for (var i = 0; i < labels.length; i++) {
var i,
labels = form.getElementsByTagName("label");
for (i = 0; i < labels.length; i++) {
var label = labels[i];
if (label) {
if(label.getAttribute("class") == "errorLabel"){
if(label.getAttribute("class") === "errorLabel"){
label.setAttribute("class", "label");//standard way.. works for ie mozilla
label.setAttribute("className", "label"); //ie hack cause ie does not support setAttribute
}
@@ -62,60 +62,17 @@ function clearErrorLabelsCSS(form) {
}
}
function addError(e, errorText) {
addErrorCSS(e, errorText);
}
var firstFieldErrorPosition = null;
function addErrorCSS(e, errorText) {
try {
if (!e)
return; //ignore errors for fields that are not in the form
var elem = (e.type ? e : e[0]); //certain input types return node list, while we single first node. I.e. set of radio buttons.
var enclosingDiv = findWWGrpNode(elem); // find wwgrp div/span
//try to focus on first field
var fieldPos = findFieldPosition(elem);
if (fieldPos != null && (firstFieldErrorPosition == null || firstFieldErrorPosition > fieldPos)) {
firstFieldErrorPosition = fieldPos;
}
if (!enclosingDiv) {
alert("Could not validate: " + e.id);
return;
}
var label = enclosingDiv.getElementsByTagName("label")[0];
if (label) {
label.setAttribute("class", "errorLabel"); //standard way.. works for ie mozilla
label.setAttribute("className", "errorLabel"); //ie hack cause ie does not support setAttribute
}
var firstCtrNode = findWWCtrlNode(enclosingDiv); // either wwctrl_ or wwlbl_
var error = document.createTextNode(errorText);
var errorDiv = document.createElement("div");
errorDiv.setAttribute("class", "errorMessage");//standard way.. works for ie mozilla
errorDiv.setAttribute("className", "errorMessage");//ie hack cause ie does not support setAttribute
errorDiv.setAttribute("errorFor", elem.id);
errorDiv.appendChild(error);
if(!firstCtrNode && navigator.appName == 'Microsoft Internet Explorer') {
enclosingDiv.insertBefore(errorDiv);
} else {
enclosingDiv.insertBefore(errorDiv, firstCtrNode);
}
} catch (err) {
alert("An exception occurred: " + err.name + ". Error message: " + err.message);
}
function clearErrorLabels(form) {
clearErrorLabelsCSS(form);
}
function findWWGrpNode(elem) {
while (elem.parentNode) {
elem = elem.parentNode;
if (elem.className && elem.className.match(/wwgrp/))
if (elem.className && elem.className.match(/wwgrp/)) {
return elem;
}
}
return null;
}
@@ -123,14 +80,16 @@ function findWWGrpNode(elem) {
function findWWCtrlNode(enclosingDiv) {
var elems = enclosingDiv.getElementsByTagName("div");
for(i = 0; i < elems.length; ++i ) {
if (elems[i].className && elems[i].className.match(/(wwlbl|wwctrl)/))
if (elems[i].className && elems[i].className.match(/(wwlbl|wwctrl)/)) {
return elems[i];
}
}
elems = enclosingDiv.getElementsByTagName("span");
for(i = 0; i < elems.length; ++i ) {
if (elems[i].className && elems[i].className.match(/(wwlbl|wwctrl)/))
if (elems[i].className && elems[i].className.match(/(wwlbl|wwctrl)/)) {
return elems[i];
}
}
return enclosingDiv.getElementsByTagName("span")[0];
}
@@ -140,21 +99,69 @@ function findFieldPosition(elem) {
if (!elem.form) {
alert("no form for " + elem);
}
var form = elem.form;
for (i = 0; i < form.elements.length; i++) {
if (form.elements[i].name == elem.name) {
for (i = 0; i < form.elements.length; i++) {
if (form.elements[i].name === elem.name) {
return i;
}
}
return null;
}
function addErrorCSS(e, errorText) {
try {
if (!e) {
return; //ignore errors for fields that are not in the form
}
var elem = (e.type ? e : e[0]); //certain input types return node list, while we single first node. I.e. set of radio buttons.
var enclosingDiv = findWWGrpNode(elem); // find wwgrp div/span
//try to focus on first field
var fieldPos = findFieldPosition(elem);
if (fieldPos !== null && (firstFieldErrorPosition === null || firstFieldErrorPosition > fieldPos)) {
firstFieldErrorPosition = fieldPos;
}
if (!enclosingDiv) {
alert("Could not validate: " + e.id);
return;
}
var label = enclosingDiv.getElementsByTagName("label")[0];
if (label) {
label.setAttribute("class", "errorLabel"); //standard way.. works for ie mozilla
label.setAttribute("className", "errorLabel"); //ie hack cause ie does not support setAttribute
}
var firstCtrNode = findWWCtrlNode(enclosingDiv); // either wwctrl_ or wwlbl_
var error = document.createTextNode(errorText);
var errorDiv = document.createElement("div");
errorDiv.setAttribute("class", "errorMessage");//standard way.. works for ie mozilla
errorDiv.setAttribute("className", "errorMessage");//ie hack cause ie does not support setAttribute
errorDiv.setAttribute("errorFor", elem.id);
errorDiv.appendChild(error);
if(!firstCtrNode && navigator.appName === 'Microsoft Internet Explorer') {
enclosingDiv.insertBefore(errorDiv);
} else {
enclosingDiv.insertBefore(errorDiv, firstCtrNode);
}
} catch (err) {
alert("An exception occurred: " + err.name + ". Error message: " + err.message);
}
}
function addError(e, errorText) {
addErrorCSS(e, errorText);
}
//focus first element
var StrutsUtils_showValidationErrors = StrutsUtils.showValidationErrors;
StrutsUtils.showValidationErrors = function(form, errors) {
StrutsUtils_showValidationErrors(form, errors);
if (firstFieldErrorPosition != null && form.elements[firstFieldErrorPosition].focus) {
if (firstFieldErrorPosition !== null && form.elements[firstFieldErrorPosition].focus) {
form.elements[firstFieldErrorPosition].focus();
}
}
};
@@ -126,7 +126,7 @@
function ${parameters.id}Redirect(x) {
var selected = false;
for (m = ${parameters.id}Temp.options.length - 1; m >= 0; m--) {
${parameters.id}Temp.options[m] = null;
${parameters.id}Temp.remove(m);
}
for (i = 0; i < ${parameters.id}Group[x].length; i++) {
@@ -52,7 +52,6 @@
>
<#else>
<#if parameters.type?? && parameters.type=="image">
<@s.property value="parameters.body"/>
<input type="image"<#rt/>
<#if parameters.label??>
alt="${parameters.label?html}"<#rt/>

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