从 struts 2.1.8 迁移到 struts 2.3.24 后,登录页面上的操作无响应

After migrating to struts 2.3.24 from struts 2.1.8, no response to action on login page

我的应用程序显示登录页面,但无法登录。

在登录页面上,用户输入了用户名和密码,但按下登录按钮时没有任何反应。

我们有 JSP :

<s:form id="loginForm" name="loginForm" action="login" namespace="/framework">

struts-framework.xml 文件的动作定义如下:

<global-results>
        <result name="loginShow" type="redirect">loginShow.action</result>
        <result name="toMain">/page/framework/main.jsp</result>
        <result name="logout">/page/framework/logout.jsp</result> 
</global-results>
<action name="login" class="com.abc.action.framework.LoginAction" method="loginCheck"> </action>

在我们的日志中,我们得到了操作 framework/login.action 的请求开始,但此后没有获得任何响应,从日志中可以明显看出这一点。

作为参考,我在将 struts 迁移到 2.3.24 后将以下内容添加到我的 struts.xml 中:

<constant name="struts.enable.DynamicMethodInvocation" value="true" />

感谢您的努力。这是 struts-convention plugin.Works 的一个问题,对我来说删除这个插件和 struts.xml

中的映射依赖关系