コンピューターのローカルの場所から画像を表示したいのですが、このコードを使用して問題なく動作します。
<%@ page import="java.io.*" %>
<%@page contentType="image/gif" %>
<%
OutputStream o = response.getOutputStream();
InputStream is = new FileInputStream(new File("D:/FTP/ECG/ecg.jpg"));
byte[] buf = new byte[32 * 1024];
int nRead = 0;
while( (nRead=is.read(buf)) != -1 )
{
o.write(buf, 0, nRead);
}
o.flush();
o.close();
%>
私の質問は、コンテンツを表示したいということです。また、入力ボックスやラベルなどの他のものも表示したいと考えています。