Java Structs Action类执行方法始终返回null。Struts 1.3.10

Java Structs Action类执行方法始终返回null。Struts 1.3.10,java,struts1,Java,Struts1,我正在将我们的应用程序从struts的旧版本升级到最新的“1”版本:1.3.10。 现在,我们尝试处理该操作的代码总是返回一个空的转发对象。我附加了struts源代码,它看起来总是返回null。在升级之前,我们的代码运行良好,转发对象在返回时被填充 forward = super.processActionPerform(request, response, action, formInstance, mapping); return (forward); 下面是proces

我正在将我们的应用程序从struts的旧版本升级到最新的“1”版本:1.3.10。 现在,我们尝试处理该操作的代码总是返回一个空的转发对象。我附加了struts源代码,它看起来总是返回null。在升级之前,我们的代码运行良好,转发对象在返回时被填充

    forward = super.processActionPerform(request, response, action, formInstance, mapping); 
    return (forward);
下面是processActionPerform的Struts代码:

protected ActionForward processActionPerform(HttpServletRequest request,
    HttpServletResponse response, Action action, ActionForm form,
    ActionMapping mapping)
    throws IOException, ServletException {
    try {
        return (action.execute(mapping, form, request, response));
    } catch (Exception e) {
        return (processException(request, response, e, form, mapping));
    }
}
如您所见,这将调用Action execute方法。下面是Struts执行方法代码,您可以看到它总是返回null

public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws Exception {
    return null;
}
我想知道是否需要更改以使用不同的Struts类或方法来实现这一点。任何协助都将不胜感激


谢谢

Ericbn实际上是对的——我道歉,Eric。是的,我需要重写Action类中的execute方法。它们当前重写了“perform”,它已从以前不推荐使用的Action类中删除。 谢谢
Paul

您的操作应该指向覆盖execute的操作子类的实例。不,不能这样做。Struts类'RequestProcessor'调用Action.execute——我无法控制它。Struts应该能够自己处理这个问题,而无需编写子类。它在使用完全相同的代码之前工作得非常好——唯一的区别是Struts的更高版本。我不明白。您正在显示Struts代码,这是不相关的;你需要显示你的代码,你的配置,等等,这是什么将实际执行。您向我们展示的是返回null的代码,无论您使用的是哪种版本的S1,它都会返回null。