[問題] 為何jsp的sendRedirect 一旦沒有成功就會死掉
如果這支JSP沒有成功sendRedirect(url)
它就死掉了
接下來其他人也都連不到了
為何會如此呢? 是我哪邊沒處理嗎 ?? > <
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"" rel="nofollow">http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<h1>Spring</h1>
<%
String id = request.getParameter("id");
String url="http://xxx/yyy/zzz.jsp?id=" + id ;
response.sendRedirect(url);
%>
</body>
</html>
--
dd
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 202.154.192.30
討論串 (同標題文章)
java 近期熱門文章
PTT數位生活區 即時熱門文章