[CONF] Confluence Changes in the last 24 hours
- This is a daily summary of all recent changes in Confluence. - Updated Spaces: - Apache Directory Documentation (directory) http://cwiki.apache.org/confluence/display/directory | |-Pages Added or Edited in This Space |-- Index was last edited by pamarcelot (02:48 AM). | http://cwiki.apache.org/confluence/display/directory/Index Apache Geronimo Development (GMOxDEV) http://cwiki.apache.org/confluence/display/GMOxDEV | |-Pages Added or Edited in This Space |-- Tests in Testsuite was last edited by pkashyap (06:55 PM). | http://cwiki.apache.org/confluence/display/GMOxDEV/Tests+in+Testsuite OpenEJB (OPENEJB) http://cwiki.apache.org/confluence/display/OPENEJB | |-Pages Added or Edited in This Space |-- Calculator Session Stateless Bean Example was last edited by dblevins (07:35 AM). | http://cwiki.apache.org/confluence/display/OPENEJB/Calculator+Session+Stateless+Bean+Example Apache Tiles (TILES) http://cwiki.apache.org/confluence/display/TILES | |-Pages Added or Edited in This Space |-- Index was created by mrdon (06:15 PM). | http://cwiki.apache.org/confluence/display/TILES/Index Apache Struts 2 Documentation (WW) http://cwiki.apache.org/confluence/display/WW | |-Pages Added or Edited in This Space |-- Creating and Signing a Distribution was last edited by husted (01:08 PM). | http://cwiki.apache.org/confluence/display/WW/Creating+and+Signing+a+Distribution Apache Directory Server v1.0 Documentation (DIRxSRVx10) http://cwiki.apache.org/confluence/display/DIRxSRVx10 | |-Pages Added or Edited in This Space |-- LDAP Studio was last edited by pamarcelot (02:48 AM). | http://cwiki.apache.org/confluence/display/DIRxSRVx10/LDAP+Studio Apache Tuscany (TUSCANY) http://cwiki.apache.org/confluence/display/TUSCANY | |-Pages Added or Edited in This Space |-- Index was last edited by rfeng (10:42 AM). | http://cwiki.apache.org/confluence/display/TUSCANY/Index Apache Directory LDAP Studio (DIRxSTUDIO) http://cwiki.apache.org/confluence/display/DIRxSTUDIO | |-Pages Added or Edited in This Space |-- User's Guide was last edited by pamarcelot (07:49 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/User%27s+Guide |-- Developer's Guide was last edited by pamarcelot (07:44 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Developer%27s+Guide |-- Source repository was last edited by pamarcelot (07:41 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Source+repository |-- Issue Tracking was last edited by pamarcelot (07:39 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Issue+Tracking |-- LDAP Studio Home was last edited by pamarcelot (07:35 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/LDAP+Studio+Home |-- Schemas Editor Plugin was last edited by pamarcelot (05:48 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Schemas+Editor+Plugin |-- Download Solaris was created by pamarcelot (05:46 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Download+Solaris |-- Download Linux was created by pamarcelot (05:39 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Download+Linux |-- Download Mac OS X was created by pamarcelot (05:37 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Download+Mac+OS+X |-- Download Windows was created by pamarcelot (05:43 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Download+Windows |-- Licence was created by pamarcelot (03:10 AM). | http://cwiki.apache.org/confluence/display/DIRxSTUDIO/Licence - CONFLUENCE INFORMATION This message is automatically generated by Confluence Unsubscribe or edit your notifications preferences http://cwiki.apache.org/confluence/users/viewnotifications.action If you think it was sent incorrectly contact one of the administrators http://cwiki.apache.org/confluence/administrators.action If you want more information on Confluence, or have a bug to report see http://www.atlassian.com/software/confluence
svn commit: r498085 - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/ core/src/main/java/org/apache/struts2/dispatcher/mapper/ core/src/main/resources/org/apache/struts2/ core/src/tes
Author: mrdon Date: Sat Jan 20 00:13:11 2007 New Revision: 498085 URL: http://svn.apache.org/viewvc?view=rev&rev=498085 Log: Adding support for selecting unknown namespaces for codebehind plugin WW-1663 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java struts/struts2/trunk/plugins/codebehind/src/main/resources/struts-plugin.xml Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java?view=diff&rev=498085&r1=498084&r2=498085 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsConstants.java Sat Jan 20 00:13:11 2007 @@ -145,4 +145,6 @@ /** The name of the xwork converter implementation */ public static final String STRUTS_XWORKCONVERTER = "struts.xworkConverter"; + +public static final String STRUTS_ALWAYS_SELECT_FULL_NAMESPACE = "struts.mapper.alwaysSelectFullNamespace"; } Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=diff&rev=498085&r1=498084&r2=498085 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java Sat Jan 20 00:13:11 2007 @@ -173,6 +173,8 @@ private boolean allowDynamicMethodCalls = true; private boolean allowSlashesInActionNames = false; + +private boolean alwaysSelectFullNamespace = false; private PrefixTrie prefixTrie = null; @@ -243,6 +245,11 @@ public void setSlashesInActionNames(String allow) { allowSlashesInActionNames = "true".equals(allow); } + +@Inject(StrutsConstants.STRUTS_ALWAYS_SELECT_FULL_NAMESPACE) +public void setAlwaysSelectFullNamespace(String val) { +this.alwaysSelectFullNamespace = "true".equals(val); +} @Inject public void setContainer(Container container) { @@ -264,7 +271,7 @@ return null; } -parseNameAndNamespace(uri, mapping, configManager.getConfiguration()); +parseNameAndNamespace(uri, mapping, configManager); handleSpecialParameters(request, mapping); @@ -330,7 +337,7 @@ *The action mapping to populate */ void parseNameAndNamespace(String uri, ActionMapping mapping, -Configuration config) { +ConfigurationManager configManager) { String namespace, name; int lastSlash = uri.lastIndexOf("/"); if (lastSlash == -1) { @@ -342,7 +349,13 @@ // namespace anyway if not found in root namespace. namespace = "/"; name = uri.substring(lastSlash + 1); +} else if (alwaysSelectFullNamespace) { +// Simply select the namespace as everything before the last slash +namespace = uri.substring(0, lastSlash); +name = uri.substring(lastSlash + 1); } else { +// Try to find the namespace in those defined, defaulting to "" +Configuration config = configManager.getConfiguration(); String prefix = uri.substring(0, lastSlash); namespace = ""; // Find the longest matching namespace, defaulting to the default Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties?view=diff&rev=498085&r1=498084&r2=498085 == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties (original) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties Sat Jan 20 00:13:11 2007 @@ -161,4 +161,7 @@ ### A list of tag libraries available struts.tagLibraries=s +### Whether to always select the namespace to be everything before the last slash or not +struts.mapper.alwaysSelectFullNamespace=false + ### END SNIPPET: complete_file Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher
svn commit: r498087 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java
Author: mrdon Date: Sat Jan 20 00:21:22 2007 New Revision: 498087 URL: http://svn.apache.org/viewvc?view=rev&rev=498087 Log: Fixed NPE when action mapper for current request is null WW-1662 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java?view=diff&rev=498087&r1=498086&r2=498087 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java Sat Jan 20 00:21:22 2007 @@ -27,6 +27,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.struts2.ServletActionContext; import org.apache.struts2.dispatcher.mapper.ActionMapper; +import org.apache.struts2.dispatcher.mapper.ActionMapping; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; @@ -123,8 +124,12 @@ if (isPathUrl(finalLocation)) { if (!finalLocation.startsWith("/")) { -String namespace = actionMapper.getMapping( -request, Dispatcher.getInstance().getConfigurationManager()).getNamespace(); +ActionMapping mapping = actionMapper.getMapping( +request, Dispatcher.getInstance().getConfigurationManager()); +String namespace = null; +if (mapping != null) { +namespace = mapping.getNamespace(); +} if ((namespace != null) && (namespace.length() > 0) && (!"/".equals(namespace))) { finalLocation = namespace + "/" + finalLocation;
svn commit: r498088 - /struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl
Author: mrdon Date: Sat Jan 20 00:24:28 2007 New Revision: 498088 URL: http://svn.apache.org/viewvc?view=rev&rev=498088 Log: Fixed problem in error report when error occurs deeper than action level WW-1660 Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl?view=diff&rev=498088&r1=498087&r2=498088 == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl (original) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl Sat Jan 20 00:24:28 2007 @@ -42,11 +42,19 @@ <#if (msgs?size > 1)> <#list msgs as msg> -${msg} +<#if (msg?is_method)> +${msg[0]} +<#else> +${msg} + <#elseif (msgs?size == 1)> -${msgs[0]} +<#if (msg?is_method)> +${msgs[0][0]} +<#else> +${msgs[0]} +
svn commit: r498090 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
Author: mrdon Date: Sat Jan 20 00:33:19 2007 New Revision: 498090 URL: http://svn.apache.org/viewvc?view=rev&rev=498090 Log: Fixed double slash when portlet namespace is defined WW-1641 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java?view=diff&rev=498090&r1=498089&r2=498090 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java Sat Jan 20 00:33:19 2007 @@ -246,10 +246,12 @@ } StringBuffer fullPath = new StringBuffer(); if (TextUtils.stringSet(portletNamespace)) { -fullPath.append(portletNamespace + "/"); +fullPath.append(portletNamespace); } if (TextUtils.stringSet(namespace)) { -fullPath.append(namespace + "/"); +fullPath.append(namespace).append("/"); +} else { +fullPath.append("/"); } fullPath.append(defaultAction); ActionMapping mapping = new ActionMapping();
svn commit: r498091 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/UIBean.java test/java/org/apache/struts2/components/UIBeanTest.java
Author: mrdon Date: Sat Jan 20 00:44:14 2007 New Revision: 498091 URL: http://svn.apache.org/viewvc?view=rev&rev=498091 Log: Fixed parsing of name for ognl when no id is specified and using name value WW-1617 Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/components/UIBeanTest.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?view=diff&rev=498091&r1=498090&r2=498091 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Sat Jan 20 00:44:14 2007 @@ -872,9 +872,10 @@ addParameter("id", id); } } else if (form != null) { -addParameter("id", form.getParameters().get("id") + "_" + escape(name)); +addParameter("id", form.getParameters().get("id") + "_" ++ escape(name != null ? findString(name) : null)); } else { -addParameter("id", escape(name)); +addParameter("id", escape(name != null ? findString(name) : null)); } } Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/components/UIBeanTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/components/UIBeanTest.java?view=diff&rev=498091&r1=498090&r2=498091 == --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/components/UIBeanTest.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/components/UIBeanTest.java Sat Jan 20 00:44:14 2007 @@ -48,6 +48,22 @@ assertEquals("txtFldId", txtFld.getParameters().get("id")); } + +public void testPopulateComponentHtmlIdWithOgnl() throws Exception { +ValueStack stack = ValueStackFactory.getFactory().createValueStack(); +MockHttpServletRequest req = new MockHttpServletRequest(); +MockHttpServletResponse res = new MockHttpServletResponse(); + +Form form = new Form(stack, req, res); +form.getParameters().put("id", "formId"); + +TextField txtFld = new TextField(stack, req, res); +txtFld.setName("txtFldName%{'1'}"); + +txtFld.populateComponentHtmlId(form); + +assertEquals("formId_txtFldName1", txtFld.getParameters().get("id")); +} public void testPopulateComponentHtmlId2() throws Exception { ValueStack stack = ValueStackFactory.getFactory().createValueStack();
svn commit: r498097 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet: dispatcher/Jsr168Dispatcher.java util/HttpServletRequestMock.java
Author: mrdon Date: Sat Jan 20 02:15:15 2007 New Revision: 498097 URL: http://svn.apache.org/viewvc?view=rev&rev=498097 Log: Improved the portlet dispatching to use the configured action mapper. This means that the special prefixes like method: will now work for submitted forms among other things WW-1653 Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/util/HttpServletRequestMock.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java?view=diff&rev=498097&r1=498096&r2=498097 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java Sat Jan 20 02:15:15 2007 @@ -36,15 +36,18 @@ import javax.portlet.PortletResponse; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; +import javax.servlet.http.HttpServletRequestWrapper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts2.StrutsConstants; +import org.apache.struts2.StrutsException; import org.apache.struts2.StrutsStatics; import org.apache.struts2.dispatcher.ApplicationMap; import org.apache.struts2.dispatcher.Dispatcher; import org.apache.struts2.dispatcher.RequestMap; import org.apache.struts2.dispatcher.SessionMap; +import org.apache.struts2.dispatcher.mapper.ActionMapper; import org.apache.struts2.dispatcher.mapper.ActionMapping; import org.apache.struts2.portlet.PortletActionConstants; import org.apache.struts2.portlet.PortletApplicationMap; @@ -52,6 +55,7 @@ import org.apache.struts2.portlet.PortletSessionMap; import org.apache.struts2.portlet.context.PortletActionContext; import org.apache.struts2.portlet.context.ServletContextHolderListener; +import org.apache.struts2.portlet.util.HttpServletRequestMock; import org.apache.struts2.util.AttributeMap; import com.opensymphony.xwork2.util.FileManager; @@ -168,6 +172,8 @@ private String portletNamespace = null; private Dispatcher dispatcherUtils; + +private ActionMapper actionMapper; /** * Initialize the portlet with the init parameters from portlet.xml @@ -220,6 +226,8 @@ if ("true".equalsIgnoreCase(container.getInstance(String.class, StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD))) { FileManager.setReloadingConfigs(true); } + +actionMapper = container.getInstance(ActionMapper.class); } /** @@ -401,6 +409,7 @@ + ", namespace = " + namespace); ActionProxy proxy = factory.createActionProxy(namespace, actionName, extraContext); +proxy.setMethod(mapping.getMethod()); request.setAttribute("struts.valueStack", proxy.getInvocation() .getStack()); if (PortletActionConstants.RENDER_PHASE.equals(phase) @@ -455,26 +464,31 @@ * @param request the PortletRequest object. * @return the namespace of the action. */ -protected ActionMapping getActionMapping(PortletRequest request) { -ActionMapping mapping = new ActionMapping(); +protected ActionMapping getActionMapping(final PortletRequest request) { +ActionMapping mapping = null; +String actionPath = null; if (resetAction(request)) { mapping = (ActionMapping) actionMap.get(request.getPortletMode()); } else { -String actionPath = request.getParameter(ACTION_PARAM); +actionPath = request.getParameter(ACTION_PARAM); if (!TextUtils.stringSet(actionPath)) { mapping = (ActionMapping) actionMap.get(request .getPortletMode()); } else { -String namespace = ""; -String action = actionPath; -int idx = actionPath.lastIndexOf('/'); -if (idx >= 0) { -namespace = actionPath.substring(0, idx); -action = actionPath.substring(idx + 1); -} -mapping.setName(action); -mapping.setNamespace(namespace); + +// Use the usual action mapper, but it is expecting an action extension +// on the uri, so we add the default one, which should be ok as the +// portlet is a portlet first, a servlet second +HttpServletRequestMock httpRequest = new HttpServletRequestMock() +.setServletPath(actionPath + ".ac
svn commit: r498115 - /struts/struts2/trunk/src/site/site.xml
Author: husted Date: Sat Jan 20 06:49:03 2007 New Revision: 498115 URL: http://svn.apache.org/viewvc?view=rev&rev=498115 Log: WW-1650 Update release notes for Struts 2.0.4 Modified: struts/struts2/trunk/src/site/site.xml Modified: struts/struts2/trunk/src/site/site.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/src/site/site.xml?view=diff&rev=498115&r1=498114&r2=498115 == --- struts/struts2/trunk/src/site/site.xml (original) +++ struts/struts2/trunk/src/site/site.xml Sat Jan 20 06:49:03 2007 @@ -49,7 +49,7 @@ @@ -100,14 +100,14 @@ href="struts2-plugins/struts2-jasperreports-plugin/apidocs/index.html" /> - - + +
svn commit: r498147 - /struts/struts2/trunk/core/pom.xml
Author: wsmoak Date: Sat Jan 20 10:07:15 2007 New Revision: 498147 URL: http://svn.apache.org/viewvc?view=rev&rev=498147 Log: Revert r498071 and put struts-annotations back in compile scope, but mark it optional to exclude it from transitive dependency resolution. Thanks to Musachy Barroso for catching this. WW-1650 Modified: struts/struts2/trunk/core/pom.xml Modified: struts/struts2/trunk/core/pom.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/pom.xml?view=diff&rev=498147&r1=498146&r2=498147 == --- struts/struts2/trunk/core/pom.xml (original) +++ struts/struts2/trunk/core/pom.xml Sat Jan 20 10:07:15 2007 @@ -19,13 +19,6 @@ - - -org.apache.struts -struts-annotations -1.0-SNAPSHOT - - maven-dependency-plugin @@ -468,5 +461,16 @@ test + + +org.apache.struts +struts-annotations +1.0-SNAPSHOT +true + + +
svn commit: r498186 - in /struts/struts2/trunk/core/src: main/resources/org/apache/struts2/default.properties test/java/org/apache/struts2/config/SettingsTest.java
Author: mrdon Date: Sat Jan 20 13:59:04 2007 New Revision: 498186 URL: http://svn.apache.org/viewvc?view=rev&rev=498186 Log: Removing unused properties WW-1650 Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/SettingsTest.java Modified: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties?view=diff&rev=498186&r1=498185&r2=498186 == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties (original) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/default.properties Sat Jan 20 13:59:04 2007 @@ -155,12 +155,6 @@ ### A list of configuration files automatically loaded by Struts struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml -### A list of template engines available -struts.templateEngines=ftl,jsp,vm - -### A list of tag libraries available -struts.tagLibraries=s - ### Whether to always select the namespace to be everything before the last slash or not struts.mapper.alwaysSelectFullNamespace=false Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/SettingsTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/SettingsTest.java?view=diff&rev=498186&r1=498185&r2=498186 == --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/SettingsTest.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/SettingsTest.java Sat Jan 20 13:59:04 2007 @@ -48,7 +48,7 @@ assertEquals("de", locale.getLanguage()); int count = getKeyCount(); -assertEquals(36, count); +assertEquals(35, count); } public void testDefaultResourceBundlesLoaded() {
svn commit: r498203 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/interceptor/validation/ main/resources/ test/java/org/apache/struts2/interceptor/validation/
Author: mrdon Date: Sat Jan 20 14:55:16 2007 New Revision: 498203 URL: http://svn.apache.org/viewvc?view=rev&rev=498203 Log: Adding @SkipValidation annotation and associated interceptor WW-1664 Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/SkipValidation.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/validation/ struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptorTest.java Modified: struts/struts2/trunk/core/src/main/resources/struts-default.xml Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java?view=auto&rev=498203 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java (added) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/AnnotationValidationInterceptor.java Sat Jan 20 14:55:16 2007 @@ -0,0 +1,68 @@ +/* + * $Id: Result.java 490514 2006-12-27 15:25:48Z ddewolf $ + * + * 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.validation; + +import java.lang.reflect.Method; + +import com.opensymphony.xwork2.ActionInvocation; +import com.opensymphony.xwork2.validator.ValidationInterceptor; + +/** + * Extends the xwork validation interceptor to also check for a @SkipValidation + * annotation, and if found, don't validate this action method + */ +public class AnnotationValidationInterceptor extends ValidationInterceptor { + +/** Auto-generated serialization id */ +private static final long serialVersionUID = 1813272797367431184L; + +protected String doIntercept(ActionInvocation invocation) throws Exception { + +Object action = invocation.getAction(); +if (action != null) { +Method method = getActionMethod(action.getClass(), invocation.getProxy().getMethod()); +SkipValidation skip = (SkipValidation) method.getAnnotation(SkipValidation.class); +if (skip != null) { +return invocation.invoke(); +} +} + +return super.doIntercept(invocation); +} + +// FIXME: This is copied from DefaultActionInvocation but should be exposed through the interface +protected Method getActionMethod(Class actionClass, String methodName) throws NoSuchMethodException { +Method method; +try { +method = actionClass.getMethod(methodName, new Class[0]); +} catch (NoSuchMethodException e) { +// hmm -- OK, try doXxx instead +try { +String altMethodName = "do" + methodName.substring(0, 1).toUpperCase() + methodName.substring(1); +method = actionClass.getMethod(altMethodName, new Class[0]); +} catch (NoSuchMethodException e1) { +// throw the original one +throw e; +} +} +return method; +} +} Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/SkipValidation.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/SkipValidation.java?view=auto&rev=498203 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/SkipValidation.java (added) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/SkipValidation.java Sat Jan 20 14:55:16 2007 @@ -0,0 +1,38 @@ +/* + * $Id: Result.java 490514 2006-12-27 15:25:48Z ddewolf $ + * + * Licensed to the
svn commit: r498215 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/config/ main/java/org/apache/struts2/dispatcher/ main/java/org/apache/struts2/portlet/dispatcher/ test/java/org/ap
Author: mrdon Date: Sat Jan 20 15:59:10 2007 New Revision: 498215 URL: http://svn.apache.org/viewvc?view=rev&rev=498215 Log: Split properties loading so that struts.properties can override plugin properties WW-1666 Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultSettings.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/LegacyPropertiesConfigurationProvider.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/config/SettingsTest.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/portlet/dispatcher/Jsr168DispatcherTest.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java?view=diff&rev=498215&r1=498214&r2=498215 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java Sat Jan 20 15:59:10 2007 @@ -162,6 +162,10 @@ if ("true".equalsIgnoreCase(props.getProperty(StrutsConstants.STRUTS_DEVMODE))) { props.setProperty(StrutsConstants.STRUTS_I18N_RELOAD, "true"); props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true"); +// Convert struts properties into ones that xwork expects +props.setProperty("devMode", "true"); +} else { +props.setProperty("devMode", "false"); } } Added: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java?view=auto&rev=498215 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java (added) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultPropertiesProvider.java Sat Jan 20 15:59:10 2007 @@ -0,0 +1,52 @@ +/* + * $Id: DefaultActionMapper.java 498085 2007-01-20 08:13:11Z mrdon $ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.config; + +import com.opensymphony.xwork2.config.Configuration; +import com.opensymphony.xwork2.config.ConfigurationException; +import com.opensymphony.xwork2.inject.ContainerBuilder; +import com.opensymphony.xwork2.util.location.LocatableProperties; + +/** + * Loads the default properties, separate from the usual struts.properties loading + */ +public class DefaultPropertiesProvider extends LegacyPropertiesConfigurationProvider { + +public void destroy() { +} + +public void init(Configuration configuration) throws ConfigurationException { +} + +public void register(ContainerBuilder builder, LocatableProperties props) +throws ConfigurationException { + +Settings defaultSettings = null; +try { +defaultSettings = new PropertiesSettings("org/apache/struts2/default"); +} catch (Exception e) { +throw new ConfigurationException("Could not find or error in org/apache/struts2/default.properties", e); +} + +loadSettings(props, defaultSettings); +} + +} Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultSettings.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/DefaultSettings.java?view=diff&rev=498215&r1=498214&r2=498215
svn commit: r498243 [3/3] - in /struts/sandbox/trunk/mailreader-course/struts2: ./ browse/ browse/src/java/ browse/src/webapp/WEB-INF/ hello/ hello/src/java/ hello/src/webapp/WEB-INF/ localize/ locali
Modified: struts/sandbox/trunk/mailreader-course/struts2/subscribe/subscribe.iml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/subscribe/subscribe.iml?view=diff&rev=498243&r1=498242&r2=498243 == --- struts/sandbox/trunk/mailreader-course/struts2/subscribe/subscribe.iml (original) +++ struts/sandbox/trunk/mailreader-course/struts2/subscribe/subscribe.iml Sat Jan 20 20:32:26 2007 @@ -1,10 +1,11 @@ + - - + + - + @@ -12,256 +13,41 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - + + - + - - jar://$MODULE_DIR$/../lib/commons-digester-1.6.jar!/ + - + - - jar://$MODULE_DIR$/../lib/commons-logging-1.0.4.jar!/ + - - - - jar://$MODULE_DIR$/../lib/freemarker-2.3.4.jar!/ - - - - - jar://$MODULE_DIR$/../lib/ognl-2.6.7.jar!/ - - - - - jar://$MODULE_DIR$/../lib/oscore-2.2.4.jar!/ - - - - - jar://$MODULE_DIR$/../lib/spring-aop-1.2.6.jar!/ - - - - - jar://$MODULE_DIR$/../lib/spring-beans-1.2.6.jar!/ - - - - - jar://$MODULE_DIR$/../lib/spring-context-1.2.6.jar!/ - - - - - jar://$MODULE_DIR$/../lib/spring-core-1.2.6.jar!/ - - - - - jar://$MODULE_DIR$/../lib/spring-web-1.2.6.jar!/ - - - - - jar://$MODULE_DIR$/../lib/struts-mailreader-dao-1.3.5-SNAPSHOT.jar!/ - - - - - jar://$MODULE_DIR$/../lib/struts2-api-2.0.0-SNAPSHOT.jar!/ - - - - - jar://$MODULE_DIR$/../lib/struts2-core-2.0.0-SNAPSHOT.jar!/ + + + - + - - jar://$MODULE_DIR$/../lib/struts2-extras-2.0.0-SNAPSHOT.jar!/ - - - - - jar://$MODULE_DIR$/../lib/xwork-2.0-SNAPSHOT.jar!/ + + @@ -273,8 +59,6 @@ - - - + Modified: struts/sandbox/trunk/mailreader-course/struts2/theme/src/java/struts.xml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/theme/src/java/struts.xml?view=diff&rev=498243&r1=498242&r2=498243 == --- struts/sandbox/trunk/mailreader-course/struts2/theme/src/java/struts.xml (original) +++ struts/sandbox/trunk/mailreader-course/struts2/theme/src/java/struts.xml Sat Jan 20 20:32:26 2007 @@ -4,6 +4,9 @@ "http://struts.apache.org/dtds/struts-2.0.dtd";> + + + Modified: struts/sandbox/trunk/mailreader-course/struts2/theme/src/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/theme/src/webapp/WEB-INF/web.xml?view=diff&rev=498243&r1=498242&r2=498243 == --- struts/sandbox/trunk/mailreader-course/struts2/theme/src/webapp/WEB-INF/web.xml (original) +++ struts/sandbox/trunk/mailreader-course/struts2/theme/src/webapp/WEB-INF/web.xml Sat Jan 20 20:32:26 2007 @@ -4,38 +4,32 @@ Struts 2 Mailreader - -contextConfigLocation -classpath*:applicationContext*.xml - - + +struts-cleanup + org.apache.struts2.dispatcher