Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用子路径将页面重定向到带有参数的 struts 1 操作?
示例:myserver.com/subpath 重定向 ti myserver.com/myaction.do?method=init
你可以试试这个。使用此短代码在子路径目录中创建 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"); %>