次のサーブレット コードは、データベースのテーブルからイメージ バイトを取得します。
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Configuration config = new Configuration().configure();
SessionFactory sessFact = config.buildSessionFactory();
Session sess = sessFact.openSession();
pojo.File image_file = (pojo.File)sess.get(pojo.File.class, 2);
byte image_file_bytes[] = image_file.getFiles_uploaded();
// NOW WHAT ? HOW DO I MAKE IT DISPLAY IN THE BROWSER ?
}
私は持っていbytes
ます。ブラウザに画像を表示するには、次に何をすればよいですか?