0

我对redirectAction、输入结果和消息存储拦截器感到非常困惑

假设我们有两个动作,并且它们的拦截器堆栈中都有消息存储。

方案 1

Form is submitted -> No Errors -> Returns success -> fires a redirectAction -> that action is executed -> fire SUCCESS -> final jsp displayed.

这是完美的,也是可以理解的。

方案 2

Form is submitted -> There are errors -> Returns input -> fires a redirectAction -> due to message-store interceptor the errors/messages are found at the second action -> hence, the method shouldn't be executed, instead the errors will be found by an intermediate interceptor and it'll return INPUT

这个流程正确吗?我错过了什么吗?

但在第二种情况下,表单中填充了一些值,我看到第二个动作正在执行。

请更正流程。

4

0 回答 0