知识在于累计,然后是创新。。古人云,温过而知新。。
此帖 陆续添加 以后发现的。
1. <jsp:forward page="<%= nextPage%>" />
可以传递参数!
2. javax.servlet.http.HttpServletResponseWrapper
|_ void sendRedirect(String location) throw IOException
不能传递request,可以通过session等传递参数
3. From
ServletContext.getRequestDispatcher(java.lang.String), ServletContext.getNamedDispatcher(java.lang.String), ServletRequest.getRequestDispatcher(java.lang.String) RequestDispatcher object,,
get
and you can use the method void forward( request,response) throws ServletException, java.io.IOException
可以传递request 和 response
比如
RequestDispatcher rd=request.getRequestDispatcher("main.jsp");
rd.forward(request, response);
本文详细介绍了在JSP中使用不同方法进行页面跳转和参数传递的技术细节,包括<jsp:forward>标签的用法及如何通过request、session等对象传递参数。

2450

被折叠的 条评论
为什么被折叠?



