[英]Automatically redirect from one JSP page to Another
主頁加載后,是否可以將用戶自動重定向到第二個 jsp 頁面?
加載核心JSTL庫<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
您可以使用:
<c:redirect url="/home.html"/>
有一個這樣的例子: JSP - 頁面重定向
最簡單的是使用sendRedirect
:
public void response.sendRedirect(String location)
throws IOException
<% response.sendRedirect("anyPage.jsp"); %>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.