Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Plugins 在使用REST插件(Struts 2)时,如何进行重定向操作_Plugins_Redirect_Struts2_Redirecttoaction - Fatal编程技术网

Plugins 在使用REST插件(Struts 2)时,如何进行重定向操作

Plugins 在使用REST插件(Struts 2)时,如何进行重定向操作,plugins,redirect,struts2,redirecttoaction,Plugins,Redirect,Struts2,Redirecttoaction,考虑到在创建、更新或删除元素后,您希望对“索引”操作(或任何其他操作)执行重定向操作的典型情况。?如果您正在使用REST插件,您是如何实现的?在您的操作中,您可以执行:返回“index”并且在声明类之前,您可以使用结果注释。例如: @Results({ @Result(name="create", location="/home", type="redirect") }) 或 希望有帮助是我问错了问题吗?还是我应该添加一些“需要修复的代码”?怎么了没人接?(无论如何,谢谢你的阅读!)

考虑到在创建、更新或删除元素后,您希望对“索引”操作(或任何其他操作)执行重定向操作的典型情况。?如果您正在使用REST插件,您是如何实现的?

在您的操作中,您可以执行:
返回“index”
并且在声明类之前,您可以使用结果注释。例如:

@Results({
    @Result(name="create", location="/home", type="redirect")
}) 


希望有帮助

是我问错了问题吗?还是我应该添加一些“需要修复的代码”?怎么了没人接?(无论如何,谢谢你的阅读!)
@Results({
    @Result(name="success", type="redirectAction", params = {"actionName" , "orders"})
})