s: submit does not work when migrating struts2 version 2.2.1.1 to 2.3.16.1

1

My problem is that an application made in struts2 2.2.1.1 in Jboss5 was migrated to a version of struts2 2.3.16.1 and with jboss6, when making the necessary configurations, I managed to make the application work almost in its entirety, my only of size was that the label no longer works, does not do any action. I did some research and found that constants had to be added to the struts.xml for this new version that actually had that error, and so I did.

<?xml version="1.0" encoding="UTF-8"?
<"DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.serve.static" value="true" />
<constant name="struts.devMode" value="false"/>
<constant name="struts.configuration.xml.reload" value="false" />
<constant name="struts.i18n.encoding" value="ISO-8859-1" />
<constant name="struts.custom.i18n.resources" value="global" />
<constant name="struts.mapper.action.prefix.enabled" value="true"/>
<constant name="struts.enable.SlashesInActionNames" value="true"/>
<constant name="struts.multipart.maxSize" value="1000000" />

<package name="REGEVAL" extends="struts-default">

    <interceptors>
        <interceptor name="sessionCheckInterceptor" class="mx.gob.coneval.regeval.common.SessionCheckInterceptor" />

        <interceptor-stack name="regevalStack">
            <interceptor-ref name="sessionCheckInterceptor" />
            <interceptor-ref name="exception"/>
            <interceptor-ref name="alias"/>
            <interceptor-ref name="servletConfig"/>
            <interceptor-ref name="prepare"/>
            <interceptor-ref name="i18n"/>
            <interceptor-ref name="chain"/>
            <interceptor-ref name="debugging"/>
            <interceptor-ref name="profiling"/>
            <interceptor-ref name="scopedModelDriven"/>
            <interceptor-ref name="modelDriven"/>
            <interceptor-ref name="fileUpload"/>
            <interceptor-ref name="checkbox"/>
            <interceptor-ref name="staticParams"/>
            <interceptor-ref name="params">
                <param name="excludeParams">dojo\..*,^struts\..*</param>
            </interceptor-ref>
            <interceptor-ref name="conversionError"/>
            <interceptor-ref name="validation">
                <param name="excludeMethods">back,cancel,browse,execute,drop,fetch</param>
            </interceptor-ref>
            <interceptor-ref name="workflow">
                <param name="excludeMethods">back,cancel,browse</param>
            </interceptor-ref>
        </interceptor-stack>
    </interceptors>

But still the tag does not work. My website is this way

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 
 <context-param>
 <param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
 <param-value>/WEB-INF/tiles.xml</param-value>
  </context-param>
  <listener>
    <listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
  </listener> 

  <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <filter>
<filter-name>Struts2</filter-name>
 <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
 </filter>

<filter-mapping>
<filter-name>Struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<session-config>
<session-timeout>60</session-timeout>
</session-config>

</web-app>

and my two s: submit are

<s:submit id="btnDetailBoxEdit" name="btnSubmitEditCentro" action="formaAcadUpdateGrado" key="ui.common.btn.save" cssStyle="display: none" />
<s:submit id="btnDetailBoxAdd"  name="btnSubmitAddCentro"  action="formaAcadSave"        key="ui.common.btn.add"  cssStyle="display: none" />

What do you think it could be? Will I need some configuration?

    
asked by Jonathan Mtz 04.04.2017 в 01:55
source

0 answers