<%@ page contentType="text/html; charset=UTF-8"
%><%@ page import="java.util.*"
%><%@ page import="java.io.*"
%><%


String ls_photo = request.getParameter("ls_photo");
String defaultPhoto = request.getSession().getServletContext().getRealPath("/jwapp/pages/apps/image/default.png");
//图片文件写入到response
	byte[] buffer = new byte[1024];
	InputStream is = null;
	try{
	if((ls_photo!=null && ls_photo!="") && ls_photo.trim().length()>0){
		is = new FileInputStream(ls_photo);	
	}else{
	    is = new FileInputStream(defaultPhoto);
	}
	while (is.read(buffer) >= 0) {
		response.getOutputStream().write(buffer);
	}
	}catch(Exception e){
	      is = new FileInputStream(defaultPhoto);
	      while (is.read(buffer) >= 0) {
		        response.getOutputStream().write(buffer);
	      }
		  System.out.println("找不到图片");
		  is.close();
		  response.flushBuffer();
		}
	is.close();
	response.flushBuffer();
	
%>