• <small id='TY5VD'></small><noframes id='TY5VD'>

  • <tfoot id='TY5VD'></tfoot>
      <bdo id='TY5VD'></bdo><ul id='TY5VD'></ul>

    <legend id='TY5VD'><style id='TY5VD'><dir id='TY5VD'><q id='TY5VD'></q></dir></style></legend>
    <i id='TY5VD'><tr id='TY5VD'><dt id='TY5VD'><q id='TY5VD'><span id='TY5VD'><b id='TY5VD'><form id='TY5VD'><ins id='TY5VD'></ins><ul id='TY5VD'></ul><sub id='TY5VD'></sub></form><legend id='TY5VD'></legend><bdo id='TY5VD'><pre id='TY5VD'><center id='TY5VD'></center></pre></bdo></b><th id='TY5VD'></th></span></q></dt></tr></i><div id='TY5VD'><tfoot id='TY5VD'></tfoot><dl id='TY5VD'><fieldset id='TY5VD'></fieldset></dl></div>

      1. 升级到 Struts 2.3.16.3 s:submit 后不起作用

        After upgarding to Struts 2.3.16.3 s:submit does not work(升级到 Struts 2.3.16.3 s:submit 后不起作用)

        <legend id='HVCfX'><style id='HVCfX'><dir id='HVCfX'><q id='HVCfX'></q></dir></style></legend>
          <tfoot id='HVCfX'></tfoot>

          <small id='HVCfX'></small><noframes id='HVCfX'>

            <tbody id='HVCfX'></tbody>

              • <i id='HVCfX'><tr id='HVCfX'><dt id='HVCfX'><q id='HVCfX'><span id='HVCfX'><b id='HVCfX'><form id='HVCfX'><ins id='HVCfX'></ins><ul id='HVCfX'></ul><sub id='HVCfX'></sub></form><legend id='HVCfX'></legend><bdo id='HVCfX'><pre id='HVCfX'><center id='HVCfX'></center></pre></bdo></b><th id='HVCfX'></th></span></q></dt></tr></i><div id='HVCfX'><tfoot id='HVCfX'></tfoot><dl id='HVCfX'><fieldset id='HVCfX'></fieldset></dl></div>
                  <bdo id='HVCfX'></bdo><ul id='HVCfX'></ul>
                • 本文介绍了升级到 Struts 2.3.16.3 s:submit 后不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我最近升级到 Struts 2.3.16.3,即 2.3.15.1 的最新版本

                  I recently upgraded to Struts 2.3.16.3 i.e the latest version of the release from 2.3.15.1

                  现在我的提交按钮在我使用时停止工作 -

                  Now my submit buttons have stopped working when I use -

                  <s:submit align="center" action='Login_loginUser' value="Login"/>
                  

                  我的动作映射如下 -

                  My action mapping are as below -

                  <action name="Login_*" method="{1}" class="com.XXXX.XXXX.XXX.LoginAction">
                      <result name="input" type="tiles">login.tiles</result>
                      <result name="success">/jsp/common/success.jsp</result>
                  </action>
                  

                  我的 struts.xml 如下 -

                  My struts.xml is as below -

                  <?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.action.extension" value="action"/>
                      <include file="com/emsproject/system/sysconfig/login.xml"/>
                   </struts>
                  

                  我的 web.xml 如下 -

                  My web.xml is as below -

                  <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
                      <display-name>eSchoolMate</display-name>
                      <filter>
                          <filter-name>struts2</filter-name>
                          <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
                          <init-param>
                              <param-name>actionPackages</param-name>
                              <param-value>com.mypackages</param-value>
                          </init-param>
                      </filter>
                      <filter-mapping>
                          <filter-name>struts2</filter-name>
                          <url-pattern>*.action</url-pattern>
                      </filter-mapping>
                      <filter-mapping>
                          <filter-name>struts2</filter-name>
                          <url-pattern>/struts/*</url-pattern>
                      </filter-mapping> 
                      <listener>
                          <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
                      </listener>
                      <listener>
                          <description>sessionListener</description>
                          <listener-class>com.emsproject.action.common.SessionListener</listener-class>
                      </listener>
                      <context-param>
                          <param-name>tilesDefinitions</param-name>
                          <param-value>/WEB-INF/tiles.xml</param-value>
                      </context-param>
                      <welcome-file-list>
                          <welcome-file>/jsp/common/index.html</welcome-file>
                      </welcome-file-list>
                      <servlet>
                          <servlet-name>MyInfo</servlet-name>
                          <servlet-class>com.mypackage.action.common.MyServlet</servlet-class>
                      </servlet>
                      <servlet-mapping>
                          <servlet-name>MyInfo</servlet-name>
                          <url-pattern>/eapp/*</url-pattern>
                      </servlet-mapping>
                  
                  </web-app>
                  

                  我尝试了发行说明中提到的排除参数更改,但似乎没有任何效果.

                  I tried the exclude parameter change as mentioned in the release notes, but nothing seems to work.

                  如果我将 s:submit 更改为 HTML 输入类型按钮 &从 javascript 调用操作如下 -

                  If I change the s:submit to HTML input type button & call the action from the javascript as below -

                  function callLogin(){
                      document.getElementById('sysForm').target="_self";
                      document.getElementById('sysForm').action='/coms/common/Login_loginUser.action';
                      document.getElementById('sysForm').submit();
                  }
                  

                  这很好用,但它会在整个应用程序中产生巨大的变化 :(.

                  This works fine but it would be a huge change throughout the application :(.

                  不知道为什么这个版本没有解析动作映射,因为在 Struts 2.3.15.1 中一切正常.

                  Not sure why the action mappings are not resolved in this version as everything works fine in Struts 2.3.15.1.

                  任何帮助将不胜感激.

                  谢谢

                  推荐答案

                  许多安全修复,包括 S2-016,出现在最新版本中,因此默认禁用某些特性或功能.要在 submit 标记中启用 using action 属性,请在 struts.xml

                  Many security fixes, including S2-016, occurred to the latest release, so some features or functionality is disabled by default. To enable the using action attribute in submit tag use the following constant in struts.xml

                  <constant name="struts.mapper.action.prefix.enabled" value="true"/>
                  

                  这篇关于升级到 Struts 2.3.16.3 s:submit 后不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Java Bytecode Manipulation Library Suggestions(Java 字节码操作库建议)
                  Java CLI UI-design: frameworks or libraries?(Java CLI UI 设计:框架还是库?)
                  About the use of Beans.xml configuration file in Spring Framework application(关于Spring Framework应用中Beans.xml配置文件的使用)
                  What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?(Spring、Struts、Hibernate、JavaServer Faces、Tapestry 有什么区别?)
                  Are there any android application framework like spring?(有没有像spring这样的android应用程序框架?)
                  Java Swing based game framework. Any advice?(基于 Java Swing 的游戏框架.有什么建议吗?)
                    <tbody id='tj1HR'></tbody>
                  <legend id='tj1HR'><style id='tj1HR'><dir id='tj1HR'><q id='tj1HR'></q></dir></style></legend>
                  • <bdo id='tj1HR'></bdo><ul id='tj1HR'></ul>

                      <tfoot id='tj1HR'></tfoot>

                    1. <i id='tj1HR'><tr id='tj1HR'><dt id='tj1HR'><q id='tj1HR'><span id='tj1HR'><b id='tj1HR'><form id='tj1HR'><ins id='tj1HR'></ins><ul id='tj1HR'></ul><sub id='tj1HR'></sub></form><legend id='tj1HR'></legend><bdo id='tj1HR'><pre id='tj1HR'><center id='tj1HR'></center></pre></bdo></b><th id='tj1HR'></th></span></q></dt></tr></i><div id='tj1HR'><tfoot id='tj1HR'></tfoot><dl id='tj1HR'><fieldset id='tj1HR'></fieldset></dl></div>
                        • <small id='tj1HR'></small><noframes id='tj1HR'>