0

如何使用子路径将页面重定向到带有参数的 struts 1 操作?

示例:myserver.com/subpath 重定向 ti myserver.com/myaction.do?method=init

4

1 回答 1

0

你可以试试这个。使用此短代码在子路径目录中创建 index.jsp 文件。

<jsp:forward page="myserver.com/myaction.do">
  <jsp:param name="method" value="init"/> 
</jsp:forward>

或者

<% response.sendRedirect("myserver.com/myaction.do?method=init"); %>
于 2012-09-27T06:29:42.683 回答