<%@page contentType="image/jpeg" %>
<jsp:useBean id="hist" scope="page" class="myBean.Histogram" />
<%
	int width = 0;
	try {
		width = Integer.parseInt(request.getParameter("percent"));
	} catch(Exception e) {
		return;
	}
	int totalWidth = 200;
	
	if(width >totalWidth)
		width = totalWidth;

	double percent = hist.getHistogram(width, totalWidth, 20, response.getOutputStream());
	
	//session.setAttribute("percent", new Double(percent)); 
%>