[CONF] Confluence Changes in the last 24 hours
- This is a daily summary of all recent changes in Confluence. - Updated Spaces: - OpenJPA (openjpa) http://cwiki.apache.org/confluence/display/openjpa | |-Pages Added or Edited in This Space |-- Downloads was last edited by mprudhom (08:40 PM). | http://cwiki.apache.org/confluence/display/openjpa/Downloads Apache Felix (FELIX) http://cwiki.apache.org/confluence/display/FELIX | |-Pages Added or Edited in This Space |-- How to use iPOJO Annotations was last edited by clement.escoffier (08:31 AM). | http://cwiki.apache.org/confluence/display/FELIX/How+to+use+iPOJO+Annotations |-- iPOJO Tutorial (0.7.3) was last edited by clement.escoffier (08:29 AM). | http://cwiki.apache.org/confluence/display/FELIX/iPOJO+Tutorial+%280.7.3%29 |-- Maven Scr Plugin (Sandbox) was last edited by [EMAIL PROTECTED] (08:13 AM). | http://cwiki.apache.org/confluence/display/FELIX/Maven+Scr+Plugin+%28Sandbox%29 |-- iPOJO was last edited by clement.escoffier (08:02 AM). | http://cwiki.apache.org/confluence/display/FELIX/iPOJO |-- iPOJO Ant Task was created by clement.escoffier (06:27 AM). | http://cwiki.apache.org/confluence/display/FELIX/iPOJO+Ant+Task |-- iPOJO Maven Plug-in was last edited by clement.escoffier (05:28 AM). | http://cwiki.apache.org/confluence/display/FELIX/iPOJO+Maven+Plug-in Apache Camel (CAMEL) http://cwiki.apache.org/confluence/display/CAMEL | |-Pages Added or Edited in This Space |-- Book In One Page was created by jstrachan (12:01 PM). | http://cwiki.apache.org/confluence/display/CAMEL/Book+In+One+Page |-- News was created by jstrachan (06:29 AM). | http://cwiki.apache.org/confluence/display/CAMEL/News |-- Navigation was last edited by jstrachan (06:28 AM). | http://cwiki.apache.org/confluence/display/CAMEL/Navigation |-- Index was last edited by jstrachan (06:24 AM). | http://cwiki.apache.org/confluence/display/CAMEL/Index |-- Camel 1.1.0 Release was last edited by jstrachan (05:09 AM). | http://cwiki.apache.org/confluence/display/CAMEL/Camel+1.1.0+Release Apache FTPServer Project (FTPSERVER) http://cwiki.apache.org/confluence/display/FTPSERVER | |-Pages Added or Edited in This Space |-- TLS-SSL Support was last edited by ngn (02:30 PM). | http://cwiki.apache.org/confluence/display/FTPSERVER/TLS-SSL+Support |-- Documentation was last edited by ngn (02:19 PM). | http://cwiki.apache.org/confluence/display/FTPSERVER/Documentation |-- Listeners was last edited by ngn (02:19 PM). | http://cwiki.apache.org/confluence/display/FTPSERVER/Listeners Apache ActiveMQ CPP (AMQCPP) http://cwiki.apache.org/confluence/display/AMQCPP | |-Pages Added or Edited in This Space |-- Index was last edited by tabish121 (03:55 PM). | http://cwiki.apache.org/confluence/display/AMQCPP/Index Apache Geronimo Project Management (GMOxPMGT) http://cwiki.apache.org/confluence/display/GMOxPMGT | |-Pages Added or Edited in This Space |-- Release Eclipse Plugin Process was created by mcconne (12:34 PM). | http://cwiki.apache.org/confluence/display/GMOxPMGT/Release+Eclipse+Plugin+Process |-- SNAPSHOT dependencies that need to be released for Geronimo 2.0 was last edited by drwoods (07:39 AM). | http://cwiki.apache.org/confluence/display/GMOxPMGT/SNAPSHOT+dependencies+that+need+to+be+released+for+Geronimo+2.0 Apache Struts 2 Documentation (WW) http://cwiki.apache.org/confluence/display/WW | |-Pages Added or Edited in This Space |-- Release Notes 2.0.10 was created by [EMAIL PROTECTED] (12:57 PM). | http://cwiki.apache.org/confluence/display/WW/Release+Notes+2.0.10 |-- JasperReports Tutorial was last edited by [EMAIL PROTECTED] (09:16 AM). | http://cwiki.apache.org/confluence/display/WW/JasperReports+Tutorial |-- Handling File Uploads was last edited by [EMAIL PROTECTED] (09:10 AM). | http://cwiki.apache.org/confluence/display/WW/Handling+File+Uploads |-- Velocity Tags was last edited by [EMAIL PROTECTED] (09:09 AM). | http://cwiki.apache.org/confluence/display/WW/Velocity+Tags |-- Access to ValueStack from JSPs was last edited by [EMAIL PROTECTED] (09:07 AM). | http://cwiki.apache.org/confluence/display/WW/Access+to+ValueStack+from+JSPs Tuscany Wiki (TUSCANYWIKI) http://cwiki.apache.org/confluence/display/TUSCANYWIKI | |-Pages Added or Edited in This Space |-- Tuscany SCA News Page was last edited by haleh (04:15 PM). | http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+SCA+News+Page Apache MINA (MINA) http://cwiki.apache.org/confluence/display/MINA | |-Pages Added or Edited in This Space |-- Contributors was last edited by trustin (05:19 PM). | http://cwiki.apache.org/confluence/display/MINA/Contributors |-- Quick Start Guide was last edited by elihusmails (04:57 PM). | http://cwiki.apache.org/confluence/display/
svn commit: r566092 - in /struts/struts2/trunk/plugins/portlet/src: main/java/org/apache/struts2/portlet/ main/java/org/apache/struts2/portlet/interceptor/ main/java/org/apache/struts2/portlet/result/
Author: nilsga Date: Wed Aug 15 03:22:56 2007 New Revision: 566092 URL: http://svn.apache.org/viewvc?view=rev&rev=566092 Log: WW-2105 Do not copy the valuestack from event to render when the request cycle has been proper PRG Added: struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptorTest.java Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java?view=diff&rev=566092&r1=566091&r2=566092 == --- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java (original) +++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java Wed Aug 15 03:22:56 2007 @@ -120,4 +120,9 @@ * Key for the dispatch instruction for the [EMAIL PROTECTED] DispatcherServlet} */ String DISPATCH_TO = "struts.portlet.dispatchTo"; + + /** +* Session key where the value stack from the event phase is stored. +*/ + String STACK_FROM_EVENT_PHASE = "struts.portlet.valueStackFromEventPhase"; } Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java?view=diff&rev=566092&r1=566091&r2=566092 == --- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java (original) +++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletStateInterceptor.java Wed Aug 15 03:22:56 2007 @@ -28,6 +28,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts2.portlet.PortletActionConstants; +import org.apache.struts2.portlet.dispatcher.DirectRenderFromEventAction; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; @@ -58,27 +59,39 @@ } } + @SuppressWarnings("unchecked") private void saveStack(ActionInvocation invocation) { Map session = invocation.getInvocationContext().getSession(); - session.put("struts.portlet.valueStackFromEventPhase", invocation.getStack()); + session.put(STACK_FROM_EVENT_PHASE, invocation.getStack()); ActionResponse actionResponse = (ActionResponse) invocation.getInvocationContext().get(RESPONSE); actionResponse.setRenderParameter(EVENT_ACTION, "true"); } + @SuppressWarnings("unchecked") private void restoreStack(ActionInvocation invocation) { RenderRequest request = (RenderRequest) invocation.getInvocationContext().get(REQUEST); if (TextUtils.stringSet(request.getParameter(EVENT_ACTION))) { - LOG.debug("Restoring value stack from event phase"); - ValueStack oldStack = (ValueStack) invocation.getInvocationContext().getSession().get( - "struts.portlet.valueStackFromEventPhase"); - if (oldStack != null) { - CompoundRoot oldRoot = oldStack.getRoot(); - ValueStack currentStack = invocation.getStack(); - CompoundRoot root = currentStack.getRoot(); - root.addAll(oldRoot); - LOG.debug("Restored stack"); + Map session = invocation.getInvocationContext().getSession(); + if(!isProperPrg(invocation)) { + LOG.debug("Restoring value stack from event phase"); + ValueStack oldStack = (ValueStack) invocation.getInvocationContext().getSession().get( + STACK_FROM_EVENT_PHASE); + if (oldStack != null) { + CompoundRoot oldRoot = oldStack.getRoot(); + ValueStack currentStack = invocation.getStack(); +
svn commit: r566190 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/validation.js
Author: jholmes Date: Wed Aug 15 07:35:19 2007 New Revision: 566190 URL: http://svn.apache.org/viewvc?view=rev&rev=566190 Log: WW-2058 Client side validation in xhtml template and clearErrorMessages not working in firefox with hidden fields Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/validation.js Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/validation.js URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/validation.js?view=diff&rev=566190&r1=566189&r2=566190 == --- struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/validation.js (original) +++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/validation.js Wed Aug 15 07:35:19 2007 @@ -21,11 +21,19 @@ function clearErrorMessages(form) { -var table = form.childNodes[1]; -if( typeof table == "undefined" ) { -table = form.childNodes[0]; +// get field table +var table; +for (var i = 0; i < form.childNodes.length; i++) { +if (form.childNodes[i].tagName != null && form.childNodes[i].tagName.toLowerCase() == 'table') { +table = form.childNodes[i]; +break; +} } +if (table == null) { +return; +} + // clear out any rows with an "errorFor" attribute var rows = table.rows; var rowsToDelete = new Array();
svn commit: r566192 - /struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js
Author: jholmes Date: Wed Aug 15 07:36:25 2007 New Revision: 566192 URL: http://svn.apache.org/viewvc?view=rev&rev=566192 Log: WW-2058 Client side validation in xhtml template and clearErrorMessages not working in firefox with hidden fields Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js?view=diff&rev=566192&r1=566191&r2=566192 == --- struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js (original) +++ struts/struts2/trunk/core/src/main/resources/template/xhtml/validation.js Wed Aug 15 07:36:25 2007 @@ -25,9 +25,17 @@ function clearErrorMessagesXHTML(form) { -var table = form.childNodes[1]; -if( typeof table == "undefined" ) { -table = form.childNodes[0]; +// get field table +var table; +for (var i = 0; i < form.childNodes.length; i++) { +if (form.childNodes[i].tagName != null && form.childNodes[i].tagName.toLowerCase() == 'table') { +table = form.childNodes[i]; +break; +} +} + +if (table == null) { +return; } // clear out any rows with an "errorFor" attribute
svn commit: r566209 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/form-close-validate.ftl
Author: jholmes Date: Wed Aug 15 07:55:54 2007 New Revision: 566209 URL: http://svn.apache.org/viewvc?view=rev&rev=566209 Log: WW-2103 Invalid Javascript generated for StringLength validator Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/form-close-validate.ftl Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/form-close-validate.ftl URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/form-close-validate.ftl?view=diff&rev=566209&r1=566208&r2=566209 == --- struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/form-close-validate.ftl (original) +++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/xhtml/form-close-validate.ftl Wed Aug 15 07:55:54 2007 @@ -68,10 +68,8 @@ while (value.substring(value.length-1, value.length) == ' ') value = value.substring(0, value.length-1); -if(value.length > 0 && ( -(${validator.minLength} > -1 && value.length < ${validator.minLength}) || -(${validator.maxLength} > -1 && value.length > ${validator.maxLength}) -)) { +if ((${validator.minLength?string} > -1 && value.length < ${validator.minLength?string}) || +(${validator.maxLength?string} > -1 && value.length > ${validator.maxLength?string})) { addError(field, error); errors = true; } @@ -94,9 +92,9 @@ <#elseif validator.validatorType = "int"> if (field.value != null) { if (<#if validator.min?exists>parseInt(field.value) < - ${validator.min}<#else>false || + ${validator.min?string}<#else>false || <#if validator.max?exists>parseInt(field.value) > - ${validator.max}<#else>false) { + ${validator.max?string}<#else>false) { addError(field, error); errors = true; } @@ -104,10 +102,10 @@ <#elseif validator.validatorType = "double"> if (field.value != null) { var value = parseFloat(field.value); -if (<#if validator.minInclusive?exists>value < ${validator.minInclusive}<#else>false || -<#if validator.maxInclusive?exists>value > ${validator.maxInclusive}<#else>false || -<#if validator.minExclusive?exists>value <= ${validator.minExclusive}<#else>false || -<#if validator.maxExclusive?exists>value >= ${validator.maxExclusive}<#else>false) { +if (<#if validator.minInclusive?exists>value < ${validator.minInclusive?string}<#else>false || +<#if validator.maxInclusive?exists>value > ${validator.maxInclusive?string}<#else>false || +<#if validator.minExclusive?exists>value <= ${validator.minExclusive?string}<#else>false || +<#if validator.maxExclusive?exists>value >= ${validator.maxExclusive?string}<#else>false) { addError(field, error); errors = true; }
svn commit: r566210 - /struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
Author: jholmes Date: Wed Aug 15 07:56:06 2007 New Revision: 566210 URL: http://svn.apache.org/viewvc?view=rev&rev=566210 Log: WW-2103 Invalid Javascript generated for StringLength validator Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl?view=diff&rev=566210&r1=566209&r2=566210 == --- struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl (original) +++ struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl Wed Aug 15 07:56:06 2007 @@ -68,10 +68,8 @@ while (value.substring(value.length-1, value.length) == ' ') value = value.substring(0, value.length-1); -if(value.length > 0 && ( -(${validator.minLength} > -1 && value.length < ${validator.minLength}) || -(${validator.maxLength} > -1 && value.length > ${validator.maxLength}) -)) { +if ((${validator.minLength?string} > -1 && value.length < ${validator.minLength?string}) || +(${validator.maxLength?string} > -1 && value.length > ${validator.maxLength?string})) { addError(field, error); errors = true; } @@ -94,9 +92,9 @@ <#elseif validator.validatorType = "int"> if (field.value != null) { if (<#if validator.min?exists>parseInt(field.value) < - ${validator.min}<#else>false || + ${validator.min?string}<#else>false || <#if validator.max?exists>parseInt(field.value) > - ${validator.max}<#else>false) { + ${validator.max?string}<#else>false) { addError(field, error); errors = true; } @@ -104,10 +102,10 @@ <#elseif validator.validatorType = "double"> if (field.value != null) { var value = parseFloat(field.value); -if (<#if validator.minInclusive?exists>value < ${validator.minInclusive}<#else>false || -<#if validator.maxInclusive?exists>value > ${validator.maxInclusive}<#else>false || -<#if validator.minExclusive?exists>value <= ${validator.minExclusive}<#else>false || -<#if validator.maxExclusive?exists>value >= ${validator.maxExclusive}<#else>false) { +if (<#if validator.minInclusive?exists>value < ${validator.minInclusive?string}<#else>false || +<#if validator.maxInclusive?exists>value > ${validator.maxInclusive?string}<#else>false || +<#if validator.minExclusive?exists>value <= ${validator.minExclusive?string}<#else>false || +<#if validator.maxExclusive?exists>value >= ${validator.maxExclusive?string}<#else>false) { addError(field, error); errors = true; }
svn commit: r566324 - in /struts/struts2/trunk: apps/portlet/src/main/webapp/WEB-INF/ plugins/portlet/src/main/java/org/apache/struts2/portlet/ plugins/portlet/src/main/java/org/apache/struts2/portlet
Author: nilsga Date: Wed Aug 15 13:14:20 2007 New Revision: 566324 URL: http://svn.apache.org/viewvc?view=rev&rev=566324 Log: WW-2104 Renamed name of dispatcher servlet and made the name configurable Modified: struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java Modified: struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml?view=diff&rev=566324&r1=566323&r2=566324 == --- struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml (original) +++ struts/struts2/trunk/apps/portlet/src/main/webapp/WEB-INF/web.xml Wed Aug 15 13:14:20 2007 @@ -25,8 +25,8 @@ - Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java?view=diff&rev=566324&r1=566323&r2=566324 == --- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java (original) +++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletActionConstants.java Wed Aug 15 13:14:20 2007 @@ -125,4 +125,9 @@ * Session key where the value stack from the event phase is stored. */ String STACK_FROM_EVENT_PHASE = "struts.portlet.valueStackFromEventPhase"; + + /** +* Default name of dispatcher servlet in web.xml +*/ + String DEFAULT_DISPATCHER_SERVLET_NAME = "Struts2PortletDispatcherServlet"; } Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java?view=diff&rev=566324&r1=566323&r2=566324 == --- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java (original) +++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java Wed Aug 15 13:14:20 2007 @@ -55,6 +55,8 @@ private static final long serialVersionUID = 434251393926178567L; private boolean useDispatcherServlet; + + private String dispatcherServletName = DEFAULT_DISPATCHER_SERVLET_NAME; /** * Logger instance. @@ -176,9 +178,9 @@ LOG.debug("Location: " + finalLocation); if (useDispatcherServlet) { req.setAttribute(DISPATCH_TO, finalLocation); - PortletRequestDispatcher dispatcher = ctx.getNamedDispatcher("dispatcherServlet"); + PortletRequestDispatcher dispatcher = ctx.getNamedDispatcher(dispatcherServletName); if(dispatcher == null) { - throw new PortletException("Could not locate dispatcherServlet. Please configure it in your web.xml file"); + throw new PortletException("Could not locate dispatcher servlet \"" + dispatcherServletName + "\". Please configure it in your web.xml file"); } dispatcher.include(req, res); } else { @@ -213,5 +215,10 @@ @Inject("struts.portlet.useDispatcherServlet") public void setUseDispatcherServlet(String useDispatcherServlet) { this.useDispatcherServlet = "true".equalsIgnoreCase(useDispatcherServlet); + } + + @Inject("struts.portlet.dispatcherServletName") + public void setDispatcherServletName(String dispatcherServletName) { + this.dispatcherServletName = dispatcherServletName; } }
svn commit: r566414 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties
Author: jholmes Date: Wed Aug 15 16:58:15 2007 New Revision: 566414 URL: http://svn.apache.org/viewvc?view=rev&rev=566414 Log: WW-2115 Add Portuguese translation of struts-messages.properties Added: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties Added: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties?view=auto&rev=566414 == --- struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties (added) +++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties Wed Aug 15 16:58:15 2007 @@ -0,0 +1,32 @@ +# $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. + +struts.messages.invalid.token=The form has already been processed or no token was supplied, please try again. +struts.internal.invalid.token=Form token {0} does not match the session token {1}. + +struts.messages.bypass.request=Bypassing {0}/ {1} +struts.messages.current.file=File {0} {1} {2} {3} +struts.messages.invalid.file=Could not find a Filename for {0}. Verify that a valid file was submitted. +struts.messages.invalid.content.type=Could not find a Content-Type for {0}. Verify that a valid file was submitted. +struts.messages.removing.file=Removing file {0} {1} +struts.messages.error.uploading=Error uploading: {0} +struts.messages.error.file.too.large=File too large: {0} "{1}" {2} +struts.messages.error.content.type.not.allowed=Content-Type not allowed: {0} "{1}" {2} + +devmode.notification=Developer Notification (set struts.devMode to false to disable this message):\n{0}
svn commit: r566417 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties
Author: jholmes Date: Wed Aug 15 16:59:21 2007 New Revision: 566417 URL: http://svn.apache.org/viewvc?view=rev&rev=566417 Log: WW-2115 Add Portuguese translation of struts-messages.properties Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties?view=diff&rev=566417&r1=566416&r2=566417 == --- struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties (original) +++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties Wed Aug 15 16:59:21 2007 @@ -17,16 +17,16 @@ # specific language governing permissions and limitations # under the License. -struts.messages.invalid.token=The form has already been processed or no token was supplied, please try again. -struts.internal.invalid.token=Form token {0} does not match the session token {1}. +struts.messages.invalid.token=O formulario já foi processado ou nenhum token foi gerado, por favor tente novamente. +struts.internal.invalid.token=O token do formulário {0} é diferente do token de sessão {1}. -struts.messages.bypass.request=Bypassing {0}/ {1} -struts.messages.current.file=File {0} {1} {2} {3} -struts.messages.invalid.file=Could not find a Filename for {0}. Verify that a valid file was submitted. -struts.messages.invalid.content.type=Could not find a Content-Type for {0}. Verify that a valid file was submitted. -struts.messages.removing.file=Removing file {0} {1} -struts.messages.error.uploading=Error uploading: {0} -struts.messages.error.file.too.large=File too large: {0} "{1}" {2} -struts.messages.error.content.type.not.allowed=Content-Type not allowed: {0} "{1}" {2} +struts.messages.bypass.request=Ignorando {0}/ {1} +struts.messages.current.file=Arquivo {0} {1} {2} {3} +struts.messages.invalid.file=Não foi possível encontra um Nome de Arquivo para {0}. Verifique se um arquivo válido foi submetido. +struts.messages.invalid.content.type=Não foi possível encontrar um Content-Type para {0}. Verifique se um arquivo válido foi submetido. +struts.messages.removing.file=Removendo arquivo {0} {1} +struts.messages.error.uploading=Erro de uploading: {0} +struts.messages.error.file.too.large=Arquivo muito grande: {0} "{1}" {2} +struts.messages.error.content.type.not.allowed=Content-Type não permitido: {0} "{1}" {2} -devmode.notification=Developer Notification (set struts.devMode to false to disable this message):\n{0} +devmode.notification=Notificação para o Desenvolvedor (altere o paramêtro struts.devMode para false para desabilitar esta mensagem):\n{0}
svn commit: r566418 - /struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties
Author: jholmes Date: Wed Aug 15 16:59:51 2007 New Revision: 566418 URL: http://svn.apache.org/viewvc?view=rev&rev=566418 Log: WW-2115 Add Portuguese translation of struts-messages.properties Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties?view=auto&rev=566418 == --- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties (added) +++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties Wed Aug 15 16:59:51 2007 @@ -0,0 +1,32 @@ +# $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. + +struts.messages.invalid.token=O formulario já foi processado ou nenhum token foi gerado, por favor tente novamente. +struts.internal.invalid.token=O token do formulário {0} é diferente do token de sessão {1}. + +struts.messages.bypass.request=Ignorando {0}/ {1} +struts.messages.current.file=Arquivo {0} {1} {2} {3} +struts.messages.invalid.file=Não foi possível encontra um Nome de Arquivo para {0}. Verifique se um arquivo válido foi submetido. +struts.messages.invalid.content.type=Não foi possível encontrar um Content-Type para {0}. Verifique se um arquivo válido foi submetido. +struts.messages.removing.file=Removendo arquivo {0} {1} +struts.messages.error.uploading=Erro de uploading: {0} +struts.messages.error.file.too.large=Arquivo muito grande: {0} "{1}" {2} +struts.messages.error.content.type.not.allowed=Content-Type não permitido: {0} "{1}" {2} + +devmode.notification=Notificação para o Desenvolvedor (altere o paramêtro struts.devMode para false para desabilitar esta mensagem):\n{0}
svn commit: r566443 - /struts/struts2/trunk/plugins/portlet/src/main/resources/struts-plugin.xml
Author: jholmes Date: Wed Aug 15 17:38:19 2007 New Revision: 566443 URL: http://svn.apache.org/viewvc?view=rev&rev=566443 Log: WW-2104 Add default dispatcher constant Modified: struts/struts2/trunk/plugins/portlet/src/main/resources/struts-plugin.xml Modified: struts/struts2/trunk/plugins/portlet/src/main/resources/struts-plugin.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/resources/struts-plugin.xml?view=diff&rev=566443&r1=566442&r2=566443 == --- struts/struts2/trunk/plugins/portlet/src/main/resources/struts-plugin.xml (original) +++ struts/struts2/trunk/plugins/portlet/src/main/resources/struts-plugin.xml Wed Aug 15 17:38:19 2007 @@ -29,8 +29,10 @@ + +
svn commit: r566474 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
Author: jholmes Date: Wed Aug 15 19:55:44 2007 New Revision: 566474 URL: http://svn.apache.org/viewvc?view=rev&rev=566474 Log: WW-1977 Struts throws stack trace instead of 404 when an action doesn't exist Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=diff&rev=566474&r1=566473&r2=566474 == --- struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java (original) +++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java Wed Aug 15 19:55:44 2007 @@ -746,12 +746,15 @@ } } 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());
svn commit: r566475 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
Author: jholmes Date: Wed Aug 15 19:57:03 2007 New Revision: 566475 URL: http://svn.apache.org/viewvc?view=rev&rev=566475 Log: WW-1977 Struts throws stack trace instead of 404 when an action doesn't exist Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=diff&rev=566475&r1=566474&r2=566475 == --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java Wed Aug 15 19:57:03 2007 @@ -741,12 +741,15 @@ } } 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());
svn commit: r566476 - in /struts/struts1/trunk/core/src/main/java/org/apache/struts: action/ActionServlet.java config/ModuleConfigPostProcessor.java
Author: pbenedict Date: Wed Aug 15 20:14:28 2007 New Revision: 566476 URL: http://svn.apache.org/viewvc?view=rev&rev=566476 Log: STR-3085: Module post-processing Added: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigPostProcessor.java (with props) Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java?view=diff&rev=566476&r1=566475&r2=566476 == --- struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java (original) +++ struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java Wed Aug 15 20:14:28 2007 @@ -50,6 +50,7 @@ import org.apache.struts.config.MessageResourcesConfig; import org.apache.struts.config.ModuleConfig; import org.apache.struts.config.ModuleConfigFactory; +import org.apache.struts.config.ModuleConfigPostProcessor; import org.apache.struts.config.PlugInConfig; import org.apache.struts.util.MessageResources; import org.apache.struts.util.MessageResourcesFactory; @@ -364,6 +365,7 @@ initModuleForwards(moduleConfig); initModuleExceptionConfigs(moduleConfig); initModuleActions(moduleConfig); +postProcessModule(moduleConfig); moduleConfig.freeze(); Enumeration names = getServletConfig().getInitParameterNames(); @@ -386,6 +388,7 @@ initModuleForwards(moduleConfig); initModuleExceptionConfigs(moduleConfig); initModuleActions(moduleConfig); +postProcessModule(moduleConfig); moduleConfig.freeze(); } @@ -890,6 +893,21 @@ log(errMsg, e); throw new UnavailableException(errMsg); +} +} +} + +protected void postProcessModule(ModuleConfig moduleConfig) { +String plugInKey = Globals.PLUG_INS_KEY + moduleConfig.getPrefix(); +PlugIn[] plugIns = (PlugIn[]) getServletContext().getAttribute(plugInKey); +if ((plugIns == null) || (plugIns.length == 0)) { +log.debug("No plugins to attempt post processing"); +} + +for (int i = 0; i < plugIns.length; i++) { +PlugIn plugIn = plugIns[i]; +if (plugIn instanceof ModuleConfigPostProcessor) { +((ModuleConfigPostProcessor) plugIn).postProcessModule(moduleConfig); } } } Added: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigPostProcessor.java URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigPostProcessor.java?view=auto&rev=566476 == --- struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigPostProcessor.java (added) +++ struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigPostProcessor.java Wed Aug 15 20:14:28 2007 @@ -0,0 +1,42 @@ +/* + * $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.struts.config; + +/** + * This interface is to be implemented by any plugin for custom modification of + * a module after it is been configured but before it is frozen. This allows for + * overriding or adding properties after standard initialization. + * + * @see ModuleConfig + * @see ModuleConfig#freeze() + * @since Struts 1.4 + * @version $Rev$ + */ +public interface ModuleConfigPostProcessor { + +/** + * Modify the specified module after its standard initialization. + * + * @param config the module + */ +void postProcessModule(ModuleConfig config); + +} Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigPostProcessor.java -- svn:eol-style = native