<%@ page contentType=
<%@ page import=
<%@ page import=
<%@ page import=
<%@ page import=
<jsp:useBean id=
<%
String path = request
String basePath = request
%>
<!DOCTYPE HTML PUBLIC
<html>
<head>
<base href=
<title>My JSP
<meta http
<meta http
<meta http
<meta http
<meta http
<!
<link rel=
</head>
<body>
<%
int id= Integer
String sql =
ResultSet rs=conn
while(rs
{
ServletOutputStream sout = response
//圖片輸出的輸出流
InputStream in = rs
byte b[] = new byte[
for(int i = in
{
sout
//將緩沖區的輸入輸出到頁面
in
}
sout
//輸入完畢
sout
}
%>
</body>
</html>
[
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20707.html