美文网首页
Jsp redirect

Jsp redirect

作者: bfx1000 | 来源:发表于2018-11-07 21:44 被阅读0次

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.

相关文章

网友评论

      本文标题:Jsp redirect

      本文链接:https://www.haomeiwen.com/subject/ebdbxqtx.html