<%--
    Document   : image
    Created on : Nov 7, 2013, 11:39:11 AM
    Author     : 393135
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>

<%
Map imagesMap = (Map)session.getAttribute("IMAGES_MAP");

if (imagesMap != null)
{
String imageName = request.getParameter("image");
if (imageName != null)
{
byte[] imageData = (byte[])imagesMap.get(imageName);

response.setContentLength(imageData.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(imageData, 0, imageData.length);
ouputStream.flush();
ouputStream.close();
}
}
%>
