Author: tchemit Date: 2014-04-02 10:50:25 +0200 (Wed, 02 Apr 2014) New Revision: 1794 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1794 Log: struts configuration + filtering it\! Removed: trunk/wao-web/src/main/resources/struts.properties Modified: trunk/wao-web/pom.xml trunk/wao-web/src/main/resources/struts.xml Modified: trunk/wao-web/pom.xml =================================================================== --- trunk/wao-web/pom.xml 2014-04-02 08:27:37 UTC (rev 1793) +++ trunk/wao-web/pom.xml 2014-04-02 08:50:25 UTC (rev 1794) @@ -162,6 +162,22 @@ <build> <finalName>wao-${project.version}</finalName> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>false</filtering> + <excludes> + <exclude>struts.xml</exclude> + </excludes> + </resource> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + <includes> + <include>struts.xml</include> + </includes> + </resource> + </resources> <pluginManagement> <plugins> <plugin> Deleted: trunk/wao-web/src/main/resources/struts.properties =================================================================== --- trunk/wao-web/src/main/resources/struts.properties 2014-04-02 08:27:37 UTC (rev 1793) +++ trunk/wao-web/src/main/resources/struts.properties 2014-04-02 08:50:25 UTC (rev 1794) @@ -1,43 +0,0 @@ -### -# #%L -# Wao :: Web -# %% -# Copyright (C) 2009 - 2014 Ifremer -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### -struts.ui.theme=bootstrap -struts.ognl.allowStaticMethodAccess=true - -# Help debugging -struts.devMode=${devMode} -struts.ognl.logMissingProperties=${devMode} -struts.el.throwExceptionOnFailure=${devMode} -struts.i18n.reload=${devMode} -struts.custom.i18n.resources=resources -struts.configuration.xml.reload=${devMode} -struts.convention.classes.reload=${devMode} - -# Performance tuning -# see http://struts.apache.org/2.2.3/docs/performance-tuning.html -struts.freemarker.templatesCache=true - -struts.convention.package.locators.basePackage=fr.ifremer.wao.web.action - -# FIXME bleny 06/12/2013 définir à true ouvre une faille de sécurité, voir http://struts.apache.org/release/2.3.x/docs/s2-019.html si on laisse la valeur par défaut, l'appli mouline dès qu'on appel une action autre que execute, on attend que convention-plugin soit adapté pour pouvoir poser une anot sur les méthodes inputs -struts.enable.DynamicMethodInvocation=true - -# FIXME bleny 09/12/2013 définir à true ouvre une faille de sécurité, voir http://struts.apache.org/release/2.3.x/docs/s2-018.html ne pas surcharger cette valeur empêche de définir l'action!methode à appeller au submit et on passe toujours le execute, ça casse le formulaire de déclaration (quand on veut passer à l'étape suivante (!next) on se retrouve dans le résumé (!execute)) -struts.mapper.action.prefix.enabled=true Modified: trunk/wao-web/src/main/resources/struts.xml =================================================================== --- trunk/wao-web/src/main/resources/struts.xml 2014-04-02 08:27:37 UTC (rev 1793) +++ trunk/wao-web/src/main/resources/struts.xml 2014-04-02 08:50:25 UTC (rev 1794) @@ -23,17 +23,47 @@ "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> - <constant name="struts.convention.default.parent.package" value="waoPackage" /> + <constant name="struts.ui.theme" value="bootstrap" /> + <constant name="struts.ognl.allowStaticMethodAccess" value="true" /> - <bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider" type="com.opensymphony.xwork2.TextProvider" /> + <!-- Help debugging --> + <constant name="struts.devMode" value="${devMode}"/> + <constant name="struts.ognl.logMissingProperties" value="${devMode}"/> + <constant name="struts.el.throwExceptionOnFailure" value="${devMode}"/> + <constant name="struts.i18n.reload" value="${devMode}"/> + <constant name="struts.custom.i18n.resources" value="resources"/> + <constant name="struts.configuration.xml.reload" value="${devMode}"/> + <constant name="struts.convention.classes.reload" value="${devMode}"/> + <!-- Performance tuning --> + <!-- see http://struts.apache.org/2.2.3/docs/performance-tuning.html --> + <constant name="struts.freemarker.templatesCache" value="true"/> + <constant name="struts.convention.package.locators.basePackage" value="fr.ifremer.wao.web.action"/> + + <!-- FIXME bleny 06/12/2013 définir à true ouvre une faille de sécurité, + voir http://struts.apache.org/release/2.3.x/docs/s2-019.html si on laisse la valeur par défaut, + l'appli mouline dès qu'on appel une action autre que execute, on attend que convention-plugin + soit adapté pour pouvoir poser une anot sur les méthodes inputs --> + <constant name="struts.enable.DynamicMethodInvocation" value="true"/> + + <!-- FIXME bleny 09/12/2013 définir à true ouvre une faille de sécurité, + voir http://struts.apache.org/release/2.3.x/docs/s2-018.html ne pas surcharger cette valeur + empêche de définir l'action!methode à appeller au submit et on passe toujours le execute, + ça casse le formulaire de déclaration (quand on veut passer à l'étape suivante (!next) + on se retrouve dans le résumé (!execute)) --> + <constant name="struts.mapper.action.prefix.enabled" value="true"/> + + <constant name="struts.convention.default.parent.package" value="waoPackage"/> + + <bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider" type="com.opensymphony.xwork2.TextProvider"/> + <bean type="com.opensymphony.xwork2.conversion.impl.NumberConverter" class="org.nuiton.web.struts2.converters.HundredthLocalNumberConverter" scope="singleton"/> - <constant name="struts.objectFactory" value="fr.ifremer.wao.web.WaoStrutsObjectFactory" /> + <constant name="struts.objectFactory" value="fr.ifremer.wao.web.WaoStrutsObjectFactory"/> - <constant name="struts.xworkTextProvider" value="i18nTextProvider" /> + <constant name="struts.xworkTextProvider" value="i18nTextProvider"/> - <constant name="struts.multipart.maxSize" value="10485760" /> + <constant name="struts.multipart.maxSize" value="10485760"/> <package name="waoPackage" namespace="/" extends="json-default"> @@ -42,8 +72,8 @@ <interceptor name="waoInterceptor" class="fr.ifremer.wao.web.WaoInterceptor"/> <interceptor-stack name="waoStack"> - <interceptor-ref name="waoInterceptor" /> - <interceptor-ref name="paramsPrepareParamsStack" /> + <interceptor-ref name="waoInterceptor"/> + <interceptor-ref name="paramsPrepareParamsStack"/> </interceptor-stack> </interceptors>
participants (1)
-
tchemit@users.forge.codelutin.com