使用forward还是redirect都可以完成跳转

   

 

forward:浏览器地址不变,所以存在重复提交的问题

   <%  pageContext.forward("student/list");   %>

redirect:改变地址

 <%  response.sendRedirect("student/list");  %>

 

使用js也可以

<!-- 使用script脚本 页面跳转,标题拦网址会随着请求的改变而改变。-->
<script type="text/javascript">
window.location = "showip.html";
</script>

相关文章:

  • 2022-12-23
  • 2022-03-02
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2020-07-09
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-12-03
相关资源
相似解决方案