Compare commits

...

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

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


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

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

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

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

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

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@818958 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 19:08:38 +00:00
Musachy Barroso 986e389a18 WW-3263 Convention does not check for "struts.enable.SlashesInActionNames"
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@818953 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 18:52:26 +00:00
Musachy Barroso c92c752ec1 [maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817916 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 00:39:08 +00:00
Musachy Barroso e2afe049a6 [maven-release-plugin] prepare release STRUTS_2_1_8
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817914 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 00:38:36 +00:00
Musachy Barroso 3af372b06e WW-3253 rollback changes for 2.1.8 attempt
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817909 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 00:11:27 +00:00
1313 changed files with 144728 additions and 47143 deletions
+13 -9
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.9-SNAPSHOT</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/trunk/apps/blank/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/blank/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/blank/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_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.1.9-SNAPSHOT</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/trunk/apps/mailreader/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/mailreader/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/mailreader/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_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.1.9-SNAPSHOT</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/trunk/apps/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_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>
+101 -114
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.1.9-SNAPSHOT</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/trunk/apps/portlet/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/portlet/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/portlet/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_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,102 +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.5</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</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>
<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>
<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>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
<version>1.4.1</version>
@@ -186,26 +175,24 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.bekk.boss</groupId>
<artifactId>maven-jetty-pluto-embedded</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
<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>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>
<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.1.9-SNAPSHOT</version>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.1.9-SNAPSHOT</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>
+66 -69
View File
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.1.9-SNAPSHOT</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/trunk/apps/showcase/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/showcase/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/apps/showcase/</url>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_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,83 +56,83 @@
<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.5</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -158,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>
@@ -221,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/).
@@ -19,6 +19,8 @@
<constant name="struts.serve.static" value="true" />
<constant name="struts.serve.static.browserCache" value="false" />
<constant name="actionPackages" value="org.apache.struts2.showcase.person"/>
<include file="struts-chat.xml" />
<include file="struts-interactive.xml" />
+41 -5
View File
@@ -20,10 +20,11 @@
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-prepare</filter-name>
@@ -62,6 +63,10 @@
org.apache.struts2.showcase.chat.ChatSessionListener
</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>
</listener>
<!-- SNIPPET START: dwr -->
@@ -86,9 +91,30 @@
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Sitemesh Freemarker and Velocity Decorator Servlets. Shares configuration with Struts.-->
<servlet>
<servlet-name>sitemesh-freemarker</servlet-name>
<servlet-class>org.apache.struts2.sitemesh.FreemarkerDecoratorServlet</servlet-class>
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>sitemesh-velocity</servlet-name>
<servlet-class>org.apache.struts2.sitemesh.VelocityDecoratorServlet</servlet-class>
<init-param>
<param-name>default_encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- JavaServer Faces Servlet Mapping, not called directly -->
<servlet-mapping>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
@@ -98,6 +124,16 @@
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sitemesh-freemarker</servlet-name>
<url-pattern>*.ftl</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sitemesh-velocity</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
<!-- END SNIPPET: dwr -->
<!-- SNIPPET START: example.velocity.filter.chain
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* $Id: pom.xml 820737 2009-10-01 18:03:21Z musachy $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.2.2</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<packaging>pom</packaging>
<name>Struts 2 Maven Archetypes</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_2_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>
<module>struts2-archetype-blank</module>
<module>struts2-archetype-convention</module>
<module>struts2-archetype-dbportlet</module>
<module>struts2-archetype-plugin</module>
<module>struts2-archetype-portlet</module>
<module>struts2-archetype-starter</module>
</modules>
</project>
@@ -0,0 +1,48 @@
INFORMATION
===========
- This is Struts 2's "Blank" Maven Archetype
USAGE
=====
- change directory to where the web app template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample web app template, assuming :-
- root java package -> com.myCompany.mySystem
- the webapp war name -> myWebApp
mvn archetype:create -DgroupId=com.myCompany.mySystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-blank \
-DarchetypeVersion=2.0.9-SNAPSHOT \
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
IMPORTANT:
==========
- The generated template uses the 'example' package, regardless of what you
specify during mvn archetype:create.
Unfortunately, the Maven Archetype plugin does not currently provide a way to
move resource files into a package structure.
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty6 execute
mvn jetty:run
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<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_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>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-blank</id>
<!--
<sources>
<source>src/main/java/example/ExampleSupport.java</source>
<source>src/main/java/example/HelloWorld.java</source>
<source>src/main/java/example/Login.java</source>
</sources>
<resources>
<resource>src/main/resources/example/Login-validation.xml</resource>
<resource filtered="false">src/main/resources/example/package.properties</resource>
<resource filtered="false">src/main/resources/example/package_es.properties</resource>
<resource>src/main/resources/example.xml</resource>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/index.html</resource>
<resource>src/main/webapp/example/HelloWorld.jsp</resource>
<resource>src/main/webapp/example/Login.jsp</resource>
<resource>src/main/webapp/example/Menu.jsp</resource>
<resource>src/main/webapp/example/Missing.jsp</resource>
<resource>src/main/webapp/example/Register.jsp</resource>
<resource>src/main/webapp/example/Welcome.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
</resources>
<testSources>
<source>src/test/java/example/ConfigTest.java</source>
<source>src/test/java/example/HelloWorldTest.java</source>
<source>src/test/java/example/LoginTest.java</source>
</testSources>
-->
</archetype>
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="struts2-archetype-blank">
<fileSets>
<fileSet filtered="true" packaged="true">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*package*.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*-validation.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false">
<directory>src/main/resources</directory>
<includes>
<include>**/struts.xml</include>
<include>**/example.xml</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp/example</directory>
<includes>
<include>**/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp</directory>
<includes>
<include>**/index.html</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/web.xml</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
@@ -0,0 +1,174 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -0,0 +1,6 @@
Apache Struts
Copyright 2006-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -0,0 +1,10 @@
README.txt - blank
This is an "empty" application that you can deploy as the basis of your own
application.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
----------------------------------------------------------------------------
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Webapp</name>
<properties>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${struts2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<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>
@@ -0,0 +1,30 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
/**
* Base Action class for the Tutorial package.
*/
public class ExampleSupport extends ActionSupport {
}
@@ -0,0 +1,61 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package ${package}.example;
/**
* <code>Set welcome message.</code>
*/
public class HelloWorld extends ExampleSupport {
public String execute() throws Exception {
setMessage(getText(MESSAGE));
return SUCCESS;
}
/**
* Provide default valuie for Message property.
*/
public static final String MESSAGE = "HelloWorld.message";
/**
* Field for Message property.
*/
private String message;
/**
* Return Message property.
*
* @return Message property
*/
public String getMessage() {
return message;
}
/**
* Set Message property.
*
* @param message Text to display on HelloWorld page.
*/
public void setMessage(String message) {
this.message = message;
}
}
@@ -0,0 +1,59 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package ${package}.example;
public class Login extends ExampleSupport {
public String execute() throws Exception {
if (isInvalid(getUsername())) return INPUT;
if (isInvalid(getPassword())) return INPUT;
return SUCCESS;
}
private boolean isInvalid(String value) {
return (value == null || value.length() == 0);
}
private String username;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
private String password;
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<!--
- This file is included by the struts.xml file as an example
- of how to break up the configuration file into multiple files.
-->
<struts>
<package name="example" namespace="/example" extends="struts-default">
<action name="HelloWorld" class="${package}.example.HelloWorld">
<result>/example/HelloWorld.jsp</result>
</action>
<action name="Login_*" method="{1}" class="${package}.example.Login">
<result name="input">/example/Login.jsp</result>
<result type="redirectAction">Menu</result>
</action>
<action name="*" class="${package}.example.ExampleSupport">
<result>/example/{1}.jsp</result>
</action>
<!-- Add additional "example" package actions here. -->
</package>
</struts>
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
<field name="username">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
</validators>
@@ -0,0 +1,5 @@
HelloWorld.message = Struts is up and running...
requiredstring= ${getText(fieldName)} is required.
password = Password
username = User Name
Missing.message = This feature is under construction. Please try again in the next iteration.
@@ -0,0 +1,5 @@
HelloWorld.message = ¡Struts está bien!...
requiredstring = ${getText(fieldName)} es requerido.
password = Contraseña
username = Nombre de Usuario
Missing.message = Página bajo construcción, trate de nuevo en la proxima versión
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
<include file="example.xml"/>
<!-- Add addition packages and configuration here. -->
</struts>
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="struts_blank" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts Blank</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1,28 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title><s:text name="HelloWorld.message"/></title>
</head>
<body>
<h2><s:property value="message"/></h2>
<h3>Languages</h3>
<ul>
<li>
<s:url id="url" action="HelloWorld">
<s:param name="request_locale">en</s:param>
</s:url>
<s:a href="%{url}">English</s:a>
</li>
<li>
<s:url id="url" action="HelloWorld">
<s:param name="request_locale">es</s:param>
</s:url>
<s:a href="%{url}">Espanol</s:a>
</li>
</ul>
</body>
</html>
@@ -0,0 +1,15 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Sign On</title>
</head>
<body>
<s:form action="Login">
<s:textfield key="username"/>
<s:password key="password" />
<s:submit/>
</s:form>
</body>
</html>
@@ -0,0 +1,3 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:include value="Missing.jsp"/>
@@ -0,0 +1,11 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head><title>Missing Feature</title></head>
<body>
<p>
<s:text name="Missing.message"/>
</p>
</body>
</html>
@@ -0,0 +1,3 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:include value="Missing.jsp"/>
@@ -0,0 +1,18 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Welcome</title>
<link href="<s:url value="/css/examplecss"/>" rel="stylesheet"
type="text/css"/>
</head>
<body>
<h3>Commands</h3>
<ul>
<li><a href="<s:url action="Login_input"/>">Sign On</a></li>
<li><a href="<s:url action="Register"/>">Register</a></li>
</ul>
</body>
</html>
@@ -0,0 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=example/HelloWorld.action">
</head>
<body>
<p>Loading ...</p>
</body>
</html>
@@ -0,0 +1,97 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.config.RuntimeConfiguration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import java.util.Map;
import java.util.List;
import org.apache.struts2.StrutsTestCase;
public class ConfigTest extends StrutsTestCase {
protected void assertSuccess(String result) throws Exception {
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
}
protected void assertInput(String result) throws Exception {
assertTrue("Expected an input result!",
ActionSupport.INPUT.equals(result));
}
protected Map assertFieldErrors(ActionSupport action) throws Exception {
assertTrue(action.hasFieldErrors());
return action.getFieldErrors();
}
protected void assertFieldError(Map field_errors, String field_name, String error_message) {
List errors = (List) field_errors.get(field_name);
assertNotNull("Expected errors for " + field_name, errors);
assertTrue("Expected errors for " + field_name, errors.size()>0);
// TODO: Should be a loop
assertEquals(error_message,errors.get(0));
}
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider c = new XmlConfigurationProvider("struts.xml");
configurationManager.addConfigurationProvider(c);
configurationManager.reload();
}
protected ActionConfig assertClass(String namespace, String action_name, String class_name) {
RuntimeConfiguration configuration = configurationManager.getConfiguration().getRuntimeConfiguration();
ActionConfig config = configuration.getActionConfig(namespace, action_name);
assertNotNull("Mssing action", config);
assertTrue("Wrong class name: [" + config.getClassName() + "]",
class_name.equals(config.getClassName()));
return config;
}
protected ActionConfig assertClass(String action_name, String class_name) {
return assertClass("", action_name, class_name);
}
protected void assertResult(ActionConfig config, String result_name, String result_value) {
Map results = config.getResults();
ResultConfig result = (ResultConfig) results.get(result_name);
Map params = result.getParams();
String value = (String) params.get("actionName");
if (value == null)
value = (String) params.get("location");
assertTrue("Wrong result value: [" + value + "]",
result_value.equals(value));
}
public void testConfig() throws Exception {
assertNotNull(configurationManager);
}
}
@@ -0,0 +1,37 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;
public class HelloWorldTest extends StrutsTestCase {
public void testHelloWorld() throws Exception {
HelloWorld hello_world = new HelloWorld();
String result = hello_world.execute();
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the default message!",
hello_world.getText(HelloWorld.MESSAGE).equals(hello_world.getMessage()));
}
}
@@ -0,0 +1,55 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package ${package}.example;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import java.util.Map;
public class LoginTest extends ConfigTest {
public void FIXME_testLoginConfig() throws Exception {
ActionConfig config = assertClass("example", "Login_input", "example.Login");
assertResult(config, ActionSupport.SUCCESS, "Menu");
assertResult(config, ActionSupport.INPUT, "/example/Login.jsp");
}
public void testLoginSubmit() throws Exception {
Login login = new Login();
login.setUsername("username");
login.setPassword("password");
String result = login.execute();
assertSuccess(result);
}
// Needs access to an envinronment that includes validators
public void FIXME_testLoginSubmitInput() throws Exception {
Login login = new Login();
String result = login.execute();
assertInput(result);
Map errors = assertFieldErrors(login);
assertFieldError(errors,"username","Username is required.");
assertFieldError(errors,"password","Password is required.");
}
}
@@ -0,0 +1,48 @@
INFORMATION
===========
- This is Struts 2's "Blank Convetion" Maven Archetype
USAGE
=====
- change directory to where the web app template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample web app template, assuming :-
- root java package -> com.mycompany.mysystem
- the webapp war name -> myWebApp
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-convention \
-DarchetypeVersion=2.1.8 \
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
IMPORTANT:
==========
- The generated template uses the 'example' package, regardless of what you
specify during mvn archetype:create.
Unfortunately, the Maven Archetype plugin does not currently provide a way to
move resource files into a package structure.
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty6 execute
mvn jetty:run
@@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<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_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>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-convention</id>
</archetype>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="struts2-archetype-convention">
<fileSets>
<fileSet filtered="true" packaged="true">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="true">
<directory>src/main/resources</directory>
<includes>
<include>**/*package*.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false">
<directory>src/main/webapp</directory>
<includes>
<include>**/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false">
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
@@ -0,0 +1,174 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -0,0 +1,6 @@
Apache Struts
Copyright 2006-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/
@@ -0,0 +1,10 @@
README.txt - blank convention
This is an "empty" Google App Engine aware application that you can deploy as the basis of your own
application.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
----------------------------------------------------------------------------
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${project.version}</version>
<packaging>war</packaging>
<name>Struts 2 Blank Convention Webapp</name>
<properties>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-junit-plugin</artifactId>
<version>${struts2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<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>
</build>
</project>
@@ -0,0 +1,25 @@
package ${package};
import ognl.OgnlRuntime;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.logging.Logger;
/**
* To allow works Struts 2 with Google App Engine
*/
public class InitListener implements ServletContextListener {
public InitListener() {
}
public void contextInitialized(ServletContextEvent sce) {
OgnlRuntime.setSecurityManager(null);
}
public void contextDestroyed(ServletContextEvent sce) {
}
}
@@ -0,0 +1,42 @@
package ${package}.actions;
import com.opensymphony.xwork2.ActionSupport;
/**
* <code>Set welcome message.</code>
*/
public class HelloAction extends ActionSupport {
public String execute() throws Exception {
setMessage(getText(MESSAGE));
return SUCCESS;
}
/**
* Provide default valuie for Message property.
*/
public static final String MESSAGE = "hello.message";
/**
* Field for Message property.
*/
private String message;
/**
* Return Message property.
*
* @return Message property
*/
public String getMessage() {
return message;
}
/**
* Set Message property.
*
* @param message Text to display on HelloWorld page.
*/
public void setMessage(String message) {
this.message = message;
}
}
@@ -0,0 +1,24 @@
package ${package}.actions;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
@Results({
@Result(name = Action.SUCCESS, location = "${redirectName}", type = "redirectAction")
})
public class Index extends ActionSupport {
private String redirectName;
public String execute() {
redirectName = "hello";
return Action.SUCCESS;
}
public String getRedirectName() {
return redirectName;
}
}
@@ -0,0 +1,2 @@
hello.message = Struts is up and running...
requiredstring= ${getText(fieldName)} is required.
@@ -0,0 +1,2 @@
hello.message = ¡Struts está bien!...
requiredstring = ${getText(fieldName)} es requerido.
@@ -0,0 +1,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>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>${artifactId}</application>
<version>1</version>
<sessions-enabled>true</sessions-enabled>
</appengine-web-app>
@@ -0,0 +1,28 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title><s:text name="hello.message"/></title>
</head>
<body>
<h2><s:property value="message"/></h2>
<h3>Languages</h3>
<ul>
<li>
<s:url id="url" action="hello">
<s:param name="request_locale">en</s:param>
</s:url>
<s:a href="%{url}">English</s:a>
</li>
<li>
<s:url id="url" action="hello">
<s:param name="request_locale">es</s:param>
</s:url>
<s:a href="%{url}">Espanol</s:a>
</li>
</ul>
</body>
</html>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="struts_blank" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts Blank Convention</display-name>
<listener>
<listener-class>${package}.InitListener</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1 @@
<% response.sendRedirect("hello"); %>
@@ -0,0 +1,16 @@
package ${package}.actions;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;
public class HelloActionTest extends StrutsTestCase {
public void testHelloAction() throws Exception {
HelloAction hello = new HelloAction();
String result = hello.execute();
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the default message!",
hello.getText(HelloAction.MESSAGE).equals(hello.getMessage()));
}
}
@@ -0,0 +1,14 @@
package ${package}.actions;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;
public class IndexTest extends StrutsTestCase {
public void testIndex() throws Exception {
Index index = new Index();
String result = index.execute();
assertTrue("Expected a success result!", ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the 'hello' action name!!", "hello".equals(index.getRedirectName()));
}
}
@@ -0,0 +1,42 @@
INFORMATION
===========
- This is Struts 2's "Database Portlet" Maven Archetype
- To be used to create a simple portlet that displays information in a database and can be deployed as a webapp or JSR168 portlet.
USAGE
=====
- change directory to where the portlet template is to be created,
for example, a 'projects' directory (which you may need to create):
cd /home/tmjee/projects
- run the following command to generate the sample portlet template, assuming :-
- root java package -> com.myCompany.myPortlet
- the portlet war name -> myWebApp
mvn archetype:create -DgroupId=com.myCompany.myPortlet \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-dbportlet \
-DarchetypeVersion=2.0.9-SNAPSHOT \
-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
- to compile, execute
mvn compile
- to run test cases execute
mvn test
- to clean execute
mvn clean
- to package execute
mvn package
- to start it with jetty execute as a servlet
mvn jetty:run
@@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.2.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<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_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>
<maven.test.skip>true</maven.test.skip>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>struts2-archetype-dbblank</id>
<sources>
<source>src/main/java/view/IndexAction.java</source>
<source>src/main/java/edit/IndexAction.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml</resource>
<resource>src/main/webapp/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
<resource>src/main/webapp/WEB-INF/portlet.xml</resource>
<resource>src/main/webapp/WEB-INF/applicationContext.xml</resource>
<resource>src/main/webapp/WEB-INF/view/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/help/index.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-input.jsp</resource>
<resource>src/main/webapp/WEB-INF/edit/index-success.jsp</resource>
</resources>
</archetype>
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>war</packaging>
<version>${project.version}</version>
<name>Struts 2 Database Portlet</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Database Portlet</description>
<properties>
<struts2.version>${project.version}</struts2.version>
</properties>
<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-portlet-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>2.5.6</version>
</dependency>
<!-- Database driver (change for your specific database) -->
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
</dependency>
<!-- Servlet, Jsp, and Portlet API's -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<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>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,46 @@
package ${package}.edit;
import org.apache.struts2.dispatcher.DefaultActionSupport;
/**
*
*/
public class IndexAction extends DefaultActionSupport {
private String pref1;
private String pref2;
private boolean submit;
public String execute() {
if (submit) {
// Save the preferences somehow
return SUCCESS;
} else {
// Preform any logic here
return INPUT;
}
}
public void setSubmit(String val) {
this.submit = (val != null);
}
public String getPref1() {
return pref1;
}
public String getPref2() {
return pref2;
}
public void setPref1(String pref) {
this.pref1 = pref;
}
public void setPref2(String pref) {
this.pref2 = pref;
}
}
@@ -0,0 +1,51 @@
package ${package}.view;
import org.apache.struts2.dispatcher.DefaultActionSupport;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import javax.sql.DataSource;
import java.util.Map;
import java.util.List;
/**
* Loads and displays the contents of a database table
*/
public class IndexAction extends DefaultActionSupport {
private static boolean initialized = false;
private DataSource ds;
private static List<Map<String,Object>> data;
private static long lastLoaded;
private static long CACHE_TIME = 1000 * 60;
public void setDataSource(DataSource ds) {
// Initializes the in-memory database (not necessary in production)
if (!initialized) {
SimpleJdbcTemplate jt = new SimpleJdbcTemplate(ds);
jt.update("CREATE TABLE sample_table ( id INTEGER IDENTITY, str_col VARCHAR(256), num_col INTEGER)");
jt.update("INSERT INTO sample_table(str_col,num_col) VALUES('Ford', 100)");
jt.update("INSERT INTO sample_table(str_col,num_col) VALUES('Toyota', 200)");
jt.update("INSERT INTO sample_table(str_col,num_col) VALUES('Mazda', 300)");
initialized = true;
}
this.ds = ds;
}
public String execute() {
// Only refresh the data every minute as needed
long now = System.currentTimeMillis();
if (lastLoaded + CACHE_TIME < now) {
SimpleJdbcTemplate jt = new SimpleJdbcTemplate(ds);
data = jt.queryForList("SELECT * FROM sample_table");
lastLoaded = now;
}
return SUCCESS;
}
public List<Map<String,Object>> getData() {
return data;
}
}
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<constant name="struts.convention.default.parent.package" value="struts-portlet-default" />
<constant name="struts.convention.result.path" value="/WEB-INF/" />
<constant name="struts.devMode" value="true" />
<constant name="struts.convention.package.locators.basePackage" value="${package}"/>
<include file="struts-portlet-default.xml" />
<package name="${artifactId}-package" extends="struts-portlet-default" namespace="/">
<action name="*">
<result type="redirectAction">
<param name="actionName">index</param>
<param name="namespace">/view</param>
</result>
</action>
</package>
</struts>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
Defines the datasource that will be injected into your Actions
-->
<beans default-autowire="byName">
<!-- Change for your database -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource"
destroy-method="close">
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
<property name="url" value="jdbc:hsqldb:mem:example"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
</beans>
@@ -0,0 +1,10 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h1>StrutsPortlet</h1>
This is the default edit page!
<p />
<s:form action="index" method="POST">
<s:textfield label="Preference one" name="preferenceOne" value="%{preferenceOne}"/>
<s:textfield label="Preference two" name="preferenceTwo" value="%{preferenceTwo}"/>
<s:submit name="submit" value="Save prefs"/>
</s:form>
@@ -0,0 +1,22 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
The preferences has been saved:
<p />
<table>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<tr>
<td>Preference 1</td>
<td><s:property value="%{pref1}" /></td>
</tr>
<tr>
<td>Preference 2</td>
<td><s:property value="%{pref2}" /></td>
</tr>
</table>
<a href="<s:url action="index"/>">Back</a>
@@ -0,0 +1,63 @@
<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" id="struts-portlet">
<portlet id="StrutsDBPortlet">
<description xml:lang="EN">Struts Database Portlet</description>
<portlet-name>StrutsDBPortlet</portlet-name>
<display-name xml:lang="EN">Struts Database Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<init-param>
<name>actionPackages</name>
<value>${package}</value>
</init-param>
<init-param>
<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<init-param>
<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<init-param>
<!-- The view mode namespace. Maps to a namespace in the xwork config file -->
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<init-param>
<!-- The default action to invoke in view mode -->
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<portlet-info>
<title>Struts Database Porlet</title>
<short-title>DB</short-title>
<keywords>struts,portlet,database</keywords>
</portlet-info>
</portlet>
</portlet-app>
@@ -0,0 +1,20 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Welcome to the Struts data table portlet</H2>
<p/>
This a simple table showing the database data:
<table>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<s:iterator id="row" value="%{data}">
<tr>
<td><s:property value="%{STR_COL}" /></td>
<td><s:property value="%{NUM_COL}" /></td>
</tr>
</s:iterator>
</table>
<ul>
<li><a href="<s:url action="index" portletMode="edit" namespace="/edit"/>">Go to edit mode and see what's there</a></li>
<li><a href="<s:url action="index" portletMode="help" namespace="/help"/>">Go to help mode and see what's there</a></li>
</ul>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
<filter id="filterdispatcher">
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.portlet.context.ServletContextHolderListener</listener-class>
</listener>
<servlet id="preparator">
<servlet-name>preparator</servlet-name>
<servlet-class>org.apache.struts2.portlet.context.PreparatorServlet</servlet-class>
</servlet>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

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