Compare commits

...

124 Commits

Author SHA1 Message Date
Ted Nathan Husted b8cadf565a WW-2054 Tag r575121 as Struts 2.0.10 (again)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_10@575122 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 23:36:53 +00:00
Nils-Helge Garli d09da593eb WW-2164 Action was not added if namespace was blank
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@574163 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 08:03:42 +00:00
Philip Luppens 6d6492b1f0 Fixed class to pass unit test. Don't really like the solution, but for now it should work.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573921 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 22:46:02 +00:00
Philip Luppens c872ba3108 Missed JUnit test in last commit. Still having troubles to get the testcases to run normally. If this commit doesn't solve it, I might need some more time to fix this.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573919 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 22:28:42 +00:00
Philip Luppens 137da15d07 Made some minimal changes to improve the JFreeChart Result:
- chart getter can be specified
- type (png/jpg) can be specified
- throws NPEs if required fields are missing
- added example configuration and Action

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573912 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 21:48:46 +00:00
Donald J. Brown e2b0819538 Adding ability to load templates from classpath, in addition to web context
WW-2146


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573816 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 10:56:10 +00:00
Donald J. Brown ca2fa277d3 Fix handling of empty extension during url creation
WW-2163


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573805 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 09:16:43 +00:00
Donald J. Brown 733fb5e8a2 Make it possible to access actions without an extension
WW-2163


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573790 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 07:07:48 +00:00
Donald J. Brown 802ed18ca4 Fixing test WW-2160
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573609 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 15:21:38 +00:00
Donald J. Brown 26b76a25f1 Turning off static method access in ognl expressions by default
WW-2160


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573606 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 15:18:09 +00:00
Donald J. Brown 1a537ff27c Fixing references to xwork type system
XW-561


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573461 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 05:20:55 +00:00
Donald J. Brown 9cd3aa23a8 Updating classes to match new XWork type conversion API
XW-561


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@573454 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 04:43:05 +00:00
James Holmes 4f342ae935 Fix formatting.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572866 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 02:56:14 +00:00
James Holmes e5696eff33 FFix typo.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572865 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 02:43:15 +00:00
James Holmes e6d012a9ae WW-2132 Add support for JSP tag library dynamic attributes
Update JSP version to 2.0 to support the <dynamic-attributes> element.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572756 13f79535-47bb-0310-9956-ffa450edef68
2007-09-04 17:52:09 +00:00
Donald J. Brown 8c775ce550 Removing the unused struts.configuration.files setting WW-1966
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572437 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 22:16:49 +00:00
Donald J. Brown 6a4ea41f79 Switched the injection order to favor application scope WW-2125
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572228 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 03:43:57 +00:00
Donald J. Brown 66bec3e8ab Adding better error message when a Struts tag is used w/o the servlet filter
WW-1969


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572225 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 03:24:53 +00:00
Donald J. Brown cc48951911 Fixing j5-j6 bug in test WW-2045
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572219 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 02:45:32 +00:00
Donald J. Brown f72fada5cb Fixed selection of radio item when value is null
WW-2045


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@572216 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 02:39:34 +00:00
Donald J. Brown 81d5ca327a Adding printing of jar and plugin info
WW-2154


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571991 13f79535-47bb-0310-9956-ffa450edef68
2007-09-02 14:33:15 +00:00
Donald J. Brown af781d0079 Fixed xwork pom info, updated for xwork resolver change
WW-1715



git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571990 13f79535-47bb-0310-9956-ffa450edef68
2007-09-02 14:31:04 +00:00
Donald J. Brown b416c2fbe1 Taking the Struts 1.3.5 jar out of the dependency chain WW-1715
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571958 13f79535-47bb-0310-9956-ffa450edef68
2007-09-02 11:39:33 +00:00
Donald J. Brown 501f80d465 Added display of constants and beans
WW-2153


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571945 13f79535-47bb-0310-9956-ffa450edef68
2007-09-02 10:49:26 +00:00
Antonio Petrelli b25dc1b3c3 WW-2151
Resolved snapshot dependencies by using the latest released version available, with the exception of Plexus (using 1.0-alpha-10) and XWork (still using SNAPSHOT).

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571941 13f79535-47bb-0310-9956-ffa450edef68
2007-09-02 10:41:16 +00:00
Antonio Petrelli 37d78edf96 WW-2075
Added configuration to "struts-parent".

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571533 13f79535-47bb-0310-9956-ffa450edef68
2007-08-31 18:30:51 +00:00
Musachy Barroso 8c3f7952dd WW-2136 Missing tag TextArea on dojo plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571254 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 17:45:48 +00:00
Musachy Barroso e601d02be6 WW-2136 Missing tag TextArea on dojo plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571253 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 17:45:40 +00:00
Musachy Barroso 19efe8ff3a WW-2136 Missing tag TextArea on dojo plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571252 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 17:45:21 +00:00
Musachy Barroso 6fd66f2695 WW-2077 Change parseWidgets to false in djConfig inside head FTL .Should be false for better performance!
* Remove ids from some widgets to make easier the testing of this improvement

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@571239 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 16:48:51 +00:00
Antonio Petrelli 786a94f35e WW-2049
Re-added the license header in a correct way, because i removed by mistake an important line.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@570699 13f79535-47bb-0310-9956-ffa450edef68
2007-08-29 08:44:02 +00:00
James Holmes c23822d31b WW-2142 input streams need to be explicitly closed
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@570518 13f79535-47bb-0310-9956-ffa450edef68
2007-08-28 18:26:48 +00:00
James Holmes 369b22af7b WW-2132 Add support for JSP tag library dynamic attributes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@570496 13f79535-47bb-0310-9956-ffa450edef68
2007-08-28 17:38:36 +00:00
Donald J. Brown ce3042977f Fixing bad javadoc comment
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@570056 13f79535-47bb-0310-9956-ffa450edef68
2007-08-27 09:42:54 +00:00
Musachy Barroso c082194bd4 Update tag reference doc
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@569864 13f79535-47bb-0310-9956-ffa450edef68
2007-08-26 19:18:42 +00:00
Musachy Barroso add167aefd WW-2077 Change parseWidgets to false in djConfig inside head FTL .Should be false for better performance!
* Now there is a new property "parseContent" in the "head" tag, which is set to "false" by default. If set to true, Dojo will scan the whole document looking for widgets.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@569863 13f79535-47bb-0310-9956-ffa450edef68
2007-08-26 19:18:15 +00:00
Musachy Barroso 168bf5e8ab Fix URL in tree examples
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@569582 13f79535-47bb-0310-9956-ffa450edef68
2007-08-24 23:58:27 +00:00
Musachy Barroso e977b5a63e WW-2134 Upgrade Dojo from 0.4.2 to 0.4.3 to address possible XSS Issues
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@569576 13f79535-47bb-0310-9956-ffa450edef68
2007-08-24 23:47:20 +00:00
James Holmes fb57ae14cd Revert upgrade from OGNL 2.6.11 to 2.7. There were compilation issues in the Struts 1 plugin due to differences in one of the OGNL interfaces that the Struts 1 plugin uses for accessing DynaBean properties.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@568984 13f79535-47bb-0310-9956-ffa450edef68
2007-08-23 13:39:58 +00:00
James Holmes 6cd8b820fb WW-2128 Upgrade to OGNL 2.7
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@568734 13f79535-47bb-0310-9956-ffa450edef68
2007-08-22 19:28:42 +00:00
Musachy Barroso 217c43f21c Fix spelling error
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@568318 13f79535-47bb-0310-9956-ffa450edef68
2007-08-21 23:07:00 +00:00
James Holmes ce80410c58 WW-2015 url tag, method attribute not evaluating expressions (ognl)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566729 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 14:32:47 +00:00
James Holmes 55ea2ea1d9 WW-1977 Struts throws stack trace instead of 404 when an action doesn't exist
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566475 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 02:57:03 +00:00
James Holmes ccc7b7471c WW-2104 Add default dispatcher constant
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566443 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 00:38:19 +00:00
James Holmes e0a606e2b7 WW-2115 Add Portuguese translation of struts-messages.properties
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566418 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 23:59:51 +00:00
Nils-Helge Garli a6aedd2dfb WW-2104 Renamed name of dispatcher servlet and made the name configurable
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566324 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 20:14:20 +00:00
James Holmes d8ac6de7bb WW-2103 Invalid Javascript generated for StringLength validator
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566210 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 14:56:06 +00:00
James Holmes 4b6504b01e WW-2058 Client side validation in xhtml template and clearErrorMessages not working in firefox with hidden fields
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566192 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 14:36:25 +00:00
Nils-Helge Garli 11a819d4d2 WW-2105 Do not copy the valuestack from event to render when the request cycle has been proper PRG
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@566092 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 10:22:56 +00:00
James Holmes 7c11bd3564 WW-2110 css_xhtml checkbox.ftl renders one </div> to many when no label exists
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565844 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 17:29:29 +00:00
René Gielen 7ec7764e16 WW-2109:
id resolution for <s:form> - minor cleanups, some former changes rolled back again

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565759 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 13:52:41 +00:00
René Gielen 60227b13f0 WW-2109:
id resolution for <s:form> - minor cleanups

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565756 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 13:49:45 +00:00
René Gielen 67de561c2a WW-1993:
Clarification about XWorks's new DefaultObjectDeterminer which includes the generics funtionailty of deprecated GenericsObjectDeterminer

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565687 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 10:03:06 +00:00
James Holmes ad4c656209 WW-1950 UrlHelper.buildUrl does not output port even if forceAddSchemeHostAndPort turned on (TestCase included)
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565609 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 02:02:49 +00:00
Musachy Barroso fe1ef6b99e Update tags reference documentation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565513 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 20:48:26 +00:00
Musachy Barroso 3d3ed4d537 WW-2106 HTML loaded by the ajax tags is parsed for dojo widgets, this should be optional and there should be a "parseContent" attribute to control it
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565512 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 20:47:50 +00:00
James Holmes 90c9f6ff3b WW-1948 s:url tag does not provide forceAddSchemeHostAndPort parameter
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565429 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 17:15:28 +00:00
René Gielen 9fe437b44a WW-2108:
Fix for failing Bamboo build

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565288 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 10:02:48 +00:00
René Gielen 34d8707456 WW-2108:
Make <s:tabbedpanel> being able to remember last selected tab using a cookie

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565267 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 08:33:44 +00:00
René Gielen 8f411c1d12 WW-2108:
Make <s:tabbedpanel> being able to remember last selected tab using a cookie

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565264 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 08:13:30 +00:00
Donald J. Brown 5e68db2e90 Turning off JSP EL for all tag attributes, as all attributes are processed for OGNL
expressions
WW-2107


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565258 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 07:51:59 +00:00
Nils-Helge Garli 3bc1186993 Removed "portletSupportActive" which is no longer needed.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565246 13f79535-47bb-0310-9956-ffa450edef68
2007-08-13 05:37:23 +00:00
Nils-Helge Garli 6e141ac437 Changed description for the portletUrlType attribute of the url component.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565086 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 17:40:28 +00:00
Nils-Helge Garli 051f059e70 Not needed anymore
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565066 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 13:23:10 +00:00
Nils-Helge Garli ac5928a0bc Cleanup of dependencies
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565065 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 13:22:49 +00:00
Nils-Helge Garli 8646947822 Added "view" as supported mode
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565064 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 13:22:26 +00:00
Nils-Helge Garli 4f37c65f78 Added example for model driven and file upload
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565061 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 13:02:27 +00:00
Nils-Helge Garli fefbe21884 WW-1877 Removed ajax examples
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565053 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 12:44:55 +00:00
Nils-Helge Garli e7e6065b36 WW-1877 Removed ajax examples
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565051 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 12:39:40 +00:00
Nils-Helge Garli 3fea9c6f50 Fixed problem with the interceptor stack for the token example
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565048 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 12:28:06 +00:00
Nils-Helge Garli 64a653aa59 Restructured configuration files and added uncommented entry for dispatcher servlet in web.xml
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565047 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 12:24:16 +00:00
Nils-Helge Garli 45ab263e00 WW-2105 Added new PortletActionRedirectResult class to handle the same syntax as for the ServletActionRedirectResult
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565009 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 07:43:13 +00:00
Nils-Helge Garli 3715572d7c WW-2105 "Override" the redirectAction result type with the PortletResult type.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@565005 13f79535-47bb-0310-9956-ffa450edef68
2007-08-12 06:03:38 +00:00
Nils-Helge Garli 672bb186cd WW-1713 Consider "method" tag attribute when creating urls
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564967 13f79535-47bb-0310-9956-ffa450edef68
2007-08-11 20:20:33 +00:00
Nils-Helge Garli f54b26d71f WW-2104 Added experimental support for intermediate dispatcher servlet allowing for wrapping the request to the JSP in a StrutsWrapperRequest
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564926 13f79535-47bb-0310-9956-ffa450edef68
2007-08-11 14:31:18 +00:00
Nils-Helge Garli 9fbbeea663 Added missing license headers.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564610 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 14:46:41 +00:00
Nils-Helge Garli 06d7cb4e06 Added missing license headers.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564609 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 14:45:51 +00:00
Nils-Helge Garli 1800f44731 WW-2053,WW-2101 Removed ServletContextHolder - Using mock servlet object instead. New interceptor for state handling.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564602 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 14:16:24 +00:00
Nils-Helge Garli 8f4dfbe63f WW-2101 Removed PreparatorServlet - Replaced by mock servlet implementation classes in org.apache.struts2.portlet.servlet
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564599 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 14:05:17 +00:00
Nils-Helge Garli de9f68d868 Removed mock - Replaced by the classes in org.apache.struts2.portlet.servlet
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564594 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 13:57:22 +00:00
Nils-Helge Garli 0b24ede354 WW-1836 Order of the entries in the entry set is not guaranteed.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564485 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 06:37:07 +00:00
Nils-Helge Garli d222f92835 WW-1836 Refactored unit tests for PortletSessionMap and PortletRequestMap. Also removed some unecessary logging.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564476 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 06:07:48 +00:00
Antonio Petrelli 266a553f5d WW-2049
Reverted the license headers in sample apps code. I left only in pom.xml files and in Java code.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564339 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 18:59:58 +00:00
Nils-Helge Garli 3774507d5f WW-2096 Missing test-change that subclipse didn't pick up...
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564287 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 17:29:01 +00:00
Nils-Helge Garli fe8fd6125c WW-2097 The PortletAwareInterceptor replaces the PortletPreferencesInterceptor.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564283 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 17:16:06 +00:00
Nils-Helge Garli 979b8c0544 WW-2097 New "aware" interfaces and interceptor. The PortletAwareInterceptor replaces the PortletPreferencesInterceptor.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564282 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 17:15:28 +00:00
Nils-Helge Garli a42a60b1ab WW-1989,WW-2053,WW-2096 Push action on stack instead of action proxy. Also use the new wrapper servlet objects to support components/interceptors that rely on the servlet classes.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564280 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 17:06:07 +00:00
Nils-Helge Garli 330f6ecb56 Added method to get the portlet context
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564279 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 17:00:49 +00:00
Nils-Helge Garli 2440ce6bdb WW-1989,WW-2053 Provide "mock" implentation of servlet classes wrapping the portlet classes. Eases reuse of components/interceptors that has references to servlet api objects.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564246 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 15:36:52 +00:00
Nils-Helge Garli bdbe0bf7f9 WW-2052 Put location from renderDirect action in session instead of render parameter
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564120 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 07:14:51 +00:00
James Mitchell 463ce50112 WW-2060 give credit where credit is due
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@563485 13f79535-47bb-0310-9956-ffa450edef68
2007-08-07 13:01:09 +00:00
Antonio Petrelli f50c16070f WW-2049
First bunch of license headers in sample apps code.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@563238 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 19:53:57 +00:00
James Holmes ebb6c3f814 Fix typos.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@562020 13f79535-47bb-0310-9956-ffa450edef68
2007-08-02 05:29:21 +00:00
James Holmes b5b90755f5 Fix typos.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@562017 13f79535-47bb-0310-9956-ffa450edef68
2007-08-02 05:16:18 +00:00
James Holmes bc9c3477bf WW-2080 actionError, actionMessage and fieldError Freemarker templates do not honor the cssClass and cssStyle attributes
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561856 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 16:22:11 +00:00
James Holmes 90a91201e8 Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561841 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 15:31:56 +00:00
James Holmes 59a63106a0 Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561839 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 15:19:52 +00:00
James Holmes c1ff9ac97b Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561835 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 15:17:23 +00:00
James Holmes cad5823cb8 Remove spurious space character in bypass message.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561647 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 04:36:52 +00:00
James Holmes ff78317b63 Log a warning if user specifies a namespace and action with the <s:form> tag and the action is not found in the namespace. Right now this fails silently and the user gets an HTTP 404 typically. I've had this happen to me and it took a little while to realize I had the wrong namespace or action name. This warning should help users figure out the issue faster by giving them a heads up.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561619 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 01:14:18 +00:00
James Holmes 524c3d5c15 Fix typos.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561600 13f79535-47bb-0310-9956-ffa450edef68
2007-07-31 23:50:04 +00:00
Musachy Barroso b8ccb9e9c3 Improve select tag documentation
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561407 13f79535-47bb-0310-9956-ffa450edef68
2007-07-31 17:44:17 +00:00
James Holmes 4ce0026a55 Fix formatting to be all spaces instead of a mix of spaces and tabs.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561223 13f79535-47bb-0310-9956-ffa450edef68
2007-07-31 02:58:36 +00:00
James Holmes 2ea2f95b36 Specify XML version and encoding.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561219 13f79535-47bb-0310-9956-ffa450edef68
2007-07-31 02:44:54 +00:00
James Holmes daa46fb71f Fix formatting to be all spaces instead of a mix of spaces and tabs. Also fix init param comments that were incorrect.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@561218 13f79535-47bb-0310-9956-ffa450edef68
2007-07-31 02:37:02 +00:00
Donald J. Brown 20da1d6161 Making the mapper easier to extend
WW-2078


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560966 13f79535-47bb-0310-9956-ffa450edef68
2007-07-30 13:08:11 +00:00
René Gielen 80bb25dd2f Code cleanups / generification
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560895 13f79535-47bb-0310-9956-ffa450edef68
2007-07-30 09:06:37 +00:00
René Gielen f4d14204e3 WW-1661:
Minor code cleanups

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560880 13f79535-47bb-0310-9956-ffa450edef68
2007-07-30 07:04:19 +00:00
Antonio Petrelli cf351ce368 WW-2049
Added licenses to plugins code.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560745 13f79535-47bb-0310-9956-ffa450edef68
2007-07-29 15:55:59 +00:00
Antonio Petrelli 13b5b3a41a WW-2049
Added license to core/pom.xml.
Added configuration of RAT plugin in core/pom.xml to exclude some testing and generated files.
Third bunch of added licenses. The main project, the "core" and "api" modules have only correct license headers.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560554 13f79535-47bb-0310-9956-ffa450edef68
2007-07-28 15:14:04 +00:00
Musachy Barroso 560213cbe9 WW-2050 Separate JSONValidationInterceptor from AnnotationValidationInterceptor
Patch provided by Lukasz Racon

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560339 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 17:57:41 +00:00
Musachy Barroso b42a06f505 Update tag description
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560334 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 17:40:52 +00:00
Musachy Barroso e6c552dffa WW-2050 Separate JSONValidationInterceptor from AnnotationValidationInterceptor
Patch provided by Lukasz Racon

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560333 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 17:40:09 +00:00
Musachy Barroso 8066a53a0b WW-2050 Separate JSONValidationInterceptor from AnnotationValidationInterceptor
Patch provided by Lukasz Racon 

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560331 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 17:38:35 +00:00
Musachy Barroso 65cf49a1a1 WW-2050 Separate JSONValidationInterceptor from AnnotationValidationInterceptor
Patch provided by Lukasz Racon 

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560329 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 17:38:24 +00:00
Musachy Barroso bf1fc42345 WW-2070 Add an object browser to the debugging interceptor
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560261 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 14:58:05 +00:00
René Gielen 0875a59f33 WW-2007:
Fixing problems with generated javascript idetitifiers containing unescaped id parameter value

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@560258 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 14:56:11 +00:00
James Holmes 44aeb64064 WW-2064 XHTML checkbox template does not include tooltip consistently
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559849 13f79535-47bb-0310-9956-ffa450edef68
2007-07-26 15:16:40 +00:00
Antonio Petrelli cbe136ab09 WW-2049
Second bunch of added licenses.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559604 13f79535-47bb-0310-9956-ffa450edef68
2007-07-25 21:01:25 +00:00
James Holmes 3d9f578992 WW-1911 File Upload: content-type validation fails when no file is uploaded
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559307 13f79535-47bb-0310-9956-ffa450edef68
2007-07-25 03:45:17 +00:00
Antonio Petrelli c2f13be89b WW-2049
Added RAT report to the site.
First bunch of corrected licenses.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559206 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 21:01:18 +00:00
James Holmes ffd0fb693b WW-1938 Bug with multiple s:param tags inside s:url tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559127 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 17:33:38 +00:00
James Holmes 00c246f530 Add missing license.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559107 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 17:03:11 +00:00
James Holmes 170f5226ea Add missing license.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@559086 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 15:36:11 +00:00
982 changed files with 76418 additions and 62727 deletions
+22
View File
@@ -1,4 +1,26 @@
<?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>
+22
View File
@@ -1,4 +1,26 @@
<?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>
+22
View File
@@ -1,4 +1,26 @@
<?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>
@@ -1,3 +1,23 @@
/*
* $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 mailreader2;
import com.opensymphony.xwork2.interceptor.Interceptor;
+19 -16
View File
@@ -1,21 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2005-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $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.
*/
-->
@@ -58,7 +61,7 @@
<dependency>
<groupId>com.hostedqa</groupId>
<artifactId>hostedqa-remote-ant</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.7</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -121,7 +124,7 @@
<dependency>
<groupId>com.hostedqa</groupId>
<artifactId>hostedqa-remote-ant</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.7</version>
</dependency>
</dependencies>
</plugin>
+59 -7
View File
@@ -1,4 +1,26 @@
<?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>
@@ -87,14 +109,22 @@
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</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>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
@@ -103,4 +133,26 @@
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rat-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<configuration>
<includes>
<include>pom.xml</include>
<include>src/**</include>
</includes>
<excludes>
<exclude>src/main/etc/gridsphere/README-gridsphere.txt</exclude>
<exclude>src/main/etc/gridsphere/struts-portlet</exclude>
<exclude>src/main/etc/jetspeed2/README-jetspeed2.txt</exclude>
<exclude>src/main/etc/jetspeed2/struts-portlet.psml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
@@ -0,0 +1,37 @@
/*
* $Id: FormExample.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 org.apache.struts2.portlet.example;
import org.apache.struts2.portlet.example.model.Name;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
/**
*/
public class FormExampleModelDriven extends ActionSupport implements ModelDriven<Name> {
private Name name = new Name();
public Name getModel() {
return name;
}
}
@@ -0,0 +1,81 @@
/*
* $Id: $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.portlet.example.fileupload;
import java.io.File;
import org.apache.struts2.dispatcher.DefaultActionSupport;
/**
* File Upload example's action. <code>FileUploadAction</code>
*
*/
public class FileUploadAction extends DefaultActionSupport {
private static final long serialVersionUID = 5156288255337069381L;
private String contentType;
private File upload;
private String fileName;
private String caption;
// since we are using <s:file name="upload" .../> the file name will be
// obtained through getter/setter of <file-tag-name>FileName
public String getUploadFileName() {
return fileName;
}
public void setUploadFileName(String fileName) {
this.fileName = fileName;
}
// since we are using <s:file name="upload" ... /> the content type will be
// obtained through getter/setter of <file-tag-name>ContentType
public String getUploadContentType() {
return contentType;
}
public void setUploadContentType(String contentType) {
this.contentType = contentType;
}
// since we are using <s:file name="upload" ... /> the File itself will be
// obtained through getter/setter of <file-tag-name>
public File getUpload() {
return upload;
}
public void setUpload(File upload) {
this.upload = upload;
}
public String getCaption() {
return caption;
}
public void setCaption(String caption) {
this.caption = caption;
}
public String upload() throws Exception {
return SUCCESS;
}
}
@@ -0,0 +1,18 @@
package org.apache.struts2.portlet.example.model;
public class Name {
private String firstName;
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
@@ -0,0 +1,48 @@
<?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="edit" extends="struts-portlet-default"
namespace="/edit">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/index.jsp</result>
</action>
<action name="test"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/test.jsp</result>
</action>
<action name="formExampleEdit"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/edit/formExampleInput.jsp
</result>
</action>
<action name="processFormExampleEdit"
class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/edit/formExampleInput.jsp
</result>
<result name="success">
/edit/processFormExampleForward.action?firstName=${firstName}&amp;lastName=${lastName}
</result>
</action>
<action name="processFormExampleForward"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">
/WEB-INF/edit/formExample.jsp
</result>
</action>
</package>
<package name="editTest" extends="edit" namespace="/edit/dummy/test">
<action name="testAction"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/namespaceTest.jsp</result>
</action>
</package>
</struts>
@@ -0,0 +1,14 @@
<?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="help" extends="struts-portlet-default"
namespace="/help">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/help/index.jsp</result>
</action>
</package>
</struts>
@@ -0,0 +1,115 @@
<?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="view" extends="struts-portlet-default"
namespace="/view">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/view/index.jsp</result>
</action>
<action name="formExample"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/view/formExampleInput.jsp
</result>
</action>
<action name="processFormExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/view/formExampleInput.jsp
</result>
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
</action>
<action name="formExampleModelDriven"
class="org.apache.struts2.portlet.example.FormExampleModelDriven">
<result name="input">
/WEB-INF/view/formExampleInputModelDriven.jsp
</result>
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
</action>
<action name="validationExample"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/view/formExampleInputValidation.jsp
</result>
</action>
<action name="processValidationExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
<result name="input">
/WEB-INF/view/formExampleInputValidation.jsp
</result>
</action>
<action name="fileUpload" class="org.apache.struts2.portlet.example.fileupload.FileUploadAction">
<result name="input">
/WEB-INF/view/fileUpload.jsp
</result>
<result name="success">
/WEB-INF/view/fileUploadSuccess.jsp
</result>
</action>
<action name="tokenExample"
class="com.opensymphony.xwork2.ActionSupport" method="input">
<result name="input">
/WEB-INF/view/tokenExampleInput.jsp
</result>
</action>
<action name="processTokenExample"
class="com.opensymphony.xwork2.ActionSupport">
<result name="input">
/WEB-INF/view/tokenExampleInput.jsp
</result>
<result name="invalid.token">
/WEB-INF/view/tokenExampleInput.jsp
</result>
<result name="success">
/WEB-INF/view/tokenExample.jsp
</result>
<interceptor-ref name="portletDefaultStackWithToken" />
</action>
<action name="springExample" class="springAction">
<result name="success">
/WEB-INF/view/springExample.jsp
</result>
</action>
<action name="freeMarkerExample"
class="com.opensymphony.xwork2.ActionSupport" method="input">
<result type="freemarker" name="input">
/WEB-INF/view/freeMarkerExampleInput.ftl
</result>
</action>
<action name="processFreeMarkerExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">/view/processFreeMarkerView.action?firstName=${firstName}&amp;lastName=${lastName}</result>
</action>
<action name="processFreeMarkerView" class="org.apache.struts2.portlet.example.FormExample">
<result type="freemarker" name="success">/WEB-INF/view/freeMarkerExample.ftl</result>
</action>
<action name="velocityHelloWorld" class="com.opensymphony.xwork2.ActionSupport">
<result type="velocity" name="success">/WEB-INF/view/helloWorld.vm</result>
</action>
</package>
</struts>
@@ -1 +0,0 @@
struts.objectFactory = spring
+3 -155
View File
@@ -4,159 +4,7 @@
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-portlet-default.xml" />
<package name="view" extends="struts-portlet-default"
namespace="/view">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/view/index.jsp</result>
</action>
<action name="formExample"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/view/formExampleInput.jsp
</result>
</action>
<action name="processFormExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/view/formExampleInput.jsp
</result>
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
</action>
<action name="validationExample"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/view/formExampleInputValidation.jsp
</result>
</action>
<action name="processValidationExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">
/WEB-INF/view/formExample.jsp
</result>
<result name="input">
/WEB-INF/view/formExampleInputValidation.jsp
</result>
<interceptor-ref name="validationWorkflowStack" />
</action>
<action name="tokenExample"
class="com.opensymphony.xwork2.ActionSupport" method="input">
<result name="input">
/WEB-INF/view/tokenExampleInput.jsp
</result>
</action>
<action name="processTokenExample"
class="com.opensymphony.xwork2.ActionSupport">
<result name="input">
/WEB-INF/view/tokenExampleInput.jsp
</result>
<result name="invalid.token">
/WEB-INF/view/tokenExampleInput.jsp
</result>
<result name="success">
/WEB-INF/view/tokenExample.jsp
</result>
<interceptor-ref name="token" />
<interceptor-ref name="defaultStack" />
</action>
<action name="springExample" class="springAction">
<result name="success">
/WEB-INF/view/springExample.jsp
</result>
</action>
<action name="ajaxExample"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">
/WEB-INF/view/ajaxExample.jsp
</result>
</action>
<action name="ajaxData"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/view/ajaxData.jsp</result>
</action>
<action name="freeMarkerExample"
class="com.opensymphony.xwork2.ActionSupport" method="input">
<result type="freemarker" name="input">
/WEB-INF/view/freeMarkerExampleInput.ftl
</result>
</action>
<action name="processFreeMarkerExample"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">/view/processFreeMarkerView.action?firstName=${firstName}&amp;lastName=${lastName}</result>
</action>
<action name="processFreeMarkerView" class="org.apache.struts2.portlet.example.FormExample">
<result type="freemarker" name="success">/WEB-INF/view/freeMarkerExample.ftl</result>
</action>
<action name="velocityHelloWorld" class="com.opensymphony.xwork2.ActionSupport">
<result type="velocity" name="success">/WEB-INF/view/helloWorld.vm</result>
</action>
</package>
<package name="edit" extends="struts-portlet-default"
namespace="/edit">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/index.jsp</result>
</action>
<action name="test"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/test.jsp</result>
</action>
<action name="formExampleEdit"
class="org.apache.struts2.portlet.example.FormExample" method="input">
<result name="input">
/WEB-INF/edit/formExampleInput.jsp
</result>
</action>
<action name="processFormExampleEdit"
class="org.apache.struts2.portlet.example.FormExample">
<result name="input">
/WEB-INF/edit/formExampleInput.jsp
</result>
<result name="success">
/edit/processFormExampleForward.action?firstName=${firstName}&amp;lastName=${lastName}
</result>
</action>
<action name="processFormExampleForward"
class="org.apache.struts2.portlet.example.FormExample">
<result name="success">
/WEB-INF/edit/formExample.jsp
</result>
</action>
</package>
<package name="editTest" extends="edit" namespace="/edit/dummy/test">
<action name="testAction"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/edit/namespaceTest.jsp</result>
</action>
</package>
<package name="help" extends="struts-portlet-default"
namespace="/help">
<action name="index"
class="com.opensymphony.xwork2.ActionSupport">
<result name="success">/WEB-INF/help/index.jsp</result>
</action>
</package>
<include file="struts-view.xml"/>
<include file="struts-edit.xml"/>
<include file="struts-help.xml"/>
</struts>
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
"http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
<allow>
<create creator="new" javascript="validator">
<param name="class" value="org.apache.struts2.validators.DWRValidator"/>
</create>
<convert converter="bean" match="com.opensymphony.xwork2.ValidationAwareSupport"/>
</allow>
<signatures>
<![CDATA[
import java.util.Map;
import org.apache.struts2.validators.DWRValidator;
DWRValidator.doPost(String, String, Map<String, String>);
]]>
</signatures>
</dwr>
+116 -103
View File
@@ -1,118 +1,131 @@
<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="StrutsPortlet">
<description xml:lang="EN">Struts Test Portlet</description>
<portlet-name>StrutsPortlet</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet</display-name>
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
id="struts-portlet">
<portlet id="StrutsPortlet">
<description xml:lang="EN">Struts Test Portlet</description>
<portlet-name>StrutsPortlet</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<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>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<!-- The default action to invoke in help mode. -->
<init-param>
<name>defaultHelpAction</name>
<value>index</value>
</init-param>
<expiration-cache>0</expiration-cache>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<supported-locale>en</supported-locale>
<portlet-info>
<title>My StrutsPortlet portlet</title>
<short-title>SP</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet-info>
<title>My StrutsPortlet portlet</title>
<short-title>SP</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<portlet id="StrutsPortlet2">
<description xml:lang="EN">Struts Test Portlet2</description>
<portlet-name>StrutsPortlet2</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet2</display-name>
<portlet id="StrutsPortlet2">
<description xml:lang="EN">Struts Test Portlet2</description>
<portlet-name>StrutsPortlet2</portlet-name>
<display-name xml:lang="EN">Struts Test Portlet2</display-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<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>
<!-- The view mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<expiration-cache>0</expiration-cache>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>edit</portlet-mode>
<portlet-mode>help</portlet-mode>
</supports>
<!-- The edit mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>editNamespace</name>
<value>/edit</value>
</init-param>
<supported-locale>en</supported-locale>
<!-- The default action to invoke in edit mode. -->
<init-param>
<name>defaultEditAction</name>
<value>index</value>
</init-param>
<portlet-info>
<title>My StrutsPortlet portlet2</title>
<short-title>SP2</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
<!-- The help mode namespace. Maps to a namespace in the Struts 2 config file. -->
<init-param>
<name>helpNamespace</name>
<value>/help</value>
</init-param>
<!-- The default action to invoke in help mode. -->
<init-param>
<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>My StrutsPortlet portlet2</title>
<short-title>SP2</short-title>
<keywords>struts,portlet</keywords>
</portlet-info>
</portlet>
</portlet-app>
@@ -1 +0,0 @@
<H2>Hello from Ajax!</H2>
@@ -1 +0,0 @@
This data is fetched via Ajax! The server time is <%= new java.util.Date() %>
@@ -1,48 +0,0 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:head theme="ajax"/>
<link rel="stylesheet" type="text/css" href="<s:url value="/struts/tabs.css"/>">
<b>This is a tabbed pane with two panels that fetches data from a remote action via ajax</b>
<s:tabbedPanel id="test2" theme="simple" >
<s:div id="left" label="left" theme="ajax">
This is the left pane<br/>
<s:form >
<s:textfield name="tt" label="Test Text" /> <br/>
<s:textfield name="tt2" label="Test Text2" />
</s:form>
</s:div>
<s:div href="<s:url action="ajaxData"/>" id="ryh1" theme="ajax" label="remote one" />
<s:div id="middle" label="middle" theme="ajax">
middle tab<br/>
<s:form >
<s:textfield name="tt" label="Test Text44" /> <br/>
<s:textfield name="tt2" label="Test Text442" />
</s:form>
</s:div>
<s:div href="<s:url action="ajaxData"/>" id="ryh21" theme="ajax" label="remote right" />
</s:tabbedPanel>
<p/>
A DIV that waits for 5 seconds before loading the contents
<s:div
id="once"
theme="ajax"
cssStyle="border: 1px solid yellow;"
href="<s:url action="ajaxData"/>"
delay="5000"
loadingText="loading...">
Waiting for data</s:div>
<p/>
A DIV that is updated every 2 seconds
<s:div
id="twoseconds"
cssStyle="border: 1px solid yellow;"
href="<s:url action="ajaxData"/>"
theme="ajax"
delay="2000"
updateFreq="2000"
errorText="There was an error"
loadingText="loading...">Initial Content
</s:div>
<p/>
<a href="<s:url action="index"/>">Back to front page</a>
@@ -0,0 +1,13 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h1>Fileupload sample</h1>
<s:actionerror />
<s:fielderror />
<s:form action="fileUpload" method="POST" enctype="multipart/form-data">
<s:file name="upload" label="File"/>
<s:textfield name="caption" label="Caption"/>
<s:submit />
</s:form>
@@ -0,0 +1,14 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<h1>Fileupload sample</h1>
<p>
<ul>
<li>ContentType: <s:property value="uploadContentType" /></li>
<li>FileName: <s:property value="uploadFileName" /></li>
<li>File: <s:property value="upload" /></li>
<li>Caption:<s:property value="caption" /></li>
</ul>
</p>
@@ -0,0 +1,8 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
<H2>Input your name</H2>
<s:form action="formExampleModelDriven" method="POST">
<s:textfield label="First name" name="firstName" value="%{firstName}"/>
<s:textfield label="Last name" name="lastName" value="%{lastName}"/>
<s:submit value="Submit the form"/>
</s:form>
@@ -4,10 +4,11 @@
Here you'll find examples of what is possible with the Struts Portlet integration framework.
<ul>
<li><a href="<s:url action="formExample"/>">A simple form</a></li>
<li><a href="<s:url action="formExampleModelDriven" method="input"/>">Model driven example</li>
<li><a href="<s:url action="validationExample"/>">Validation</a></li>
<li><a href="<s:url action="tokenExample"/>">Token</a></li>
<li><a href="<s:url action="springExample"/>">Spring integration</a></li>
<li><a href="<s:url action="ajaxExample"/>">Ajax</a></li>
<li><a href="<s:url action="fileUpload" method="input"/>">File upload</li>
<li><a href="<s:url action="freeMarkerExample"/>">FreeMarker</a></li>
<li><a href="<s:url action="velocityHelloWorld"/>">Velocity</a></li>
<li><a href="<s:url action="index" portletMode="edit"/>">Go to edit mode and see what's there</a></li>
+21 -37
View File
@@ -4,46 +4,30 @@
<!-- Uncomment/comment this if you need/don't need Spring support -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
<param-value>
/WEB-INF/applicationContext*.xml
</param-value>
</context-param>
<filter id="filterdispatcher">
<filter-name>action2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter id="filterdispatcher">
<filter-name>Struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>Struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.apache.struts2.portlet.context.ServletContextHolderListener
</listener-class>
<listener-class> org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet id="preparator">
<servlet-name>preparator</servlet-name>
<servlet-class>
org.apache.struts2.portlet.context.PreparatorServlet
</servlet-class>
</servlet>
<servlet id="dwr">
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<!-- Uncomment to use the dispatcher servlet -->
<!--<servlet id="Struts2PortletDispatcherServlet">
<servlet-name>Struts2PortletDispatcherServlet</servlet-name>
<servlet-class>org.apache.struts2.portlet.dispatcher.DispatcherServlet</servlet-class>
</servlet>-->
</web-app>
+22
View File
@@ -1,4 +1,26 @@
<?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>
@@ -1,3 +1,23 @@
/*
* $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.showcase;
import org.apache.struts2.showcase.ajax.tree.Category;
@@ -1,3 +1,23 @@
/*
* $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.showcase.ajax;
import java.util.ArrayList;
@@ -72,6 +72,10 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
}
}
pageLines = read(in, -1);
if (in != null) {
in.close();
}
}
if (className != null && className.trim().length() > 0) {
@@ -81,6 +85,10 @@ public class ViewSourceAction extends ActionSupport implements ServletContextAwa
in = servletContext.getResourceAsStream("/WEB-INF/src"+className);
}
classLines = read(in, -1);
if (in != null) {
in.close();
}
}
String rootPath = ServletActionContext.getServletContext().getRealPath("/");
+2 -1
View File
@@ -2,4 +2,5 @@ Apache Struts
Copyright 2000-2007 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
The Apache Software Foundation (http://www.apache.org/).
Nifty Corners (http://www.html.it/articoli/nifty/index.html).
@@ -76,6 +76,7 @@
</action>
<action name="quizAjax" class="org.apache.struts2.showcase.validation.QuizAction">
<interceptor-ref name="jsonValidationWorkflowStack"/>
<result name="input">/validation/quiz-ajax.jsp</result>
<result>/validation/quiz-success.jsp</result>
</action>
<action name="getNodes" class="org.apache.struts2.showcase.ShowAjaxDynamicTreeAction">
@@ -7,39 +7,39 @@
<struts>
<package name="integration" extends="struts1-default" namespace="/integration">
<interceptors>
<interceptor name="gangsterForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
<param name="className">org.apache.struts2.showcase.integration.GangsterForm</param>
<param name="name">gangsterForm</param>
</interceptor>
<interceptor name="gangsterValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor">
<param name="pathnames">/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml</param>
</interceptor>
<interceptors>
<interceptor name="gangsterForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
<param name="className">org.apache.struts2.showcase.integration.GangsterForm</param>
<param name="name">gangsterForm</param>
</interceptor>
<interceptor name="gangsterValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor">
<param name="pathnames">/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml</param>
</interceptor>
<interceptor-stack name="integration">
<interceptor-ref name="staticParams"/>
<interceptor-ref name="gangsterForm"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="actionForm-reset"/>
<interceptor-ref name="basicStack"/>
<interceptor-ref name="gangsterValidation"/>
<interceptor-ref name="workflow"/>
</interceptor-stack>
</interceptors>
<interceptor-stack name="integration">
<interceptor-ref name="staticParams"/>
<interceptor-ref name="gangsterForm"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="actionForm-reset"/>
<interceptor-ref name="basicStack"/>
<interceptor-ref name="gangsterValidation"/>
<interceptor-ref name="workflow"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="integration" />
<default-action-ref name="editGangster" />
<default-interceptor-ref name="integration"/>
<default-action-ref name="editGangster"/>
<!-- Diplay entry page that uses Model-Driven technique -->
<!-- Display entry page that uses Model-Driven technique -->
<action name="editGangster" class="org.apache.struts2.s1.Struts1Action">
<param name="className">org.apache.struts2.showcase.integration.EditGangsterAction</param>
<param name="className">org.apache.struts2.showcase.integration.EditGangsterAction</param>
<result>modelDriven.jsp</result>
</action>
<!-- Display the result page whose content is populated using the Model-Driven technique -->
<action name="saveGangster" class="org.apache.struts2.s1.Struts1Action">
<param name="className">org.apache.struts2.showcase.integration.SaveGangsterAction</param>
<param name="validate">true</param>
<param name="className">org.apache.struts2.showcase.integration.SaveGangsterAction</param>
<param name="validate">true</param>
<result name="input">modelDriven.jsp</result>
<result>modelDrivenResult.jsp</result>
</action>
@@ -62,7 +62,8 @@ Using a JSON list returned from an action (href="/JSONList.action"), without aut
Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCount="3", it is "3" by default), without the down arrow button (showDownArrow="false")
<br/>
<sx:autocompleter
<sx:autocompleter
id="auto2"
indicator="indicator"
href="%{jsonList}"
cssStyle="width: 200px;"
@@ -33,7 +33,7 @@
<p>
1. Attach to "onclick" event on button. Update content of Div 1. Use with indicator.
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<sx:bind id="ex1" href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" />
<sx:bind href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" />
<br/>
<s:submit theme="simple" type="submit" value="submit" id="button"/>
</p>
@@ -38,7 +38,7 @@ A submit button, that highlights (blue color) its targets
A submit button, with an indicator
<img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/>
<sx:submit type="submit" value="submit" targets="t1" href="%{ajaxTest}" indicator="indicator"/>
<sx:submit id="submit2" type="submit" value="submit" targets="t1" href="%{ajaxTest}" indicator="indicator"/>
<br/><br/>
@@ -13,7 +13,6 @@
<body>
<sx:div
id="once"
cssStyle="border: 1px solid yellow;"
href="%{ajaxTest}">
Initial Content</sx:div>
@@ -55,7 +55,7 @@
<s:url var="ajaxTest" value="/AjaxTest.action" />
<s:url var="test3" value="/Test3.action" />
<sx:a id="link0"
<sx:a
href="%{#ajaxTest}"
targets="t1"
highlightColor="red"
@@ -11,18 +11,15 @@
<body>
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true">
<sx:div id="left" label="test1" >
I'm a Tab!!!
</sx:div >
<sx:div id="middle" label="test2" >
I'm the other Tab!!!
</sx:div >
</sx:tabbedpanel>
<sx:tabbedpanel id="test2" cssStyle="width: 500px; height: 300px;" doLayout="true">
<sx:div label="test1" >
I'm a Tab!!!
</sx:div >
<sx:div id="middle" label="test2" >
I'm the other Tab!!!
</sx:div >
</sx:tabbedpanel>
<s:include value="../footer.jsp"/>
</body>
@@ -1,5 +1,6 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
@@ -19,16 +20,16 @@ NOTES:
Default Editor configuration:<br/>
<s:form id="form1" action="AjaxRemoteForm" method="post">
<s:textarea name="data" theme="ajax" cols="50" rows="10" value="Test Data 1" />
<sx:textarea name="data" cols="50" rows="10" value="Test Data 1" />
<s:submit value="Submit"/>
</s:form>
<br/>
Configured Editor configuration:<br/>
Configured Editor configuration:<br/>
<s:form id="form2" action="AjaxRemoteForm" method="post">
<s:textarea id="editor2" name="data" theme="ajax" cols="50" rows="10" value="Test Data 2">
<sx:textarea id="editor2" name="data" cols="50" rows="10" value="Test Data 2">
<s:param name="editorControls">textGroup;|;justifyGroup;|;listGroup;|;indentGroup</s:param>
</s:textarea>
</sx:textarea>
<s:submit value="Submit"/>
</s:form>
<br/>
+1 -1
View File
@@ -34,7 +34,7 @@
<ul>
<li><a href="<s:url value="/showcase.jsp"/>">Home</a></li>
<li><a href="<s:url value="/interactive/index.jsp" />">Interactive demo of OGNL and JSP tags</a></li>
<li><a href="<s:url value="/ajax/index.jsp" />">Ajax pugin for Struts</a></li>
<li><a href="<s:url value="/ajax/index.jsp" />">Ajax plugin for Struts</a></li>
<li><a href="<s:url value="/chat/index.jsp"/>">Ajax Chat</a>
<li><a href="<s:url action="actionChain1!input" namespace="/actionchaining" includeParams="none" />">Action Chaining</a></li>
<li><a href="<s:url action="index" namespace="/config-browser" includeParams="none" />">Config Browser</a></li>
@@ -10,7 +10,7 @@
<body>
<table>
<sx:datetimepicker label="toggleType='wipe'" value="%{'2006-10-31'}" toggleType="wipe" toggleDuration="300" name="test"/>
<sx:datetimepicker label="toggleType='explode'" value="%{'2006-07-22'}" toggleType="explode" toggleDuration="500"/>
<sx:datetimepicker label="toggleType='explode'" value="%{'2006-07-22'}" toggleType="explode" toggleDuration="500" id="dp2"/>
<sx:datetimepicker label="toggleType='fade'" value="%{'2006-06-30'}" toggleType="fade" toggleDuration="500"/>
<sx:datetimepicker label="With value='today'" name="dddp1" value="%{'today'}" />
<sx:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
@@ -13,7 +13,7 @@
<script language="JavaScript" type="text/javascript">
dojo.event.topic.subscribe("treeSelected", function treeNodeSelected(node) {
dojo.io.bind({
url: "<s:url value='/tags/ui/ajax/dynamicTreeSelectAction.action'/>&nodeId="+node.node.widgetId,
url: "<s:url value='/tags/ui/ajax/dynamicTreeSelectAction.action'/>?nodeId="+node.node.widgetId,
load: function(type, data, evt) {
var divDisplay = dojo.byId("displayId");
divDisplay.innerHTML=data;
@@ -3,7 +3,7 @@
<html>
<head>
<title>Showcase - UI Tag Example - Tree Example (Static)</title>
<sx:head />
<sx:head/>
</head>
<body>
@@ -12,7 +12,7 @@
<script language="JavaScript" type="text/javascript">
dojo.event.topic.subscribe("treeSelected", function treeNodeSelected(node) {
dojo.io.bind({
url: "<s:url value='/tags/ui/ajax/staticTreeSelectAction.action'/>&nodeId="+node.node.title,
url: "<s:url value='/tags/ui/ajax/staticTreeSelectAction.action'/>?nodeId="+node.node.title,
load: function(type, data, evt) {
var divDisplay = dojo.byId("displayIt");
divDisplay.innerHTML=data;
@@ -24,9 +24,9 @@
<div style="float:left; margin-right: 50px;">
<sx:tree label="parent" id="parentId" templateCssPath="/struts/tree.css"
<sx:tree label="parent" templateCssPath="/struts/tree.css"
showRootGrid="true" showGrid="true" treeSelectedTopic="treeSelected">
<sx:treenode label="child1" id="child1Id">
<sx:treenode label="child1" >
<sx:treenode label="grandchild1" id="grandchild1Id"/>
<sx:treenode label="grandchild2" id="grandchild2Id"/>
<sx:treenode label="grandchild3" id="grandchild3Id"/>
@@ -5,8 +5,8 @@
<html>
<head>
<title>Validation -Ajax</title>
<sx:head cache="true" compressed="false"/>
<title>Validation - Ajax</title>
<sx:head cache="false" compressed="false"/>
</head>
<s:url var="url" namespace="/validation" action="quizAjax"/>
+1 -1
View File
@@ -383,7 +383,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-10-SNAPSHOT</version>
<version>1.0-alpha-10</version>
<scope>provided</scope>
</dependency>
+44 -5
View File
@@ -1,4 +1,26 @@
<?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>
@@ -22,7 +44,7 @@
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0-alpha-1-SNAPSHOT</version>
<version>2.0-alpha-4</version>
<executions>
<execution>
<id>unpack-xwork</id>
@@ -33,7 +55,7 @@
<configuration>
<artifactItems>
<artifactItem>
<groupId>opensymphony</groupId>
<groupId>com.opensymphony.xwork</groupId>
<artifactId>xwork</artifactId>
<version>2.1-SNAPSHOT</version>
<classifier>sources</classifier>
@@ -48,7 +70,7 @@
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>maven-apt-plugin</artifactId>
<configuration>
<A>uri=/struts-tags,tlibVersion=2.2.3,jspVersion=1.2,shortName=s,displayName="Struts Tags",
<A>uri=/struts-tags,tlibVersion=2.2.3,jspVersion=2.0,shortName=s,displayName="Struts Tags",
outFile=${basedir}/target/classes/META-INF/struts-tags.tld,
description="To make it easier to access dynamic data;
the Apache Struts framework includes a library of custom tags.
@@ -107,6 +129,23 @@
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rat-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<configuration>
<includes>
<include>pom.xml</include>
<include>src/**</include>
</includes>
<excludes>
<exclude>src/test/resources/org/apache/struts2/views/jsp/ui/*</exclude>
<exclude>src/main/resources/org/apache/struts2/static/domTT.js</exclude>
<exclude>src/test/resources/org/apache/struts2/interceptor/validation/*</exclude>
<exclude>src/site/resources/tags/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
@@ -250,7 +289,7 @@
<dependencies>
<dependency>
<groupId>opensymphony</groupId>
<groupId>com.opensymphony.xwork</groupId>
<artifactId>xwork</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
@@ -446,7 +485,7 @@
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-annotations</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.2</version>
<optional>true</optional>
</dependency>
@@ -161,5 +161,8 @@ public final class StrutsConstants {
/** The name of the parameter to create when mapping an id (used by some action mappers) */
public static final String STRUTS_ID_PARAMETER_NAME = "struts.mapper.idParameterName";
/** The name of the parameter to determine whether static method access will be allowed in OGNL expressions or not */
public static final String STRUTS_ALLOW_STATIC_METHOD_ACCESS = "struts.ognl.allowStaticMethodAccess";
}
@@ -41,7 +41,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- START SNIPPET: example -->
*
* &lt;s:actionerror /&gt;
* &lt;s:form .... &gt;>
* &lt;s:form .... &gt;
* ....
* &lt;/s:form&gt;
*
@@ -46,7 +46,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="a", tldTagClass="org.apache.struts2.views.jsp.ui.AnchorTag", description="Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets")
@StrutsTag(
name="a",
tldTagClass="org.apache.struts2.views.jsp.ui.AnchorTag",
description="Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets",
allowDynamicAttributes=true)
public class Anchor extends ClosingUIBean {
public static final String OPEN_TEMPLATE = "a";
public static final String TEMPLATE = "a-close";
@@ -50,7 +50,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="checkbox", tldTagClass="org.apache.struts2.views.jsp.ui.CheckboxTag", description="Render a checkbox input field")
@StrutsTag(
name="checkbox",
tldTagClass="org.apache.struts2.views.jsp.ui.CheckboxTag",
description="Render a checkbox input field",
allowDynamicAttributes=true)
public class Checkbox extends UIBean {
final public static String TEMPLATE = "checkbox";
@@ -69,7 +69,7 @@ public class Component {
}
/**
* Get's the name of this component.
* Gets the name of this component.
* @return the name of this component.
*/
private String getComponentName() {
@@ -86,7 +86,7 @@ public class Component {
}
/**
* Get's the OGNL value stack assoicated with this component.
* Gets the OGNL value stack assoicated with this component.
* @return the OGNL value stack assoicated with this component.
*/
public ValueStack getStack() {
@@ -94,7 +94,7 @@ public class Component {
}
/**
* Get's the component stack of this component.
* Gets the component stack of this component.
* @return the component stack of this component, never <tt>null</tt>.
*/
public Stack getComponentStack() {
@@ -214,7 +214,7 @@ public class Component {
}
/**
* Constructs?a <code>RuntimeException</code> based on the given information.
* Constructs a <code>RuntimeException</code> based on the given information.
* <p/>
* A message is constructed and logged at ERROR level before being returned
* as a <code>RuntimeException</code>.
@@ -333,16 +333,20 @@ public class Component {
* @param scheme http or https
* @param includeContext should the context path be included or not
* @param encodeResult should the url be encoded
* @param forceAddSchemeHostAndPort should the scheme host and port be forced
* @param escapeAmp should ampersand (&) be escaped to &amp;
* @return the action url.
*/
protected String determineActionURL(String action, String namespace, String method,
HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme,
boolean includeContext, boolean encodeResult) {
boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort,
boolean escapeAmp) {
String finalAction = findString(action);
String finalMethod = method != null ? findString(method) : method;
String finalNamespace = determineNamespace(namespace, getStack(), req);
ActionMapping mapping = new ActionMapping(finalAction, finalNamespace, method, parameters);
ActionMapping mapping = new ActionMapping(finalAction, finalNamespace, finalMethod, parameters);
String uri = actionMapper.getUriFromActionMapping(mapping);
return UrlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult);
return UrlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult, forceAddSchemeHostAndPort, escapeAmp);
}
/**
@@ -406,7 +410,7 @@ public class Component {
}
/**
* Get's the parameters.
* Gets the parameters.
* @return the parameters. Is never <tt>null</tt>.
*/
public Map getParameters() {
@@ -414,7 +418,7 @@ public class Component {
}
/**
* Add's all the given parameters to this componenets own parameters.
* Adds all the given parameters to this component's own parameters.
* @param params the parameters to add.
*/
public void addAllParameters(Map params) {
@@ -422,9 +426,9 @@ public class Component {
}
/**
* Add's the given key and value to this components own parameter.
* Adds the given key and value to this component's own parameter.
* <p/>
* If the provided key is <tt>null</tt> nothing happends.
* If the provided key is <tt>null</tt> nothing happens.
* If the provided value is <tt>null</tt> any existing parameter with
* the given key name is removed.
* @param key the key of the new parameter to add.
@@ -449,5 +453,4 @@ public class Component {
public boolean usesBody() {
return false;
}
}
@@ -33,7 +33,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: javadoc -->
*
*/
@StrutsTag(name="div", tldTagClass="org.apache.struts2.views.jsp.ui.DivTag", description="Render HTML div providing content from remote call via AJAX")
@StrutsTag(
name="div",
tldTagClass="org.apache.struts2.views.jsp.ui.DivTag",
description="Render an HTML div",
allowDynamicAttributes=true)
public class Div extends ClosingUIBean {
public static final String TEMPLATE = "div";
@@ -51,7 +51,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;s:param&gt;field1&lt;/s:param&gt;
* &lt;s:param&gt;field2&lt;/s:param&gt;
* &lt;/s:fielderror&gt;
* &lt;s:form .... &gt;>
* &lt;s:form .... &gt;
* ....
* &lt;/s:form&gt;
*
@@ -61,7 +61,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;s:param value="%{'field1'}" /&gt;
* &lt;s:param value="%{'field2'}" /&gt;
* &lt;/s:fielderror&gt;
* &lt;s:form .... &gt;>
* &lt;s:form .... &gt;
* ....
* &lt;/s:form&gt;
*
@@ -45,7 +45,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="file", tldTagClass="org.apache.struts2.views.jsp.ui.FileTag", description="Render a file input field")
@StrutsTag(
name="file",
tldTagClass="org.apache.struts2.views.jsp.ui.FileTag",
description="Render a file input field",
allowDynamicAttributes=true)
public class File extends UIBean {
private final static Log log = LogFactory.getLog(File.class);
@@ -20,26 +20,6 @@
*/
package org.apache.struts2.components;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
//import org.apache.struts2.portlet.context.PortletActionContext;
//import org.apache.struts2.portlet.util.PortletUrlHelper;
import org.apache.struts2.views.util.UrlHelper;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.RuntimeConfiguration;
@@ -48,11 +28,18 @@ import com.opensymphony.xwork2.config.entities.InterceptorMapping;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptorUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.validator.ActionValidatorManagerFactory;
import com.opensymphony.xwork2.validator.FieldValidator;
import com.opensymphony.xwork2.validator.ValidationInterceptor;
import com.opensymphony.xwork2.validator.Validator;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.Set;
/**
* <!-- START SNIPPET: javadoc -->
@@ -93,7 +80,11 @@ import com.opensymphony.xwork2.validator.Validator;
* </pre>
*
*/
@StrutsTag(name="form", tldTagClass="org.apache.struts2.views.jsp.ui.FormTag", description="Renders an input form")
@StrutsTag(
name="form",
tldTagClass="org.apache.struts2.views.jsp.ui.FormTag",
description="Renders an input form",
allowDynamicAttributes=true)
public class Form extends ClosingUIBean {
public static final String OPEN_TEMPLATE = "form";
public static final String TEMPLATE = "form-close";
@@ -222,32 +213,26 @@ public class Form extends ClosingUIBean {
* </ol>
*/
protected void populateComponentHtmlId(Form form) {
boolean isAjax = "ajax".equalsIgnoreCase(this.theme);
String action = null;
if (this.action != null) {
// if it isn't specified, we'll make somethig up
action = findString(this.action);
}
if (id != null) {
addParameter("id", escape(id));
}
// if no id given, it will be tried to generate it from the action attribute
// by the urlRenderer implementation
urlRenderer.renderFormUrl(this);
}
/**
* @param isAjax
* @param namespace
* @param action
* Evaluate client side JavaScript Enablement.
* @param actionName the actioName to check for
* @param namespace the namespace to check for
* @param actionMethod the method to ckeck for
*/
protected void evaluateClientSideJsEnablement(String actionName, String namespace, String actionMethod) {
// Only evaluate if Client-Side js is to be enable when validate=true
Boolean validate = (Boolean) getParameters().get("validate");
if (validate != null && validate.booleanValue()) {
if (validate != null && validate) {
addParameter("performValidation", Boolean.FALSE);
@@ -255,9 +240,8 @@ public class Form extends ClosingUIBean {
ActionConfig actionConfig = runtimeConfiguration.getActionConfig(namespace, actionName);
if (actionConfig != null) {
List interceptors = actionConfig.getInterceptors();
for (Iterator i = interceptors.iterator(); i.hasNext();) {
InterceptorMapping interceptorMapping = (InterceptorMapping) i.next();
List<InterceptorMapping> interceptors = actionConfig.getInterceptors();
for (InterceptorMapping interceptorMapping : interceptors) {
if (ValidationInterceptor.class.isInstance(interceptorMapping.getInterceptor())) {
ValidationInterceptor validationInterceptor = (ValidationInterceptor) interceptorMapping.getInterceptor();
@@ -280,10 +264,9 @@ public class Form extends ClosingUIBean {
return Collections.EMPTY_LIST;
}
List all = ActionValidatorManagerFactory.getInstance().getValidators(actionClass, (String) getParameters().get("actionName"));
List validators = new ArrayList();
for (Iterator iterator = all.iterator(); iterator.hasNext();) {
Validator validator = (Validator) iterator.next();
List<Validator> all = ActionValidatorManagerFactory.getInstance().getValidators(actionClass, (String) getParameters().get("actionName"));
List<Validator> validators = new ArrayList<Validator>();
for (Validator validator : all) {
if (validator instanceof FieldValidator) {
FieldValidator fieldValidator = (FieldValidator) validator;
if (fieldValidator.getFieldName().equals(name)) {
@@ -311,7 +294,7 @@ public class Form extends ClosingUIBean {
this.onsubmit = onsubmit;
}
@StrutsTagAttribute(description="Set action nane to submit to, without .action suffix", defaultValue="current action")
@StrutsTagAttribute(description="Set action name to submit to, without .action suffix", defaultValue="current action")
public void setAction(String action) {
this.action = action;
}
@@ -342,7 +325,7 @@ public class Form extends ClosingUIBean {
this.validate = validate;
}
@StrutsTagAttribute(description="he portlet mode to display after the form submit")
@StrutsTagAttribute(description="The portlet mode to display after the form submit")
public void setPortletMode(String portletMode) {
this.portletMode = portletMode;
}
@@ -49,7 +49,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="hidden", tldTagClass="org.apache.struts2.views.jsp.ui.HiddenTag", description="Render a hidden input field")
@StrutsTag(
name="hidden",
tldTagClass="org.apache.struts2.views.jsp.ui.HiddenTag",
description="Render a hidden input field",
allowDynamicAttributes=true)
public class Hidden extends UIBean {
final public static String TEMPLATE = "hidden";
@@ -53,8 +53,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="label", tldTagClass="org.apache.struts2.views.jsp.ui.LabelTag", description="Render a label that displays" +
" read-only information")
@StrutsTag(
name="label",
tldTagClass="org.apache.struts2.views.jsp.ui.LabelTag",
description="Render a label that displays read-only information",
allowDynamicAttributes=true)
public class Label extends UIBean {
final public static String TEMPLATE = "label";
@@ -71,7 +71,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="optgroup", tldTagClass="org.apache.struts2.views.jsp.ui.OptGroupTag", description="Renders a Select Tag's OptGroup Tag")
@StrutsTag(
name="optgroup",
tldTagClass="org.apache.struts2.views.jsp.ui.OptGroupTag",
description="Renders a Select Tag's OptGroup Tag",
allowDynamicAttributes=true)
public class OptGroup extends Component {
public static final String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY = "optGroupInternalListUiBeanList";
@@ -46,7 +46,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="password", tldTagClass="org.apache.struts2.views.jsp.ui.PasswordTag", description="Render an HTML input tag of type password")
@StrutsTag(
name="password",
tldTagClass="org.apache.struts2.views.jsp.ui.PasswordTag",
description="Render an HTML input tag of type password",
allowDynamicAttributes=true)
public class Password extends TextField {
final public static String TEMPLATE = "password";
@@ -56,7 +56,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*
*/
@StrutsTag(name="reset", tldTagClass="org.apache.struts2.views.jsp.ui.ResetTag", description="Render a reset button")
@StrutsTag(
name="reset",
tldTagClass="org.apache.struts2.views.jsp.ui.ResetTag",
description="Render a reset button",
allowDynamicAttributes=true)
public class Reset extends FormButton {
final public static String TEMPLATE = "reset";
@@ -47,6 +47,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* multiple="true"
* size="3"
* required="true"
* value="%{petDao.pets.{id}}"
* /&gt;
*
* &lt;s:select label="Months"
@@ -77,7 +78,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* <!-- END SNIPPET: exnote -->
*
*/
@StrutsTag(name="select", tldTagClass="org.apache.struts2.views.jsp.ui.SelectTag", description="Render a select element")
@StrutsTag(
name="select",
tldTagClass="org.apache.struts2.views.jsp.ui.SelectTag",
description="Render a select element",
allowDynamicAttributes=true)
public class Select extends ListUIBean {
final public static String TEMPLATE = "select";
@@ -132,8 +137,8 @@ public class Select extends ListUIBean {
}
@StrutsTagAttribute(description=" Creates a multiple select. The tag will pre-select multiple values" +
" if the values are passed as an Array (of appropriate types) via the value attribute. Passing " +
"a Collection may work too? Haven't tested this.", type="Boolean", defaultValue="false")
" if the values are passed as an Array or a Collection(of appropriate types) via the value attribute. If one of the keys equals" +
" one of the values in the Collection or Array it wil be selected", type="Boolean", defaultValue="false")
public void setMultiple(String multiple) {
this.multiple = multiple;
}
@@ -1,8 +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 org.apache.struts2.components;
import java.io.IOException;
import java.io.Writer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsException;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.views.util.UrlHelper;
@@ -16,6 +38,11 @@ import com.opensymphony.xwork2.config.entities.ActionConfig;
*
*/
public class ServletUrlRenderer implements UrlRenderer {
/**
* Provide a logging instance.
*/
private static final Log LOG = LogFactory.getLog(ServletUrlRenderer.class);
/**
* {@inheritDoc}
@@ -29,7 +56,7 @@ public class ServletUrlRenderer implements UrlRenderer {
String result;
if (urlComponent.value == null && urlComponent.action != null) {
result = urlComponent.determineActionURL(urlComponent.action, urlComponent.namespace, urlComponent.method, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode);
result = urlComponent.determineActionURL(urlComponent.action, urlComponent.namespace, urlComponent.method, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode, urlComponent.forceAddSchemeHostAndPort, urlComponent.escapeAmp);
} else {
String _value = urlComponent.value;
@@ -38,7 +65,7 @@ public class ServletUrlRenderer implements UrlRenderer {
if (_value != null && _value.indexOf("?") > 0) {
_value = _value.substring(0, _value.indexOf("?"));
}
result = UrlHelper.buildUrl(_value, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode);
result = UrlHelper.buildUrl(_value, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode, urlComponent.forceAddSchemeHostAndPort, urlComponent.escapeAmp);
}
if ( urlComponent.anchor != null && urlComponent.anchor.length() > 0 ) {
result += '#' + urlComponent.anchor;
@@ -66,13 +93,11 @@ public class ServletUrlRenderer implements UrlRenderer {
public void renderFormUrl(Form formComponent) {
String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(),
formComponent.request);
String action = null;
String action;
if(formComponent.action != null) {
action = formComponent.findString(formComponent.action);
}
if (formComponent.action == null) {
} else {
// no action supplied? ok, then default to the current request
// (action or general URL)
ActionInvocation ai = (ActionInvocation) formComponent.getStack().getContext().get(
@@ -127,15 +152,19 @@ public class ServletUrlRenderer implements UrlRenderer {
}
// if the id isn't specified, use the action name
if (formComponent.getId() == null) {
formComponent.addParameter("id", action);
if (formComponent.getId() == null && action!=null ) {
formComponent.addParameter("id", formComponent.escape(action));
}
} else if (action != null) {
// Since we can't find an action alias in the configuration, we just
// assume
// the action attribute supplied is the path to be used as the uri
// this
// form is submitting to.
// assume the action attribute supplied is the path to be used as
// the URI this form is submitting to.
// Warn user that the specified namespace/action combo
// was not found in the configuration.
if (namespace != null) {
LOG.warn("No configuration found for the specified action: '" + action + "' in namespace: '" + namespace + "'. Form action defaulting to 'action' attribute's literal value.");
}
String result = UrlHelper.buildUrl(action, formComponent.request, formComponent.response, null);
formComponent.addParameter("action", result);
@@ -165,9 +194,7 @@ public class ServletUrlRenderer implements UrlRenderer {
// WW-1284
// evaluate if client-side js is to be enabled. (if validation
// interceptor
// does allow validation eg. method is not filtered out)
// interceptor does allow validation eg. method is not filtered out)
formComponent.evaluateClientSideJsEnablement(actionName, namespace, actionMethod);
}
}
@@ -45,7 +45,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0
* <!-- END SNIPPET: javadoc -->
*/
@StrutsTag(name="submit", tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag", description="Render a submit button")
@StrutsTag(
name="submit",
tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag",
description="Render a submit button",
allowDynamicAttributes=true)
public class Submit extends FormButton {
private static final Log LOG = LogFactory.getLog(Submit.class);
@@ -113,7 +113,11 @@ import com.opensymphony.xwork2.TextProvider;
* @see Param
*
*/
@StrutsTag(name="text", tldTagClass="org.apache.struts2.views.jsp.TextTag", description="Render a I18n text message")
@StrutsTag(
name="text",
tldTagClass="org.apache.struts2.views.jsp.TextTag",
description="Render a I18n text message",
allowDynamicAttributes=true)
public class Text extends ContextBean implements Param.UnnamedParametric {
private static final Log LOG = LogFactory.getLog(Text.class);
@@ -44,7 +44,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* @see TabbedPanel
*
*/
@StrutsTag(name="textarea", tldTagClass="org.apache.struts2.views.jsp.ui.TextareaTag", description="Render HTML textarea tag.")
@StrutsTag(
name="textarea",
tldTagClass="org.apache.struts2.views.jsp.ui.TextareaTag",
description="Render HTML textarea tag.",
allowDynamicAttributes=true)
public class TextArea extends UIBean {
final public static String TEMPLATE = "textarea";
@@ -51,7 +51,11 @@ import com.opensymphony.xwork2.util.ValueStack;
* </pre>
*/
@StrutsTag(name="textfield", tldTagClass="org.apache.struts2.views.jsp.ui.TextFieldTag", description="Render an HTML input field of type text")
@StrutsTag(
name="textfield",
tldTagClass="org.apache.struts2.views.jsp.ui.TextFieldTag",
description="Render an HTML input field of type text",
allowDynamicAttributes=true)
public class TextField extends UIBean {
/**
* The name of the default template for the TextFieldTag
@@ -21,6 +21,7 @@
package org.apache.struts2.components;
import java.io.Writer;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
@@ -310,7 +311,7 @@ import com.opensymphony.xwork2.util.ValueStack;
*
*
* <!-- START SNIPPET: tooltipdescription -->
* <b>tooltipConfig is deprecated, use individual tooltip configuration attributes instead </>
* <b>tooltipConfig is deprecated, use individual tooltip configuration attributes instead </b>
*
* Every Form UI component (in xhtml / css_xhtml or any other that extends them) can
* have tooltips assigned to them. The Form component's tooltip related attribute, once
@@ -465,6 +466,9 @@ public abstract class UIBean extends Component {
protected String tooltipDelay;
protected String tooltipCssClass;
protected String tooltipIconPath;
// dynamic attributes
protected Map<String,Object> dynamicAttributes = new HashMap<String,Object>();
protected String defaultTemplateDir;
protected String defaultUITheme;
@@ -760,9 +764,6 @@ public abstract class UIBean extends Component {
}
// tooltip & tooltipConfig
if (tooltipConfig != null) {
addParameter("tooltipConfig", findValue(tooltipConfig));
@@ -821,8 +822,10 @@ public abstract class UIBean extends Component {
}
evaluateExtraParams();
addParameter("dynamicAttributes", dynamicAttributes);
evaluateExtraParams();
}
protected String escape(String name) {
@@ -902,7 +905,8 @@ public abstract class UIBean extends Component {
/**
* Create HTML id element for the component and populate this component parmaeter
* map.
* map. Additionally, a parameter named escapedId is populated which contains the found id value filtered by
* {@link #escape(String)}, needed eg. for naming Javascript identifiers based on the id value.
*
* The order is as follows :-
* <ol>
@@ -914,21 +918,24 @@ public abstract class UIBean extends Component {
* @param form
*/
protected void populateComponentHtmlId(Form form) {
String tryId;
if (id != null) {
// this check is needed for backwards compatibility with 2.1.x
if (altSyntax()) {
addParameter("id", findString(id));
tryId = findString(id);
} else {
addParameter("id", id);
tryId = id;
}
} else if (form != null) {
addParameter("id", form.getParameters().get("id") + "_"
+ escape(name != null ? findString(name) : null));
tryId = form.getParameters().get("id") + "_"
+ escape(name != null ? findString(name) : null);
} else {
addParameter("id", escape(name != null ? findString(name) : null));
tryId = escape(name != null ? findString(name) : null);
}
addParameter("id", tryId);
addParameter("escapedId", escape(tryId));
}
/**
* Get's the id for referencing element.
* @return the id for referencing element.
@@ -968,7 +975,7 @@ public abstract class UIBean extends Component {
this.cssClass = cssClass;
}
@StrutsTagAttribute(description="The css style definitions for element ro use")
@StrutsTagAttribute(description="The css style definitions for element to use")
public void setCssStyle(String cssStyle) {
this.cssStyle = cssStyle;
}
@@ -1133,4 +1140,8 @@ public abstract class UIBean extends Component {
public void setTooltipIconPath(String tooltipIconPath) {
this.tooltipIconPath = tooltipIconPath;
}
public void setDynamicAttributes(Map<String,Object> dynamicAttributes) {
this.dynamicAttributes = dynamicAttributes;
}
}
@@ -20,7 +20,9 @@
*/
package org.apache.struts2.components;
import java.io.IOException;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
import java.io.Writer;
import java.util.Collections;
import java.util.Iterator;
@@ -32,16 +34,11 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.StrutsException;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.views.util.UrlHelper;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ValueStack;
/**
* <!-- START SNIPPET: javadoc -->
*
@@ -52,6 +49,12 @@ import com.opensymphony.xwork2.util.ValueStack;
* an Iterable all the values will be added to the URL.</p>
*
* <b>NOTE:</b>
* <p>By default request parameters will be separated using escaped ampersands (i.e., &amp;amp;).
* This is necessary for XHTML compliance, however, when using the URL generated by this tag
* with the &lt;s:property&gt; tag, the <b>escapeAmp</b> attribute should be used to disable
* ampersand escaping.</p>
*
* <b>NOTE:</b>
* <p>When includeParams is 'all' or 'get', the parameter defined in &lt;param&gt; tag will take
* precedence and will not be overriden if they exists in the parameter submitted. For
* example, in Example 3 below, if there is a id parameter in the url where the page this
@@ -67,16 +70,21 @@ import com.opensymphony.xwork2.util.ValueStack;
* <ul>
* <li>action (String) - (value or action choose either one, if both exist value takes precedence) action's name (alias) <li>
* <li>value (String) - (value or action choose either one, if both exist value takes precedence) the url itself</li>
* <li>scheme (String) - http scheme (http, https) default to the scheme this request is in</li>
* <li>scheme (String) - http scheme (http, https) defaults to the scheme this request is in</li>
* <li>namespace - action's namespace</li>
* <li>method (String) - action's method, default to execute() </li>
* <li>encode (Boolean) - url encode the generated url. Default is true</li>
* <li>includeParams (String) - The includeParams attribute may have the value 'none', 'get' or 'all'. Default is 'get'.
* <li>method (String) - action's method name, defaults to 'execute'</li>
* <li>encode (Boolean) - url encode the generated url. Defaults to 'true'.</li>
* <li>includeParams (String) - The includeParams attribute may have the value 'none', 'get' or 'all'. Defaults to 'get'.
* none - include no parameters in the URL
* get - include only GET parameters in the URL (default)
* all - include both GET and POST parameters in the URL
* </li>
* <li>includeContext (Boolean) - determine wheather to include the web app context path. Default is true.</li>
* <li>includeContext (Boolean) - Specifies whether to include the web app context path. Defaults to 'true'.</li>
* <li>escapeAmp (Boolean) - Specifies whether to escape ampersand (&amp;) to (&amp;amp;) or not. Defaults to 'true'.</li>
* <li>portletMode (String) - The resulting portlet mode.</li>
* <li>windowState (String) - The resulting portlet window state.</li>
* <li>portletUrlType (String) - Specifies if this should be a portlet render or action URL.</li>
* <li>forceAddSchemeHostAndPort (Boolean) - Specifies whether to force the addition of scheme, host and port or not.</li>
* </ul>
*
* <!-- END SNIPPET: params -->
@@ -96,7 +104,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* &lt;/s:url&gt;
*
* &lt;-- Example 3--&gt;
* &lt;s:url includeParams="get" &gt;
* &lt;s:url includeParams="get"&gt;
* &lt;s:param name="id" value="%{'22'}" /&gt;
* &lt;/s:url&gt;
*
@@ -134,10 +142,12 @@ public class URL extends ContextBean {
protected String method;
protected boolean encode = true;
protected boolean includeContext = true;
protected boolean escapeAmp = true;
protected String portletMode;
protected String windowState;
protected String portletUrlType;
protected String anchor;
protected boolean forceAddSchemeHostAndPort;
protected String urlIncludeParams;
protected ExtraParameterProvider extraParameterProvider;
protected UrlRenderer urlRenderer;
@@ -285,7 +295,7 @@ public class URL extends ContextBean {
this.windowState = windowState;
}
@StrutsTagAttribute(description="Specifies if this should be a portlet render or action URL")
@StrutsTagAttribute(description="Specifies if this should be a portlet render or action URL. Default is \"render\". To create an action URL, use \"action\".")
public void setPortletUrlType(String portletUrlType) {
this.portletUrlType = portletUrlType;
}
@@ -294,6 +304,16 @@ public class URL extends ContextBean {
public void setAnchor(String anchor) {
this.anchor = anchor;
}
@StrutsTagAttribute(description="Specifies whether to escape ampersand (&amp;) to (&amp;amp;) or not", type="Boolean", defaultValue="true")
public void setEscapeAmp(boolean escapeAmp) {
this.escapeAmp = escapeAmp;
}
@StrutsTagAttribute(description="Specifies whether to force the addition of scheme, host and port or not", type="Boolean", defaultValue="false")
public void setForceAddSchemeHostAndPort(boolean forceAddSchemeHostAndPort) {
this.forceAddSchemeHostAndPort = forceAddSchemeHostAndPort;
}
/**
@@ -1,3 +1,23 @@
/*
* $Id: AttributeMap.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 org.apache.struts2.components;
import java.io.Writer;
@@ -52,7 +52,7 @@ public abstract class BaseTemplateEngine implements TemplateEngine {
if (props == null) {
String propName = template.getDir() + "/" + template.getTheme() + "/"+getThemePropertiesFileName();
// WW-1292
// WW-1292
// let's try getting it from the filesystem
File propFile = new File(propName);
InputStream is = null;
@@ -77,6 +77,12 @@ public abstract class BaseTemplateEngine implements TemplateEngine {
props.load(is);
} catch (IOException e) {
LOG.error("Could not load " + propName, e);
} finally {
try {
is.close();
} catch(IOException io) {
LOG.warn("Unable to close input stream", io);
}
}
}
@@ -20,32 +20,28 @@
*/
package org.apache.struts2.components.template;
import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import freemarker.template.Configuration;
import freemarker.template.SimpleHash;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import freemarker.template.Configuration;
import freemarker.template.SimpleHash;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
/**
* Freemarker based template engine.
@@ -54,8 +50,8 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
static Class bodyContent = null;
private FreemarkerManager freemarkerManager;
private HashMap<String, freemarker.template.Template> templates = new HashMap<String, freemarker.template.Template>();
private HashSet<String> missingTemplates = new HashSet<String>();
private final HashMap<String, freemarker.template.Template> templates = new HashMap<String, freemarker.template.Template>();
private final HashSet<String> missingTemplates = new HashSet<String>();
private boolean freemarkerCaching = false;
static {
@@ -89,14 +85,13 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
Configuration config = freemarkerManager.getConfiguration(servletContext);
// get the list of templates we can use
List templates = templateContext.getTemplate().getPossibleTemplates(this);
List<Template> templates = templateContext.getTemplate().getPossibleTemplates(this);
// find the right template
freemarker.template.Template template = null;
String templateName = null;
Exception exception = null;
for (Iterator iterator = templates.iterator(); iterator.hasNext();) {
Template t = (Template) iterator.next();
for (Template t : templates) {
templateName = getFinalTemplateName(t);
if (freemarkerCaching) {
if (!isTemplateMissing(templateName)) {
@@ -202,14 +197,14 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
protected freemarker.template.Template findInCache(String templateName) {
synchronized(templates) {
return (freemarker.template.Template) templates.get(templateName);
return templates.get(templateName);
}
}
/**
* Enables or disables Struts caching of Freemarker templates. By default disabled.
* Set struts.freemarker.templatesCache=true to enable cache
* @param caching true if the template engine should cache freemarker template
* @param cacheTemplates "true" if the template engine should cache freemarker template
* internally
*/
@Inject(StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE)
@@ -20,19 +20,16 @@
*/
package org.apache.struts2.components.template;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.components.Include;
import org.apache.struts2.components.UIBean;
import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
import java.util.List;
/**
* JSP based template engine.
@@ -50,11 +47,10 @@ public class JspTemplateEngine extends BaseTemplateEngine {
ValueStack stack = templateContext.getStack();
stack.push(tag);
PageContext pageContext = (PageContext) stack.getContext().get(ServletActionContext.PAGE_CONTEXT);
List templates = template.getPossibleTemplates(this);
List<Template> templates = template.getPossibleTemplates(this);
Exception exception = null;
boolean success = false;
for (Iterator iterator = templates.iterator(); iterator.hasNext();) {
Template t = (Template) iterator.next();
for (Template t : templates) {
try {
Include.include(getFinalTemplateName(t), pageContext.getOut(),
pageContext.getRequest(), (HttpServletResponse) pageContext.getResponse());
@@ -59,8 +59,8 @@ public class Template implements Cloneable {
return name;
}
public List getPossibleTemplates(TemplateEngine engine) {
List list = new ArrayList(3);
public List<Template> getPossibleTemplates(TemplateEngine engine) {
List<Template> list = new ArrayList<Template>(3);
Template template = this;
String parentTheme;
list.add(template);
@@ -20,16 +20,7 @@
*/
package org.apache.struts2.components.template;
import java.io.IOException;
import java.io.Writer;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.opensymphony.xwork2.inject.Inject;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
@@ -37,7 +28,13 @@ import org.apache.struts2.views.velocity.VelocityManager;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import com.opensymphony.xwork2.inject.Inject;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Writer;
import java.util.List;
import java.util.Map;
/**
* Velocity based template engine.
@@ -64,14 +61,13 @@ public class VelocityTemplateEngine extends BaseTemplateEngine {
VelocityEngine velocityEngine = velocityManager.getVelocityEngine();
// get the list of templates we can use
List templates = templateContext.getTemplate().getPossibleTemplates(this);
List<Template> templates = templateContext.getTemplate().getPossibleTemplates(this);
// find the right template
org.apache.velocity.Template template = null;
String templateName = null;
Exception exception = null;
for (Iterator iterator = templates.iterator(); iterator.hasNext();) {
Template t = (Template) iterator.next();
for (Template t : templates) {
templateName = getFinalTemplateName(t);
try {
// try to load, and if it works, stop at the first one
@@ -38,6 +38,8 @@ import com.opensymphony.xwork2.TextProvider;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.config.ConfigurationProvider;
import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.ContainerBuilder;
import com.opensymphony.xwork2.inject.Context;
@@ -45,8 +47,6 @@ import com.opensymphony.xwork2.inject.Factory;
import com.opensymphony.xwork2.inject.Scope;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ObjectTypeDeterminer;
import com.opensymphony.xwork2.util.XWorkConverter;
import com.opensymphony.xwork2.util.location.LocatableProperties;
/**
@@ -172,6 +172,11 @@ public class BeanSelectionProvider implements ConfigurationProvider {
props.setProperty("devMode", "false");
}
String val = props.getProperty(StrutsConstants.STRUTS_ALLOW_STATIC_METHOD_ACCESS);
if (val != null) {
props.setProperty("allowStaticMethodAccess", val);
}
// TODO: This should be moved to XWork after 2.0.4
// struts.custom.i18n.resources
@@ -43,7 +43,7 @@ import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ResolverUtil;
import com.opensymphony.xwork2.util.TextUtils;
import com.opensymphony.xwork2.util.ResolverUtil.Test;
import com.opensymphony.xwork2.util.ResolverUtil.ClassTest;
import com.opensymphony.xwork2.util.location.LocatableProperties;
/**
@@ -231,7 +231,7 @@ public class ClasspathConfigurationProvider implements ConfigurationProvider {
protected void loadPackages(String[] pkgs) {
ResolverUtil<Class> resolver = new ResolverUtil<Class>();
resolver.find(new Test() {
resolver.find(new ClassTest() {
// Match Action implementations and classes ending with "Action"
public boolean matches(Class type) {
// TODO: should also find annotated classes
@@ -1 +1,23 @@
<!--
/*
* $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
*
* 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.
*/
-->
<body>Classes for Struts configuration and property handling.</body>
@@ -59,12 +59,12 @@ import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.ConfigurationProvider;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
import com.opensymphony.xwork2.conversion.ObjectTypeDeterminerFactory;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.ContainerBuilder;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.ObjectTypeDeterminer;
import com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.util.location.Location;
@@ -105,12 +105,6 @@ public class Dispatcher {
*/
private ConfigurationManager configurationManager;
/**
* Store whether portlet support is active
* (set to true by Jsr168Dispatcher).
*/
private static boolean portletSupportActive;
/**
* Store state of StrutsConstants.STRUTS_DEVMODE setting.
*/
@@ -747,12 +741,15 @@ Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyExcepti
}
} else {
try {
// send a http error response to use the servlet defined error handler
// make the exception availible to the web.xml defined error page
request.setAttribute("javax.servlet.error.exception", e);
// WW-1977: Only put errors in the request when code is a 500 error
if (code == HttpServletResponse.SC_INTERNAL_SERVER_ERROR) {
// send a http error response to use the servlet defined error handler
// make the exception availible to the web.xml defined error page
request.setAttribute("javax.servlet.error.exception", e);
// for compatibility
request.setAttribute("javax.servlet.jsp.jspException", e);
// for compatibility
request.setAttribute("javax.servlet.jsp.jspException", e);
}
// send the error response
response.sendError(code, e.getMessage());
@@ -762,23 +759,6 @@ Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyExcepti
}
}
/**
* Return <tt>true</tt>, if portlet support is active, <tt>false</tt> otherwise.
*
* @return <tt>true</tt>, if portlet support is active, <tt>false</tt> otherwise.
*/
public boolean isPortletSupportActive() {
return portletSupportActive;
}
/**
* Modify the portlet support mode.
* @param portletSupportActive <tt>true</tt> or <tt>false</tt>
*/
public static void setPortletSupportActive(boolean portletSupportActive) {
Dispatcher.portletSupportActive = portletSupportActive;
}
/**
* Search classpath for a page.
*/
@@ -33,7 +33,7 @@ import com.opensymphony.xwork2.ActionInvocation;
/**
* <!-- START SNIPPET: description -->
*
* A custom Result type for send raw data (via an InputStream) directly to the
* A custom Result type for sending raw data (via an InputStream) directly to the
* HttpServletResponse. Very useful for allowing users to download content.
*
* <!-- END SNIPPET: description -->
@@ -137,6 +137,13 @@ public abstract class StrutsResultSupport implements Result, StrutsStatics {
public void setLocation(String location) {
this.location = location;
}
/**
* Gets the location it was created with, mainly for testing
*/
public String getLocation() {
return location;
}
/**
* Returns the last parsed and encoded location value
@@ -22,11 +22,14 @@ package org.apache.struts2.dispatcher.mapper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
@@ -162,25 +165,25 @@ import com.opensymphony.xwork2.inject.Container;
*/
public class DefaultActionMapper implements ActionMapper {
static final String METHOD_PREFIX = "method:";
protected static final String METHOD_PREFIX = "method:";
static final String ACTION_PREFIX = "action:";
protected static final String ACTION_PREFIX = "action:";
static final String REDIRECT_PREFIX = "redirect:";
protected static final String REDIRECT_PREFIX = "redirect:";
static final String REDIRECT_ACTION_PREFIX = "redirect-action:";
protected static final String REDIRECT_ACTION_PREFIX = "redirect-action:";
private boolean allowDynamicMethodCalls = true;
protected boolean allowDynamicMethodCalls = true;
private boolean allowSlashesInActionNames = false;
protected boolean allowSlashesInActionNames = false;
private boolean alwaysSelectFullNamespace = false;
protected boolean alwaysSelectFullNamespace = false;
private PrefixTrie prefixTrie = null;
protected PrefixTrie prefixTrie = null;
List extensions = new ArrayList() {{ add("action");}};
protected List<String> extensions = new ArrayList<String>() {{ add("action"); add("");}};
private Container container;
protected Container container;
public DefaultActionMapper() {
prefixTrie = new PrefixTrie() {
@@ -225,7 +228,7 @@ public class DefaultActionMapper implements ActionMapper {
ServletRedirectResult redirect = new ServletRedirectResult();
container.inject(redirect);
String extension = getDefaultExtension();
if (extension != null) {
if (extension != null && extension.length() > 0) {
location += "." + extension;
}
redirect.setLocation(location);
@@ -266,7 +269,21 @@ public class DefaultActionMapper implements ActionMapper {
public void setContainer(Container container) {
this.container = container;
}
@Inject(StrutsConstants.STRUTS_ACTION_EXTENSION)
public void setExtensions(String extensions) {
if (!"".equals(extensions)) {
List<String> list = new ArrayList<String>();
Scanner scanner = new Scanner(extensions).useDelimiter(",");
while (scanner.hasNext()) {
list.add(scanner.next());
}
this.extensions = Collections.unmodifiableList(list);
} else {
this.extensions = null;
}
}
/*
* (non-Javadoc)
*
@@ -347,7 +364,7 @@ public class DefaultActionMapper implements ActionMapper {
* @param mapping
* The action mapping to populate
*/
void parseNameAndNamespace(String uri, ActionMapping mapping,
protected void parseNameAndNamespace(String uri, ActionMapping mapping,
ConfigurationManager configManager) {
String namespace, name;
int lastSlash = uri.lastIndexOf("/");
@@ -401,17 +418,22 @@ public class DefaultActionMapper implements ActionMapper {
* The action name
* @return The action name without its extension
*/
String dropExtension(String name) {
protected String dropExtension(String name) {
if (extensions == null) {
return name;
}
Iterator it = extensions.iterator();
while (it.hasNext()) {
String extension = "." + (String) it.next();
if (name.endsWith(extension)) {
name = name.substring(0, name.length() - extension.length());
return name;
}
for (String ext : extensions) {
if ("".equals(ext)) {
if (name.indexOf('.') == -1) {
return name;
}
} else {
String extension = "." + ext;
if (name.endsWith(extension)) {
name = name.substring(0, name.length() - extension.length());
return name;
}
}
}
return null;
}
@@ -419,7 +441,7 @@ public class DefaultActionMapper implements ActionMapper {
/**
* Returns null if no extension is specified.
*/
String getDefaultExtension() {
protected String getDefaultExtension() {
if (extensions == null) {
return null;
} else {
@@ -427,15 +449,6 @@ public class DefaultActionMapper implements ActionMapper {
}
}
@Inject(StrutsConstants.STRUTS_ACTION_EXTENSION)
public void setExtensions(String extensions) {
if (!"".equals(extensions)) {
this.extensions = Arrays.asList(extensions.split(","));
} else {
this.extensions = null;
}
}
/**
* Gets the uri from the request
*
@@ -443,7 +456,7 @@ public class DefaultActionMapper implements ActionMapper {
* The request
* @return The uri
*/
String getUri(HttpServletRequest request) {
protected String getUri(HttpServletRequest request) {
// handle http dispatcher includes.
String uri = (String) request
.getAttribute("javax.servlet.include.servlet_path");
@@ -486,8 +499,11 @@ public class DefaultActionMapper implements ActionMapper {
String extension = getDefaultExtension();
if (extension != null) {
if (uri.indexOf('.' + extension) == -1) {
uri.append(".").append(extension);
if (extension.length() == 0 || (extension.length() > 0 && uri.indexOf('.' + extension) == -1)) {
if (extension.length() > 0) {
uri.append(".").append(extension);
}
if (params.length() > 0) {
uri.append(params);
}
@@ -1,3 +1,23 @@
/*
* $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.dispatcher.mapper;
/**
@@ -115,6 +115,12 @@ public class JakartaMultiPartRequest implements MultiPartRequest {
} else {
log.debug("Item is a file upload");
// Skip file uploads that don't have a file name - meaning that no file was selected.
if (item.getName() == null || item.getName().trim().length() < 1) {
log.debug("No file has been uploaded for the field: " + item.getFieldName());
continue;
}
List<FileItem> values;
if (files.get(item.getFieldName()) != null) {
values = files.get(item.getFieldName());
@@ -1 +1,23 @@
<!--
/*
* $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.
*/
-->
<body>Classes to help dispatch multipart HTTP requests.</body>
@@ -1 +1,23 @@
<!--
/*
* $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.
*/
-->
<body>Classes for action dispatching in Struts (the Controller part of MVC).</body>
@@ -137,16 +137,16 @@ public class ServletConfigInterceptor extends AbstractInterceptor implements Str
((ParameterAware) action).setParameters(context.getParameters());
}
if (action instanceof RequestAware) {
((RequestAware) action).setRequest((Map) context.get("request"));
if (action instanceof ApplicationAware) {
((ApplicationAware) action).setApplication(context.getApplication());
}
if (action instanceof SessionAware) {
((SessionAware) action).setSession(context.getSession());
}
if (action instanceof ApplicationAware) {
((ApplicationAware) action).setApplication(context.getApplication());
if (action instanceof RequestAware) {
((RequestAware) action).setRequest((Map) context.get("request"));
}
if (action instanceof PrincipalAware) {
@@ -40,9 +40,9 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.apache.struts2.views.freemarker.FreemarkerResult;
import org.apache.struts2.StrutsConstants;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
@@ -67,6 +67,10 @@ import com.opensymphony.xwork2.util.ValueStack;
* the 'xml' mode is inserted at the top of the page.</li>
* <li> <code>command</code> - Tests an OGNL expression and returns the
* string result. Only used by the OGNL console.</li>
* <li><code>browser</code> Shows field values of an object specified in the
* <code>object<code> parameter (#context by default). When the <code>object<code>
* parameters is set, the '#' character needs to be escaped to '%23'. Like
* debug=browser&object=%23parameters</li>
* </ul>
* <!-- END SNIPPET: parameters -->
* <p/>
@@ -97,11 +101,14 @@ public class DebuggingInterceptor implements Interceptor {
private final static String XML_MODE = "xml";
private final static String CONSOLE_MODE = "console";
private final static String COMMAND_MODE = "command";
private final static String BROWSER_MODE = "browser";
private final static String SESSION_KEY = "org.apache.struts2.interceptor.debugging.VALUE_STACK";
private final static String DEBUG_PARAM = "debug";
private final static String OBJECT_PARAM = "object";
private final static String EXPRESSION_PARAM = "expression";
private final static String DECORATE_PARAM = "decorate";
private boolean enableXmlWithConsole = false;
@@ -140,7 +147,7 @@ public class DebuggingInterceptor implements Interceptor {
* @see com.opensymphony.xwork2.interceptor.Interceptor#invoke(com.opensymphony.xwork2.ActionInvocation)
*/
public String intercept(ActionInvocation inv) throws Exception {
boolean actionOnly = false;
boolean cont = true;
if (devMode) {
final ActionContext ctx = ActionContext.getContext();
@@ -204,11 +211,53 @@ public class DebuggingInterceptor implements Interceptor {
ex.printStackTrace();
}
cont = false;
} else if (BROWSER_MODE.equals(type)) {
actionOnly = true;
inv.addPreResultListener(
new PreResultListener() {
public void beforeResult(ActionInvocation inv, String actionResult) {
String rootObjectExpression = getParameter(OBJECT_PARAM);
if (rootObjectExpression == null)
rootObjectExpression = "#context";
String decorate = getParameter(DECORATE_PARAM);
ValueStack stack = (ValueStack) ctx.get(ActionContext.VALUE_STACK);
Object rootObject = stack.findValue(rootObjectExpression);
try {
StringWriter writer = new StringWriter();
ObjectToHTMLWriter htmlWriter = new ObjectToHTMLWriter(writer);
htmlWriter.write(rootObject, rootObjectExpression);
String html = writer.toString();
writer.close();
stack.set("debugHtml", html);
//on the first request, response can be decorated
//but we need plain text on the other ones
if ("false".equals(decorate))
ServletActionContext.getRequest().setAttribute("decorator", "none");
FreemarkerResult result = new FreemarkerResult();
result.setFreemarkerManager(freemarkerManager);
result.setContentType("text/html");
result.setLocation("/org/apache/struts2/interceptor/debugging/browser.ftl");
result.execute(inv);
} catch (Exception ex) {
log.error("Unable to create debugging console", ex);
}
}
});
}
}
}
if (cont) {
try {
return inv.invoke();
if (actionOnly) {
inv.invokeActionOnly();
return null;
} else {
return inv.invoke();
}
} finally {
if (devMode && consoleEnabled) {
final ActionContext ctx = ActionContext.getContext();
@@ -0,0 +1,175 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.interceptor.debugging;
import java.beans.IntrospectionException;
import java.io.Writer;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import ognl.OgnlException;
import com.opensymphony.xwork2.util.OgnlUtil;
/**
* Writes an object as a table, where each field can be expanded if it is an Object/Collection/Array
*
*/
class ObjectToHTMLWriter {
private PrettyPrintWriter prettyWriter;
ObjectToHTMLWriter(Writer writer) {
this.prettyWriter = new PrettyPrintWriter(writer);
this.prettyWriter.setEscape(false);
}
@SuppressWarnings("unchecked")
public void write(Object root, String expr) throws IntrospectionException,
OgnlException {
prettyWriter.startNode("table");
prettyWriter.addAttribute("class", "debugTable");
if (root instanceof Map) {
for (Iterator iterator = ((Map) root).entrySet().iterator(); iterator
.hasNext();) {
Map.Entry property = (Map.Entry) iterator.next();
String key = property.getKey().toString();
Object value = property.getValue();
writeProperty(key, value, expr);
}
} else if (root instanceof List) {
List list = (List) root;
for (int i = 0; i < list.size(); i++) {
Object element = list.get(i);
writeProperty(String.valueOf(i), element, expr);
}
} else if (root instanceof Set) {
Set set = (Set) root;
for (Iterator iterator = set.iterator(); iterator.hasNext();) {
writeProperty("", iterator.next(), expr);
}
} else if (root.getClass().isArray()) {
Object[] objects = (Object[]) root;
for (int i = 0; i < objects.length; i++) {
writeProperty(String.valueOf(i), objects[i], expr);
}
} else {
//print properties
Map<String, Object> properties = OgnlUtil.getBeanMap(root);
for (Map.Entry<String, Object> property : properties.entrySet()) {
String name = property.getKey();
Object value = property.getValue();
if ("class".equals(name))
continue;
writeProperty(name, value, expr);
}
}
prettyWriter.endNode();
}
private void writeProperty(String name, Object value, String expr) {
prettyWriter.startNode("tr");
//name cell
prettyWriter.startNode("td");
prettyWriter.addAttribute("class", "nameColumn");
prettyWriter.setValue(name);
prettyWriter.endNode();
//value cell
prettyWriter.startNode("td");
if (value != null) {
//if is is an empty collection or array, don't write a link
if (value != null &&
(isEmptyCollection(value) || isEmptyMap(value) || (value.getClass()
.isArray() && ((Object[]) value).length == 0))) {
prettyWriter.addAttribute("class", "emptyCollection");
prettyWriter.setValue("empty");
} else {
prettyWriter.addAttribute("class", "valueColumn");
writeValue(name, value, expr);
}
} else {
prettyWriter.addAttribute("class", "nullValue");
prettyWriter.setValue("null");
}
prettyWriter.endNode();
//type cell
prettyWriter.startNode("td");
if (value != null) {
prettyWriter.addAttribute("class", "typeColumn");
Class clazz = value.getClass();
prettyWriter.setValue(clazz.getName());
} else {
prettyWriter.addAttribute("class", "nullValue");
prettyWriter.setValue("unknown");
}
prettyWriter.endNode();
//close tr
prettyWriter.endNode();
}
/**
* Some maps, like AttributeMap will throw an exception when isEmpty() is called
*/
private boolean isEmptyMap(Object value) {
try {
return value instanceof Map && ((Map) value).isEmpty();
} catch (Exception e) {
return true;
}
}
/**
* Some collections might throw an exception when isEmpty() is called
*/
private boolean isEmptyCollection(Object value) {
try {
return value instanceof Collection && ((Collection) value).isEmpty();
} catch (Exception e) {
return true;
}
}
private void writeValue(String name, Object value, String expr) {
Class clazz = value.getClass();
if (clazz.isPrimitive() || Number.class.isAssignableFrom(clazz) ||
clazz.equals(String.class) || Boolean.class.equals(clazz)) {
prettyWriter.setValue(String.valueOf(value));
} else {
prettyWriter.startNode("a");
String path = expr.replaceAll("#", "%23") + "[\"" +
name.replaceAll("#", "%23") + "\"]";
prettyWriter.addAttribute("onclick", "expand(this, '" + path + "')");
prettyWriter.addAttribute("href", "javascript://nop/");
prettyWriter.setValue("Expand");
prettyWriter.endNode();
}
}
}
@@ -35,6 +35,7 @@ public class PrettyPrintWriter {
private boolean readyForNewLine;
private boolean tagIsEmpty;
private String newLine;
private boolean escape = true;
private static final char[] NULL = "&#x0;".toCharArray();
private static final char[] AMP = "&amp;".toCharArray();
@@ -125,7 +126,12 @@ public class PrettyPrintWriter {
this.writer.write(QUOT);
break;
case '\'':
this.writer.write(APOS);
//for some reason IE just doesn't like this when we use it from ObjectToHtmlWriter
//it works on FF and Opera
if (escape)
this.writer.write(APOS);
else
this.writer.write(c);
break;
case '\r':
this.writer.write(SLASH_R);
@@ -181,4 +187,12 @@ public class PrettyPrintWriter {
public void close() {
writer.close();
}
public boolean isEscape() {
return escape;
}
public void setEscape(boolean escape) {
this.escape = escape;
}
}
@@ -36,21 +36,41 @@ import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
/**
* <p>Extends the annotations validator and returns a JSON string with the
* validation errors. If validation succeeds the action is invoked.</p>
* <p>Serializes validation and action errors into JSON. This interceptor does not
* perform any validation, so it must follow the 'validation' interceptor on the stack.
* </p>
*
* <p>This stack (defined in struts-default.xml) shows how to use this interceptor with the
* 'validation' interceptor</p>
* <pre>
* &lt;interceptor-stack name="jsonValidationWorkflowStack"&gt;
* &lt;interceptor-ref name="basicStack"/&gt;
* &lt;interceptor-ref name="validation"&gt;
* &lt;param name="excludeMethods"&gt;input,back,cancel&lt;/param&gt;
* &lt;/interceptor-ref&gt;
* &lt;interceptor-ref name="jsonValidation"/&gt;
* &lt;interceptor-ref name="workflow"/&gt;
* &lt;/interceptor-stack&gt;
* </pre>
* <p>If 'validationFailedStatus' is set it will be used as the Response status
* when validation fails.</p>
*
* <p>If the request has a parameter 'struts.validateOnly' execution will return after
* validation (action won't be executed).</p>
*
* <p>A request parameter named 'enableJSONValidation' must be set to 'true' to
* use this interceptor</p>
*/
public class JSONValidationInterceptor extends AnnotationValidationInterceptor {
public class JSONValidationInterceptor extends MethodFilterInterceptor {
private static final Log LOG = LogFactory
.getLog(JSONValidationInterceptor.class);
private static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
private static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
static char[] hex = "0123456789ABCDEF".toCharArray();
private int validationFailedStatus = -1;
@@ -65,33 +85,34 @@ public class JSONValidationInterceptor extends AnnotationValidationInterceptor {
@Override
protected String doIntercept(ActionInvocation invocation) throws Exception {
//validate
doBeforeInvocation(invocation);
HttpServletResponse response = ServletActionContext.getResponse();
HttpServletRequest request = ServletActionContext.getRequest();
Object action = invocation.getAction();
String jsonEnabled = request.getParameter(VALIDATE_JSON_PARAM);
if (jsonEnabled != null && "true".equals(jsonEnabled)) {
if (action instanceof ValidationAware) {
// generate json
ValidationAware validationAware = (ValidationAware) action;
if (validationAware.hasErrors()) {
if (validationFailedStatus >= 0)
response.setStatus(validationFailedStatus);
response.getWriter().print(buildResponse(validationAware));
return Action.NONE;
}
}
if (action instanceof ValidationAware) {
// generate json
ValidationAware validationAware = (ValidationAware) action;
if (validationAware.hasErrors()) {
if (validationFailedStatus >= 0)
response.setStatus(validationFailedStatus);
response.getWriter().print(buildResponse(validationAware));
String validateOnly = request.getParameter(VALIDATE_ONLY_PARAM);
if (validateOnly != null && "true".equals(validateOnly)) {
//there were no errors
response.getWriter().print("/* {} */");
return Action.NONE;
}
}
String validateOnly = request.getParameter(VALIDATE_ONLY_PARAM);
if (validateOnly != null && "true".equals(validateOnly)) {
//there were no errors
response.getWriter().print("/* {} */");
return Action.NONE;
} else {
} else {
return invocation.invoke();
}
} else
return invocation.invoke();
}
}
/**
@@ -1,3 +1,23 @@
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.servlet.interceptor;
import org.apache.struts2.interceptor.PrincipalProxy;
@@ -22,7 +22,7 @@ package org.apache.struts2.util;
import java.util.Map;
import ognl.DefaultTypeConverter;
import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverter;
/**
* <!-- START SNIPPET: javadoc -->
@@ -39,4 +39,6 @@ public @interface StrutsTag {
String tldTagClass();
String description();
boolean allowDynamicAttributes() default false;
}
@@ -36,7 +36,7 @@ public @interface StrutsTagAttribute {
boolean required() default false;
boolean rtexprvalue() default true;
boolean rtexprvalue() default false;
String description();
@@ -105,7 +105,7 @@ import freemarker.template.TemplateModel;
*/
public class FreemarkerManager {
private static final Log log = LogFactory.getLog(FreemarkerManager.class);
private static final Log LOG = LogFactory.getLog(FreemarkerManager.class);
public static final String CONFIG_SERVLET_CONTEXT_KEY = "freemarker.Configuration";
public static final String KEY_EXCEPTION = "exception";
@@ -270,7 +270,7 @@ public class FreemarkerManager {
try {
templatePathLoader = new FileTemplateLoader(new File(templatePath));
} catch (IOException e) {
log.error("Invalid template path specified: " + e.getMessage(), e);
LOG.error("Invalid template path specified: " + e.getMessage(), e);
}
}
@@ -325,8 +325,10 @@ public class FreemarkerManager {
* @see freemarker.template.Configuration#setSettings for the definition of valid settings
*/
protected void loadSettings(ServletContext servletContext, freemarker.template.Configuration configuration) {
InputStream in = null;
try {
InputStream in = FileManager.loadFile("freemarker.properties", FreemarkerManager.class);
in = FileManager.loadFile("freemarker.properties", FreemarkerManager.class);
if (in != null) {
Properties p = new Properties();
@@ -334,9 +336,17 @@ public class FreemarkerManager {
configuration.setSettings(p);
}
} catch (IOException e) {
log.error("Error while loading freemarker settings from /freemarker.properties", e);
LOG.error("Error while loading freemarker settings from /freemarker.properties", e);
} catch (TemplateException e) {
log.error("Error while loading freemarker settings from /freemarker.properties", e);
LOG.error("Error while loading freemarker settings from /freemarker.properties", e);
} finally {
if (in != null) {
try {
in.close();
} catch(IOException io) {
LOG.warn("Unable to close input stream", io);
}
}
}
}
@@ -38,6 +38,7 @@ import org.apache.struts2.util.AttributeMap;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
@@ -55,6 +56,11 @@ public class TagUtils {
HttpServletResponse res = (HttpServletResponse) pageContext.getResponse();
Dispatcher du = Dispatcher.getInstance();
if (du == null) {
throw new ConfigurationException("The Struts dispatcher cannot be found. This is usually caused by "+
"using Struts tags without the associated filter. Struts tags are only usable when the request "+
"has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag.");
}
Map extraContext = du.createContextMap(new RequestMap(req),
req.getParameterMap(),
new SessionMap(req),
@@ -44,10 +44,12 @@ public class URLTag extends ContextBeanTag {
protected String method;
protected String encode;
protected String includeContext;
protected String escapeAmp;
protected String portletMode;
protected String windowState;
protected String portletUrlType;
protected String anchor;
protected String forceAddSchemeHostAndPort;
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
return new URL(stack, req, res);
@@ -74,6 +76,12 @@ public class URLTag extends ContextBeanTag {
if (includeContext != null) {
url.setIncludeContext(Boolean.valueOf(includeContext).booleanValue());
}
if (escapeAmp != null) {
url.setEscapeAmp(Boolean.valueOf(escapeAmp).booleanValue());
}
if (forceAddSchemeHostAndPort != null) {
url.setForceAddSchemeHostAndPort(Boolean.valueOf(forceAddSchemeHostAndPort).booleanValue());
}
}
public void setEncode(String encode) {
@@ -83,6 +91,10 @@ public class URLTag extends ContextBeanTag {
public void setIncludeContext(String includeContext) {
this.includeContext = includeContext;
}
public void setEscapeAmp(String escapeAmp) {
this.escapeAmp = escapeAmp;
}
public void setIncludeParams(String name) {
includeParams = name;
@@ -107,12 +119,15 @@ public class URLTag extends ContextBeanTag {
public void setValue(String value) {
this.value = value;
}
public void setPortletMode(String portletMode) {
this.portletMode = portletMode;
}
public void setPortletUrlType(String portletUrlType) {
this.portletUrlType = portletUrlType;
}
public void setWindowState(String windowState) {
this.windowState = windowState;
}
@@ -120,4 +135,8 @@ public class URLTag extends ContextBeanTag {
public void setAnchor(String anchor) {
this.anchor = anchor;
}
public void setForceAddSchemeHostAndPort(String forceAddSchemeHostAndPort) {
this.forceAddSchemeHostAndPort = forceAddSchemeHostAndPort;
}
}
@@ -1 +1,23 @@
<!--
/*
* $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.
*/
-->
<body>Struts's JSP tag library.</body>
@@ -20,6 +20,12 @@
*/
package org.apache.struts2.views.jsp.ui;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.DynamicAttributes;
import org.apache.struts2.components.UIBean;
import org.apache.struts2.views.jsp.ComponentTagSupport;
@@ -28,7 +34,7 @@ import org.apache.struts2.views.jsp.ComponentTagSupport;
* Abstract base class for all UI tags.
*
*/
public abstract class AbstractUITag extends ComponentTagSupport {
public abstract class AbstractUITag extends ComponentTagSupport implements DynamicAttributes {
protected String cssClass;
protected String cssStyle;
protected String title;
@@ -71,6 +77,9 @@ public abstract class AbstractUITag extends ComponentTagSupport {
protected String tooltipCssClass;
protected String tooltipIconPath;
// dynamic attributes.
protected Map<String,Object> dynamicAttributes = new HashMap<String,Object>();
protected void populateParams() {
super.populateParams();
@@ -114,6 +123,8 @@ public abstract class AbstractUITag extends ComponentTagSupport {
uiBean.setAccesskey(accesskey);
uiBean.setKey(key);
uiBean.setId(id);
uiBean.setDynamicAttributes(dynamicAttributes);
}
public void setId(String id) {
@@ -266,5 +277,9 @@ public abstract class AbstractUITag extends ComponentTagSupport {
public void setLabelSeparator(String labelSeparator) {
this.labelSeparator = labelSeparator;
}
}
public void setDynamicAttribute(String uri, String localName, Object value) throws JspException {
dynamicAttributes.put(localName, value);
}
}
@@ -18,7 +18,6 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.views.util;
import java.io.UnsupportedEncodingException;
@@ -91,6 +90,10 @@ public class UrlHelper {
}
public static String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort) {
return buildUrl(action, request, response, params, scheme, includeContext, encodeResult, forceAddSchemeHostAndPort, true);
}
public static String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp) {
StringBuffer link = new StringBuffer();
boolean changedScheme = false;
@@ -105,15 +108,24 @@ public class UrlHelper {
link.append(request.getServerName());
if (scheme != null) {
if ((scheme.equals("http") && (httpPort != DEFAULT_HTTP_PORT)) || (scheme.equals("https") && httpsPort != DEFAULT_HTTPS_PORT))
{
link.append(":");
link.append(scheme.equals("http") ? httpPort : httpsPort);
// If switching schemes, use the configured port for the particular scheme.
if (!scheme.equals(reqScheme)) {
if ((scheme.equals("http") && (httpPort != DEFAULT_HTTP_PORT)) || (scheme.equals("https") && httpsPort != DEFAULT_HTTPS_PORT)) {
link.append(":");
link.append(scheme.equals("http") ? httpPort : httpsPort);
}
// Else use the port from the current request.
} else {
int reqPort = request.getServerPort();
if ((scheme.equals("http") && (reqPort != DEFAULT_HTTP_PORT)) || (scheme.equals("https") && reqPort != DEFAULT_HTTPS_PORT)) {
link.append(":");
link.append(reqPort);
}
}
}
}
else if (
(scheme != null) && !scheme.equals(request.getScheme())) {
else if ((scheme != null) && !scheme.equals(request.getScheme())) {
changedScheme = true;
link.append(scheme);
link.append("://");
@@ -169,7 +181,11 @@ public class UrlHelper {
}
//if the action was not explicitly set grab the params from the request
buildParametersString(params, link);
if (escapeAmp) {
buildParametersString(params, link);
} else {
buildParametersString(params, link, "&");
}
String result;
@@ -1 +1,23 @@
<!--
/*
* $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.
*/
-->
<body>Miscellaneous helper classes for all views.</body>

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