使用 REST 插件 (Struts 2) 时如何进行重定向操作
考虑到创建、更新或删除元素后的典型情况,您想要对“index”操作(或任何其他操作)执行redirectAction。如果您使用 REST 插件,该如何制作呢?
Considering the typical case when, after creating, updating or deleting an element, you want to do a redirectAction to the "index" action (or whatever other action). ¿How do you make it if you are using the REST Plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的操作中,您可以执行以下操作:
返回“index”
,并且在声明您的类之前,您可以使用 Results 注释。例如:或
希望有帮助
In your action, you can do:
return "index"
and before declaring your class, you can use the Results annotation. For example:or
Hope it helps