使用forward還是redirect都可以完成跳轉
forward:瀏覽器地址不變,所以存在重復提交的問題
<% pageContext.forward("student/list"); %>
redirect:改變地址
<% response.sendRedirect("student/list"); %>
使用js也可以
<!-- 使用script腳本 頁面跳轉,標題攔網址會隨着請求的改變而改變。-->
<script type="text/javascript">
window.location = "showip.html";
</script>