gpt4 book ai didi

post - 如何使用参数重定向 Action 作为 Struts 中的帖子?

转载 作者:行者123 更新时间:2023-12-04 20:01:27 25 4
gpt4 key购买 nike

将操作重定向到另一个操作 struts.xml :

<action name="CheckLogin" class="LoginS" method="checkLogin">
<result name="input" type="redirectAction">
<param name="actionName">SectorDisplay</param>
<param name="branch_id">${branch_id}</param>
</result>
</action>

参数作为 branch_id 发送但它在 url它显示像
http://localhost:8085/Display/SectorDisplay.action?branch_id=110

我认为它不是 POST,它是 GET。

我不想在 URL 上显示参数,有什么方法可以隐藏它或者我如何将它发布到操作中?

谢谢..

最佳答案

通过重定向,您只能通过 GET参数。您可以使用 action chaining作为备选。

查看这些帖子以了解详细信息:

Can you do a struts2 action redirect using POST instead of GET?

Struts 1 redirect from action to action with parameters as POST request

关于post - 如何使用参数重定向 Action 作为 Struts 中的帖子?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29404904/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com