Lo he intentado pero tengo un problema. Este es mi struts.xml antiguo:
Código:
<?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>
<!-- Pendiente de habilitar el acceso a Spring -->
<constant name="struts.objectFactory" value="spring"/>
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources" value="comun-keys,objetosperdidos-keys" />
<constant name="struts.locale" value="es"/>
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<constant name="struts.convention.package.locators" value=""/>
<constant name="struts.convention.action.packages"
value="es.aena.objetosperdidos.init.action,es.aena.objetosperdidos.web.struts.action, es.aena.objetosperdidos.soporte.web.struts.action, es.aena.objetosperdidos.adminavanzada.web.struts.action, es.aena.objetosperdidos.adminbasica.web.struts.action, es.aena.objetosperdidos.caracteristicascomplementarias.web.struts.action, es.aena.objetosperdidos.informes.web.struts.action"/>
<constant name="struts.convention.action.disableJarScanning" value="false"/>
<constant name="struts.convention.action.includeJars"
value="((.*?)_wl_cls_gen(.*?)jar(!/)?)|((.*?)comun-web(.*?)jar(!/)?)"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.multipart.maxSize" value="10000000"/>
<!-- Las dos lineas siguientes son para actualizar con la version de struts 2.1.8 -->
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.convention.action.fileProtocols" value="zip"/>
<!-- Add packages here -->
<package name="default" namespace="/" extends="struts-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" default="false" />
</result-types>
<interceptors>
<!-- interceptor name="volverAtrasInterceptor"
class="es.aena.objetosperdidos.pda.web.struts.interceptor.VolverAtrasInterceptor" /-->
<interceptor name="permisosDeUsuarioInterceptor"
class="es.aena.objetosperdidos.init.interceptor.PermisosDeUsuario"/>
<interceptor-stack name="volverAtrasstack" >
<!-- <interceptor-ref name="defaultStack" />-->
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="scopedModelDriven"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload">
<param name="maximumSize">12000000</param>
</interceptor-ref>
<interceptor-ref name="checkbox"/>
<interceptor-ref name="multiselect"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="actionMappingParams"/>
<interceptor-ref name="params">
<param name="excludeParams">dojo\..*,^struts\..*</param>
</interceptor-ref>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="permisosDeUsuarioInterceptor"/>
<!-- interceptor-ref name="volverAtrasInterceptor" /-->
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="volverAtrasstack" />
<global-results>
<result name="adminUsuariosNoDisponibleOOPP">/jsp/objetosperdidos/pantallaDeUsuariosSinAdministracion.jsp</result>
</global-results>
</package>
</struts>
y éste es el archivo con los cambios:
Código:
<?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>
<!-- Pendiente de habilitar el acceso a Spring -->
<constant name="struts.objectFactory" value="spring"/>
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources" value="comun-keys,objetosperdidos-keys" />
<constant name="struts.locale" value="es"/>
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<constant name="struts.convention.package.locators" value=""/>
<constant name="struts.convention.action.packages"
value="es.aena.objetosperdidos.init.action,es.aena.objetosperdidos.web.struts.action, es.aena.objetosperdidos.soporte.web.struts.action, es.aena.objetosperdidos.adminavanzada.web.struts.action, es.aena.objetosperdidos.adminbasica.web.struts.action, es.aena.objetosperdidos.caracteristicascomplementarias.web.struts.action, es.aena.objetosperdidos.informes.web.struts.action"/>
<constant name="struts.convention.action.disableJarScanning" value="false"/>
<constant name="struts.convention.action.includeJars"
value="((.*?)_wl_cls_gen(.*?)jar(!/)?)|((.*?)comun-web(.*?)jar(!/)?)"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.multipart.maxSize" value="10000000"/>
<!-- Las dos lineas siguientes son para actualizar con la version de struts 2.1.8 -->
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.convention.action.fileProtocols" value="zip"/>
<constant name="struts.enable.SlashesInActionNames" value="true"/>
<constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/>
<!-- Add packages here -->
<package name="default" namespace="/" extends="struts-default">
<action name="**">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" default="false" />
</result-types>
<interceptors>
<!-- interceptor name="volverAtrasInterceptor"
class="es.aena.objetosperdidos.pda.web.struts.interceptor.VolverAtrasInterceptor" /-->
<interceptor name="permisosDeUsuarioInterceptor"
class="es.aena.objetosperdidos.init.interceptor.PermisosDeUsuario"/>
<interceptor-stack name="volverAtrasstack" >
<!-- <interceptor-ref name="defaultStack" />-->
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="scopedModelDriven"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload">
<param name="maximumSize">12000000</param>
</interceptor-ref>
<interceptor-ref name="checkbox"/>
<interceptor-ref name="multiselect"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="actionMappingParams"/>
<interceptor-ref name="params">
<param name="excludeParams">dojo\..*,^struts\..*</param>
</interceptor-ref>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="permisosDeUsuarioInterceptor"/>
<!-- interceptor-ref name="volverAtrasInterceptor" /-->
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="volverAtrasstack" />
<global-results>
<result name="adminUsuariosNoDisponibleOOPP">/jsp/objetosperdidos/pantallaDeUsuariosSinAdministracion.jsp</result>
</global-results>
</action>
</package>
</struts>
Pero en <action name="**"> me marca un error, "The content of element type "action" must match "(param|result|interceptor-ref|exception-mapping)*", que no comprendo.
¿Me falta por poner alguna etiqueta? De ésta manera me compila pero no despliega.
Muchas gracias, un saludo