Jsp redirect
2018-11-07 本文已影响0人
bfx1000
Jsp redirect has two method.
First is <jsp:forward page=" ">.
Second is<% response.redirect(); %>
<jsp:forward page="target.jsp">
construction:
forward.jsp:
target.jsp:
run forward.jsp and get the result:
conclusion of <jsp:forward>:
After redirecting, the URL is still request.jsp. It never change.
This happens on the server. It can take parameters.
<% response.redirect("target.jsp") %>
result:
concluction:
I run target.jsp, but the url changes into target.jsp.
It can hardly take parameters.