如何重定向参数为 Struts 中的 post 的操作?

How to redirect action with parameter as post in Struts?

将操作重定向到另一个操作 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 上显示参数,有什么方法可以隐藏它或者我怎样才能 post 它起作用?

谢谢..

使用重定向,您只能传递 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