Struts 任何在配置文件中重定向一个地址
在 Struts 中,可以使用
<action name="example" class="com.example.ExampleAction">
<result name="success" type="redirect">/some/other/url</result>
</action>
在上面的示例中,如果 ExampleAction 的处理方法返回名为 "success" 的结果,则会重定向到 /some/other/url。注意,type 属性必须设置为 "redirect",以指示 Struts 执行重定向操作。
原文地址: https://www.cveoy.top/t/topic/crp3 著作权归作者所有。请勿转载和采集!